IIIF / 3d

Repository to help plan the 3d work with IIIF
https://iiif.github.io/3d/
18 stars 4 forks source link

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

Open JulieWinchester opened 1 year ago

JulieWinchester commented 1 year ago

In https://github.com/IIIF/3d/issues/11#issuecomment-1589971189, 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 commented 1 year ago

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

JulieWinchester commented 1 year ago

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 commented 1 year ago

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 commented 10 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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

vincentmarchetti commented 8 months ago

Yes. Only reason it is not yet is I've (or someone else) needs to configure the Typescript library the way codesandbox requires

On Jan 10, 2024, at 11:43 AM, Julie Winchester @.***> wrote:

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

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

JulieWinchester commented 8 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

I've noted the same thing about the object properties being either object, or arrays holding a single object. It seems there are all kinds of javascript sugar to handle that, but the only when I remember is if (Array.isArray(property)) then prop = prop[0];

On Feb 12, 2024, at 2:16 PM, Jamie Cope @.***> wrote:

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?

— Reply to this email directly, view it on GitHub https://github.com/IIIF/3d/issues/28#issuecomment-1939376008, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2VL5PCSQW27WOAYJAVOYTYTJTALAVCNFSM6AAAAAA2H2TA3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZZGM3TMMBQHA. You are receiving this because you were mentioned.

vincentmarchetti commented 7 months ago

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 commented 7 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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.