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

Create 3D viewer demos that support IIIF-ish draft manifests #28

Open
JulieWinchester opened this issue Jul 12, 2023 · 20 comments
Open

Comments

@JulieWinchester
Copy link
Contributor

In #11 (comment), we have two example draft IIIF Presentation API V4 spec manifests that describe 3D resources. In the same way that we have created 3D viewer demos that load label annotations from a common simple JSON manifest, we should create 3D viewer demos that support and use these IIIF-ish 3D manifests to load content.

@JulieWinchester
Copy link
Contributor Author

We have one viewer demo using Three.js that loads our WIP IIIF manifest, created by @mikeapp: https://github.com/mikeapp/iiif-threejs

@JulieWinchester
Copy link
Contributor Author

For reference, we are collating examples of draft manifests that reflect evolving discussions of what IIIF Presentation API 3D support could look like here: https://github.com/IIIF/3d/tree/main/manifests

@JulieWinchester
Copy link
Contributor Author

During the 9/20 meeting, @edsilv demonstrated a technical demo loading a 3D model from a IIIF-ish draft manifest, including the ability to load ambient lighting. When available, we will add a link to a code repo or sandbox for this demonstration.

@gjcope
Copy link

gjcope commented Dec 1, 2023

I've made a demo using @mikeapp's manifest but cannot find accessible spots to pull the models in it from, so have just replaced them with the astronaut which results in odd outcomes. Can we standardize a demo with accessible models and expected outcome?

@JulieWinchester
Copy link
Contributor Author

JulieWinchester commented Jan 10, 2024

An X3D-based demo was created by @vincentmarchetti that loads a 3D model from a collection of IIIF API 3 manifests: https://codesandbox.io/p/github/vincentmarchetti/iiif3d_manifest_loader/main

It would be great if this could be expanded to work with one of our draft API version 4 manifests from https://github.com/IIIF/3d/tree/main/manifests

@vincentmarchetti
Copy link
Contributor

There is an extension of the codesandbox work available at https://spri-open-resources.s3.us-east-2.amazonaws.com/iiif3dtsg/viewer/index.html which loads manifests from two of the Basel conference ideas.

@JulieWinchester
Copy link
Contributor Author

Awesome, that sounds great! Can it be wrapped in a CodeSandbox?

@vincentmarchetti
Copy link
Contributor

vincentmarchetti commented Jan 10, 2024 via email

@JulieWinchester
Copy link
Contributor Author

Here is a simple demo running on CodeSandbox that uses Three.js to load the most basic draft manifest recipe, placing the astronaut model at origin: https://codesandbox.io/p/sandbox/threejs-model-origin-lcwnlk

This demo fulfills all of the "must" criteria from Experiments, as well as two of the "should" criteria - it loads manifests and the astronaut model fully from GitHub, no local files, and it runs on CodeSandbox. I will create a second version that fulfills the additional "should" and "could" criteria, including adding a dropdown element for selecting the input manifest and adding a textarea field for modifying the manifest, with dynamic reloading.

@vincentmarchetti
Copy link
Contributor

Here is another demo loading the manifest and astronaut model from github : https://codesandbox.io/p/sandbox/xenodochial-montalcini-fnfy9x . This implementation constructs an X3D scene from the manifest and rendes with x3dom viewer

@JulieWinchester
Copy link
Contributor Author

Phenomenal, thanks @vincentmarchetti! I'm excited to check out your implementation with manifesto, seems like great progress on the way to standardizing the manifest loading.

@gjcope
Copy link

gjcope commented Feb 12, 2024

Here is a quick Voyager demo loading the minimal manifest and satisfying the basic requirements. https://codesandbox.io/p/sandbox/voyager-annotations-demo-forked-l83l6w

I'm also interested in the manifest loading. It seems sometimes object properties are arrays and sometimes not?

@vincentmarchetti
Copy link
Contributor

vincentmarchetti commented Feb 12, 2024 via email

@vincentmarchetti
Copy link
Contributor

Here's a more complete Codesandbox project: https://codesandbox.io/p/github/vincentmarchetti/manifesto/3dtsg-dev-codesandbox that exposes the Typescript code for manifesto (+ 3D extensions). The manifesto loading webpage shows the basic model_origin.json example and the model_position.json manifesto from the 4_transform_and_position group.

@JulieWinchester
Copy link
Contributor Author

Here is a quick Voyager demo loading the minimal manifest and satisfying the basic requirements. https://codesandbox.io/p/sandbox/voyager-annotations-demo-forked-l83l6w

I'm also interested in the manifest loading. It seems sometimes object properties are arrays and sometimes not?

Hi Jamie! It seems like the link for this has gone dead. Can you link a new version of this demo?

@JulieWinchester
Copy link
Contributor Author

I've updated the Three.js demo. It's at a new URL now, but from this point on, this URL should continue to work as the demo progresses and evolves.

Code Sandbox: https://codesandbox.io/p/github/JulieWinchester/iiif-threejs-demo
GitHub: https://github.com/JulieWinchester/iiif-threejs-demo

The demo now uses manifesto to load IIIF manifests, allows for selecting between multiple manifests from a drop-down menu, and allows for importing manifest text, changing that text, and re-loading the manifest from the changed text. It supports both of the manifests currently in the first group (single model and single model with background color).

@gjcope
Copy link

gjcope commented Mar 20, 2024

Limitedly updated the Voyager demo at the same link (https://codesandbox.io/p/sandbox/voyager-annotations-demo-forked-l83l6w). UI courtesy of @JulieWinchester demo. ;)

Haven't had time to get manifesto to build but that will be the next step.

@gjcope
Copy link

gjcope commented Apr 10, 2024

The Voyager demo has been updated to integrate Manifesto into the build and includes support for all the group 4 manifests. Currently a little hackery to get scale to work and it is assuming uniform scale.

@vincentmarchetti
Copy link
Contributor

The 3d manifesto code has been added to the IIIF-Commons manifesto repostory as branch named draft3dapi , https://github.com/IIIF-Commons/manifesto/tree/draft3dapi ; and it includes built modules for npm dependency in the same way JulieWinchester/manifesto does. See the README file for details, including some non-backward compatible code changes

@vincentmarchetti
Copy link
Contributor

An x3dom - based manifesto viewer has been added to CodeSandbox at https://codesandbox.io/p/github/vincentmarchetti/iiif-x3dom-demo/main . As with the Voyager demo, the UI and manifesto / manifesto text handling code taken from @JulieWinchester demo, with gratitude.

This is a successor and replacement for https://codesandbox.io/p/github/vincentmarchetti/manifesto/3dtsg-dev-codesandbox ; that earlier project is going to be archived.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants