Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 3D data viewer to HDV #256

Closed
sbarbosadataverse opened this issue Mar 27, 2024 · 35 comments
Closed

Add 3D data viewer to HDV #256

sbarbosadataverse opened this issue Mar 27, 2024 · 35 comments
Labels
enhancement New feature or request Feature: External Tool Size: 3 A percentage of a sprint.

Comments

@sbarbosadataverse
Copy link

3D viewer in a Dataverse Installation (select a 3D file to view the 3D viewer) https://dataverse.openforestdata.pl/dataset.xhtml?persistentId=doi:10.48370/OFD/Y8TNUO

related to: #253

@cmbz
Copy link
Collaborator

cmbz commented Mar 27, 2024

2024/03/27
Prioritized at @siacus request (Slack thread)
Also, once closed, please also update Guide to let folks know the viewer is available.

@cmbz cmbz moved this to SPRINT- NEEDS SIZING in IQSS Dataverse Project Mar 27, 2024
@cmbz cmbz added the Size: 3 A percentage of a sprint. label Mar 27, 2024
@cmbz cmbz moved this from SPRINT- NEEDS SIZING to This Sprint 🏃‍♀️ 🏃 in IQSS Dataverse Project Mar 27, 2024
@landreev
Copy link
Collaborator

landreev commented Apr 9, 2024

Could somebody please add the info on the actual viewer tool that needs to be installed - the source of it/the Dataverse manifest for it, etc. I'm not immediately seeing it in the slack thread linked and/or the doc. linked from issue #253.

@landreev
Copy link
Collaborator

landreev commented Apr 9, 2024

(otherwise this would take a minute to add in prod.)

@sbarbosadataverse
Copy link
Author

sbarbosadataverse commented Apr 9, 2024

Could somebody please add the info on the actual viewer tool that needs to be installed - the source of it/the Dataverse manifest for it, etc. I'm not immediately seeing it in the slack thread linked and/or the doc. linked from issue #253.

@landreev , I don't have the name of the tool that is why I included the DV that is using it so we can connect with them for the information.

@landreev
Copy link
Collaborator

landreev commented Apr 9, 2024

Has somebody been in touch with them already, Matt Cook maybe?

@qqmyers
Copy link
Member

qqmyers commented Apr 9, 2024

FWIW: From this paper (https://www.researchgate.net/publication/354871831_Open_Forest_Data_Digitalizing_and_building_an_online_repository), it appears that they are just wrapping https://github.com/kovacsv/Online3DViewer which has an MIT license. The browser console on shows on minimized js getting downloaded so they must have integrated everything. I didn't immediately see a repo for the Dataverse-specific work.

@pdurbin
Copy link
Member

pdurbin commented Apr 9, 2024

@kamil386 presented the Open Forest Data tool at the 2020 Dataverse community meeting. I just emailed him to see if it's open source. Here are the slides, by the way: External tools for advanced data visualization in hard sciences.pdf

@landreev
Copy link
Collaborator

Is this issue asking for a "waiting" tag? @donsizemore and @pdurbin both contacted the instance in question via different routes for the source info. The installation here at HDV is pending/waiting for that information.

@cmbz cmbz added the Status: Needs Input Applied to issues in need of input from someone currently unavailable label Apr 10, 2024
@pdurbin
Copy link
Member

pdurbin commented Apr 10, 2024

I also went ahead and asked the community, why not: https://groups.google.com/g/dataverse-community/c/D-vGQ5JP_7I/m/9uQcHTjVAAAJ

@Cook4986
Copy link

Additional, open-source/open-access 3D web viewers with academic/scholarly user bases:

@pdurbin
Copy link
Member

pdurbin commented Apr 22, 2024

@Cook4986 thanks for the list! How do you feel about X_ITE?

That's the one @PaulBoon used for a 3D viewer he just created for Dataverse:

He wrote, "Other libs I tried where x3dom and three.js, X_ITE was the simplest to use."

@landreev
Copy link
Collaborator

I saw gdcc/dataverse-previewers#56. If anyone feels positive that it's ready for prod. use, just let me know. Otherwise we'll wait until it's merged.

@landreev
Copy link
Collaborator

@Cook4986 Which specific 3D file format(s) is your group going to be using? - is there a list of formats that we want Dataverse users to be able to preview?

@sbarbosadataverse
Copy link
Author

Noting that the prefered tool for Matt Cook's team at Harvard Library is "Voyager" https://smithsonian.github.io/dpo-voyager/

@landreev
Copy link
Collaborator

With luck, the basic framework of the 2 known Dataverse 3D viewers (based around Online3DViewer and X_ITE) could be replicated to build a Voyager-based tool as well. ... But it'll still be a bit of a dev. and testing effort.

@qqmyers
Copy link
Member

qqmyers commented Apr 30, 2024

One thing to note from https://smithsonian.github.io/dpo-voyager/explorer/usage/ - Option 2 - it looks like the svx file is not the whole model - it points to other files for the 3d geometry to display.

@sbarbosadataverse
Copy link
Author

Created a previewer issue in GDCC to support Voyager for Harvard Library:

@landreev
Copy link
Collaborator

landreev commented May 1, 2024

Additional, open-source/open-access 3D web viewers with academic/scholarly user bases:

* [Voyager ](https://smithsonian.github.io/dpo-voyager/)
  
  * Smithsonian-based

* [Universal Viewer](https://universalviewer.io/)
  
  * Supports IIIF

* [Babylon.js](https://www.babylonjs.com/)

* [x3Dom](https://www.x3dom.org/)

@Cook4986 To clarify, in the context of integration with Dataverse, we can't just use arbitrary viewers, like the ones you listed, "off the shelf". In order to work with Dataverse, a web app needs to conform to our specifications of what we call a "Dataverse external tool" - basically, it needs to understand the bare minimum of our API to be able to talk to Dataverse and retrieve files from it.

With open source tools like the ones above, it is usually a matter of adding an extra javascript wrapper around their libraries that provides this functionality. It's relatively lightweight, there are standard templates that can be reused, and there is a community-driven development project (outside of the core Dataverse development) - https://github.com/gdcc/dataverse-previewers for creating such tools. As an example, here's a new/experimental 3D viewer tool that has been created based on the X_ITE library: gdcc/dataverse-previewers#56.

"Integration" with Datavese is of course the key word. We are talking about a tool that can be plugged into the framework of the application, allowing our users to launch it on a Dataverse-served file with a single click in the application UI, in a new tab or embedded, etc. A user can of course download files from Dataverse, and use any tool of their liking on it outside of the application.

In most cases, creating a new Dataverse viewer tool around an existing library is not much of a development effort. But it is still something that somebody needs to work on and build. It is possible that a viewer based on Voyager can be created relatively easily, but it is not going to happen instantly. In the context of this issue we are adding an already existing tool created by another Dataverse group (linked in the opening comment) to our prod. server. We should be able to have it installed shortly. Going forward, we hopefully will be adding more viewer tools as they become available.

@Cook4986
Copy link

Cook4986 commented May 3, 2024

Thanks for the context, @landreev. A cursory look X_ITE docs and @PaulBoon's work (issue #56) is encouraging, especially given support for our three deliverable formats: gltf (for streaming applications), obj (legacy format), and X3D (our "master" mesh, with embedded textures). Note: X3D is our highest resolution output, with single files > 500MB.

Regarding the other viewers, I was not counting on any custom development; just sharing the common viewers within my academic 3D practitioner network. If Dataverse is serious about supporting (another) embedded 3D viewer though, I recommend first convening experts - like @JulieWinchester (Morphosouce) and @gjcope (Smithsonian) - to better understand the landscape. One reason to do this, now or in the future, would be analytics (e.g. virtual measurement tools).

Happy to coordinate such a call if there's interest/demand on the Dataverse side. BTW, here's the HL 3D repo, for reference.

@cmbz
Copy link
Collaborator

cmbz commented May 8, 2024

2024/05/08

  • Next steps, add to demo and ask @Cook4986 to test

@cmbz cmbz removed the Status: Needs Input Applied to issues in need of input from someone currently unavailable label May 8, 2024
@PaulBoon
Copy link

PaulBoon commented May 9, 2024

@Cook4986 If you start testing that X_ITE base previewer please have a look at the initial attempt to use that 'Online3DViewer' for which I have made this draft PR: gdcc/dataverse-previewers#58.
While fiddling with some data files, I was getting the impression that the 'Online3DViewer' was a bit better in rendering different files and formats than the X_ITE based previewer. However, it lacked a menu and it had similar problems with the initial view not showing the model. These problems might be solvable with a bit of coding, but that would take some time to figure out.

It would be interesting to know how the 'Open Forest Data' has made that tool work, most likely it is simpler to integrate as an 'explore' tool because it is meant to be a 'site' and not to be framed on another page.

@pdurbin
Copy link
Member

pdurbin commented May 9, 2024

It would be interesting to know how the 'Open Forest Data' has made that tool work

I forget if we've shared this link already (too many issues and pull requests!) but please see https://github.com/OpenForestData/open-forest-data-previewers

@landreev landreev self-assigned this May 14, 2024
@landreev landreev moved this from This Sprint 🏃‍♀️ 🏃 to In Progress 💻 in IQSS Dataverse Project May 14, 2024
@landreev
Copy link
Collaborator

Here's a trial install of the Openforestdata.pl 3dViewer tool in prod.:
Screen Shot 2024-05-13 at 8 32 58 PM
The file in the screenshot: https://dataverse.harvard.edu/file.xhtml?fileId=7559161&version=1.1
Should be working on any STL file as of now; more mime types will be supported going forward. May still need to iron out some kinks...

Huge thanks to Kamil Guryn from Openforestdata, and to @pdurbin for the help!

@landreev
Copy link
Collaborator

The viewer also works for image/x-3ds and application/x-tgif types.

@landreev
Copy link
Collaborator

landreev commented May 14, 2024

I'm going to close this issue, since it was opened and estimated as a quick prod. server config change only.
I suggest we continue the discussion of adding more tools going forward, based on other underlying libraries/supporting more file types etc., somewhere in the https://github.com/gdcc/dataverse-previewers github project. For example, in gdcc/dataverse-previewers#56, gdcc/dataverse-previewers#58 (new tools based on X_ITE and Online3DViewer, respectively, under development) or gdcc/dataverse-previewers#57 (a new issue inquiring about a tool based on Voyager).

@pdurbin
Copy link
Member

pdurbin commented May 14, 2024

As discussed in standup, I created a PR to add this tool to the guides:

Thanks again, @kamil386!

@landreev landreev moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project May 14, 2024
@landreev landreev moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project May 14, 2024
@landreev landreev removed their assignment May 14, 2024
@Cook4986
Copy link

Cook4986 commented May 15, 2024

Great to see progress here. Do you have a link to a test page for an .x3d preview, @landreev ? The .stl preview looks great, but that format is geometry only, which will significantly limit applicability (i.e., to CAD designs rather than cultural heritage scans, like those being produced by HL).

@pdurbin the Online3DViewer (textured .glb) demo looks great. Would/will this be an "Explore" page-launcher view, like Openforestdata repo, or an embedded preview?

@pdurbin
Copy link
Member

pdurbin commented May 15, 2024

@Cook4986 I could be mistaken but I think the previewer was only added for content type "application/vnd.ms-pki.stl". Would you be able to open a fresh issue for additional content types? Some of our previewers work for multiple content types (JPG, GIF, PNG, for example), but we have to add them multiple times, once for each type.

Good question about preview vs. explore. You would prefer preview? And yes, that demo looks great.

@landreev
Copy link
Collaborator

landreev commented May 16, 2024

@Cook4986 @pdurbin The installed viewer will also work on image/x-3ds and application/x-tgif, it is mentioned somewhere above. This is the configuration that the authors passed to us (our viewers are tied to/configured for mime types), that I copied as is. But I will ask them if it is supposed to work on anything else, including X3D. There's a chance that it is, and they only configured it for the 3 types above because that's what their archive uses.

There's also a good chance that this viewer does NOT work on any, or some of the formats that you need. But we are going to continue soliciting/looking for more viewers to add. Phil suggested opening a new issue requesting support for more types, but it may make sense to first ask in gdcc/dataverse-previewers#56, or gdcc/dataverse-previewers#58.

@landreev
Copy link
Collaborator

@Cook4986 @pdurbin
It doesn't seem to be working with x3d - I just tried it with a model/x3d+xml file, and got "unsupported file type".

@landreev
Copy link
Collaborator

@Cook4986 I installed the experimental X_ITE-based viewer discussed above, as part of the overall viewers upgrade in #242.
I can see  that it at least opens on X3D files. For example, one of your files:
https://dataverse.harvard.edu/file.xhtml?fileId=7127236&version=1.0&toolType=PREVIEW
I haven't tested it much otherwise.

It is of course still in beta, and advertised as such on the dataset page.

@Cook4986
Copy link

Cook4986 commented May 31, 2024

It's great to preview one of our models on DV, @pdurbin and @landreev! I do think this is the more natural way to implement the viewer, rather than linking out.

Can we test a tweak X_ITE that disables the default environmental lighting? Our scans are set to "shadeless" on Sketchfab, which better reveals surface details - like the "2060" label of this Granite scan for example.

@pdurbin
Copy link
Member

pdurbin commented Jun 3, 2024

@Cook4986 would you be able to open an issue at https://github.com/gdcc/dataverse-previewers ? Perhaps we can get @PaulBoon's attention since he added the initial implementation:

@landreev
Copy link
Collaborator

landreev commented Jun 6, 2024

@Cook4986 (I was out for a few days, only saw your question today)
I would ask the author of the tool, in gdcc/dataverse-previewers#56. I'm not sure how easy it's going to be, to make the changes above, but any such tweaks would need to be done on their end. Please note that when I said "I installed ...", that may have been too strong a word: "installing" a tool like this previewer just means putting some configuration settings in place on the Dataverse end, telling our application to direct the user's browser to gdcc.github.io where the viewer is hosted, to download its components, the javascript/html files etc., and to pass file access urls and tokens to it.

@Cook4986
Copy link

See new previewers repo issue #68 for further testing/debugging discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Feature: External Tool Size: 3 A percentage of a sprint.
Projects
None yet
Development

No branches or pull requests

7 participants