ArctosDB / documentation-wiki

Arctos Documentation and How-To Guides
https://handbook.arctosdb.org
GNU General Public License v3.0
13 stars 13 forks source link

Sketchfab links and thumbnails in Arctos #205

Open ewommack opened 3 years ago

ewommack commented 3 years ago

Describe the bug I'm working on the iDigBio Poster featuring the Sketchfab 3D models and the linking of the data to Arctos. Arctos lets me create the media for the specimens just fine, but I have two problems that if I could get fixed would make things even niftier for the poster:

  1. The Sketchfab media do not have thumbnails. Can I just add an image capture for each model as a thumbnail? Since the media is a html I wasn't sure.
  2. When you click on the media link in Arctos it takes you to an error page, but when I click on the link in the error page it takes me to the Sketchfab model just fine.

To Reproduce Go to https://arctos.database.museum/guid/UWYMV:Bird:4102 I'd like to replace the Arctos media bear with a thumbnail for the models like this: Condor_skull

Would just adding this .jpg as a thumbnail work? Or is there something I can grab from the Sketchfab page for the model that would work better?

For viewing the media, when you click on the Media Available image Sketchfab thumbnail it sends you to this error page Sketchfab link problem

When you click on the original link in the error page it takes you to the correct Sketchfab page: https://skfb.ly/6VCNQ

Expected behavior I'd like an image of the model as a thumbnail if possible?

It would be great when I click on the Media Available link it followed to the Sketchfab link rather then to an error page first.

Desktop (please complete the following information): Mac OS 10.15.7, chrome

Additional context related to ArctosDB/arctos#2986

Priority Medium

dustymc commented 3 years ago

preview

Yep, https://handbook.arctosdb.org/documentation/media.html#preview

like this:

Screen Shot 2021-05-19 at 5 38 03 PM

Needs to lose a few hundred thousand bytes, then OK.

403 means they're blocking our HEAD request, same as https://github.com/ArctosDB/arctos/issues/2986#issuecomment-772152176

ewommack commented 3 years ago

403 means they're blocking our HEAD request, same as ArctosDB/arctos#2986 (comment)

So I go to Sketchfab and ask why they are blocking Arctos?

ewommack commented 3 years ago

Alright I'm undoubtably doing something wrong here @dustymc . I created a smaller version of the .jpg and tried to load it as the thumbnail preview. I got the following error: Arctos_thumbnail problem

Now I'm confused how I select the preview images for the media object. Sorry!

dustymc commented 3 years ago

If you wan to attach the preview I can find a workaround or maybe figure out why that's disabled.

Jegelewicz commented 3 years ago

When I did this. I uploaded the thumbnail to TACC as an image, then used the url in the media metadata of the media that needed a thumbnail. (If that even makes sense).

ewommack commented 3 years ago

@dustymc could you give it a try? That would at least let me know if I created the thumbnail correctly. I've got over 100 images it would be great that I could add thumbnails too if possible, so I don't want to overload you though. Condor_skull_thumbnail

@Jegelewicz I've done that when I'm creating media, but once the media is already created where would I add the url? I could probably figure out how to get access and upload things to TACC again... Maybe for already created media the place to add it would be: Media Thumbnail question

ewommack commented 3 years ago

I'd love to have the thumbnails of at least some of them up to create an image for the poster for iDigBio. I've started linking all of the media to the project I created for the 3D skull models: https://arctos.database.museum/project/10003539

With the thumbnails that project page might be really cool to look at.

Jegelewicz commented 3 years ago

Yep - Add the url to the place the arrow is pointing.

dustymc commented 3 years ago

See https://handbook.arctosdb.org/documentation/media.html#preview

filesize should be under (preferably much under!) 10K; previews larger than 48K will NOT be displayed

That image is 71K; it will not be used.

I made it smaller, then....

Screen Shot 2021-05-21 at 4 11 59 PM Screen Shot 2021-05-21 at 4 12 05 PM

Drag/drop, get to...

Screen Shot 2021-05-21 at 4 12 41 PM

copy that URL

https://web.corral.tacc.utexas.edu/arctos-s3/dlm/2021-05-21/119205745_63d83680_ba56_11eb_9e6e_98386687ebd5.jpg

then you're done there - you don't need to create Media.

Edit the media you want to have a preview, copy that URL into preview_uri

Screen Shot 2021-05-21 at 4 18 54 PM

save and wait for the cache to clear

dustymc commented 3 years ago

Add the url to the place the arrow is pointing.

Which makes me realize that Arctos doesn't care WHAT URL you use, and stability isn't much of a concern for thumbnails. If it's easier you could load these to some campus server, some image host, https://github.com/ArctosDB/arctos-assets, or anything else that provides a URL, and use that rather than Corral.

And speaking of stability, are there originals somewhere?

ewommack commented 3 years ago

Thanks @dustymc! I figured I must be doing something wrong with creating the thumbnails. I found instructions that spoke of pixel size, and so that was what I was using to tell me how small I should make the image. I tried out your suggestions and got the thumbnail for the cranium to go through!

And speaking of stability, are there originals somewhere? Besides for the models stored on Sketchfab? Nope. I could ask the library if they have storage for all of the Thumbnails I'm creating. I'm not sure on the original model files for the skulls. Do you think that might be important?

For the linking back to Sketchfab problem from Arctos. Do you think it would work if I tried using the URL for the skulls instead of the suggested link created by Sketchfab? So for the Condor cranium the suggested Sketchfab link is: https://skfb.ly/6VCNO That's the one I've been using to create the media. But the URL for the page is: https://sketchfab.com/3d-models/uwymvbird-4102-gymnogyps-californianus-crania-a7c0990dee1342b2abbfd7c582064c36

dustymc commented 3 years ago

Do you think that might be important?

Yes, yes, and more yes! @jldunnum can we make that conversation a little more visible somehow?

They're probably blocking all of the aliases, but you can just switch a URL to see what happens if you want.

ewommack commented 3 years ago

@dustymc - using the longer URL form the actual Sketchfab page seems to have worked. Compare: https://arctos.database.museum/media/10624595 to https://arctos.database.museum/media/10624596 for clicking on to go to the full media.

So I suppose the solution is to change out the URLs for all of them.

dustymc commented 3 years ago

Neato - probably whomever owns skfb.ly is doing something weird. Should be documented, somewhere.

jldunnum commented 3 years ago

Tying in John Korbin from Sandia National Labs. He has been doing all our scanning and working with Scketchfab. He had some discussions with them directly as well so he may have some extra insight.


Jonathan L. Dunnum Ph.D. Senior Collection Manager Division of Mammals, Museum of Southwestern Biology University of New Mexico Albuquerque, NM 87131 (505) 277-9262 Fax (505) 277-1351

MSB Mammals website: http://www.msb.unm.edu/mammals/index.html Facebook: http://www.facebook.com/MSBDivisionofMammals

Shipping Address: Museum of Southwestern Biology Division of Mammals University of New Mexico CERIA Bldg 83, Room 204 Albuquerque, NM 87131


From: dustymc @.> Sent: Monday, May 24, 2021 11:01 AM To: ArctosDB/arctos @.> Cc: Jonathan Dunnum @.>; Mention @.> Subject: Re: [ArctosDB/arctos] Sketchfab links and thumbnails in Arctos (#3613)

[EXTERNAL]

Neato - probably whomever owns skfb.ly is doing something weird. Should be documented, somewhere.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ArctosDB/arctos/issues/3613#issuecomment-847195624, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AED2PAY2KVASDR35ZUZDYETTPKA6TANCNFSM45FYH5EQ.

dustymc commented 3 years ago

@ewommack I think I can get the thumbnail uploader operational for next release, you might want to wait before going the complicated way - and let me know if that needs prioritized.

ewommack commented 3 years ago

Thanks @dustymc ! I'll probably still do some the complicated way so I have some visuals for the iDigBio poster, but that's ok. I'm learning lots here, and spotting problems in some of our material. It will be really amazing for the next batches to the have the uploader.

Jegelewicz commented 3 years ago

Did someone say "I'll make a tutorial"?

ewommack commented 3 years ago

Schhhhmaybe? For @dustymc new process or the work around he taught me?

ewommack commented 3 years ago

@dustymc question that came up while I was making the poster. Complete novice question on the links used to create the media, are the links from Sketchfab (https://sketchfab.com/3d-models/uwymvbird-4102-gymnogyps-californianus-skull-0ef44d4cd4aa4382963820afed048c92) URIs/URLs? They do not look like DOIs or UUIDs, but I've reached the end of my knowledge and am drifting into new territory.

I promise to use any info you partake to add to my Arctos understanding knowledge :)

dustymc commented 3 years ago

Those are URLs, and all URLs are URIs. Some URIs (such as those that start with FPT) are not URLs.

DOIs are (among other things) managed redirects. If you're linking to SketchFab and they change their URL or go out of business and someone else gets the data (there's nothing you can do if the data dies with their business plan, which is all too common), your link is just broken and you have to deal with it. if you're linking to a DOI, the DOI folks can change their target and your links keep working.

UUIDs are strings which are exceedingly unlikely to be reproduced. They're not actionable, but they can be part of things which are - 0ef44d4cd4aa4382963820afed048c92 possibly started life as a UUID, although that particular representation isn't "valid" (which doesn't really matter, they're just strings).

ewommack commented 3 years ago

Thanks @dustymc! That's what I had guessed after some reading, but so much easier to learn from an expert. So it would be accurate if I said Using the Arctos Media interface direct links were created between the Sketchfab model pages and the object page for each specimen. Models can be found through the Sketchfab and the Arctos search pages, and URLs for the models can be accessed from both online resources. ?

ewommack commented 3 years ago

Hey @dustymc - the new thumbnail adding button in Edit Media works great! The only thing I've found that gave me a hiccup was from working on a different computer. I had a weird thing happen there where the Preview program told me it made the files smaller then 48K, but then when they were saved they were larger. Took me a while to notice and the thumbnail button let me add the larger files...but then they wouldn't appear.

I went back through and noticed the problem, and when I made them smaller they appeared fine as thumbnails. Maybe we want a notice (files need to be this size or smaller)?

It also looks like that while the thumbnails appear on the specimen page pretty quick, they are taking a bit to appear on the project page. I'm off to have dinner and will cross my fingers that they'll appear afterwards.

dustymc commented 3 years ago

48K (whatever the current limit is) is HUGE for this purpose, and those are fully capable of ganging up and eating browsers, which seems to be an ongoing frustration for the cultural collections. Making smaller thumbs with crappy tools (like preview - it's what I use too) isn't always easy. I could remake jpg thumbs (my serverside tools are very limited as well - I probably can't work with the pngs you're using), but that would be scripts and there's some chance I'd turn that beautiful preview you just spent 4 hours getting JUST RIGHT into a 3-pixel blur. I keep hoping someone's going to figure out how to make https://github.com/ArctosDB/arctos/issues/2863 work, but who knows how realistic that is or if it actually does what I think it does.

The cache is unreasonably aggressive in an attempt to mitigate some of that; it's not surprising if some things take a while to get some places. I think everything should generally happen within 24H, but even that's not an absolute.

Lacking better tools/support, I wonder if there's some way to leverage The Community in creating guidelines or something? Some of us are surely good at image-stuff and probably willing to share, if we can figure out who to ask.

Jegelewicz commented 3 years ago

@mvzhuang what has been your experience with UTEP plant photography?

ewommack commented 3 years ago

Looks like they're all there. If I was working with an image I'd probably convert to jpg, but the fastest easiest way I was able to create these from Sketchfab was to take a screen shot of the model and then size it down in Preview. So png. They've all come up on the project page so it looks like the 12-24 hours worked fine once I got them below 48K (https://arctos.database.museum/project/10003539)

I'd be fully up for helping to create something about how to do thumbnails for odd media. The info on the web was less then helpful for what I was planning on doing.

dustymc commented 3 years ago

I believe UTEP is/was dealing with image binaries, which is (in theory anyway) a little simpler situation.

A recipe (probably one for mac and another for windows) for making good thumbs seems very useful.

Jegelewicz commented 3 years ago

I'd be fully up for helping to create something about how to do thumbnails for odd media.

I'd LOVE that!

mvzhuang commented 3 years ago

The arctos imagemagick thumbnail thing has been working fine for the herbarium specimens so far. I've only been linking to the high-res jpegs. TORCH had huge thumbnails (>100K) that were bigger than Arctos limits. I tried to ask them to reduce it but then they said they couldn't (and didn't see why they should...) because when they tried to make their own thumbnail thing, the thumbnails were super grainy and didn't help. Arctos is generating them for the herbarium specimens.

dustymc commented 3 years ago

Can this be closed?

ewommack commented 3 years ago

I think so. Unless we need it open to track the progress of the documentation?