[x3d-public] An annotations example update

Vincent Marchetti vmarchetti at kshell.com
Tue Oct 11 07:38:14 PDT 2022


Recap:

The IIIF 3D Technical Study Group is interested in the topic of annotations to 3D models that can be written and read from a data source distinct from the 3D model itself.

Ed Silverton has prepared a demo of this idea demonstrated at https://codesandbox.io/s/model-viewer-annotations-demo-yqxggz , for which the 3D model is a glb file
and the data source is a separate HTML text area input. Ed's example includes the ability to author annotations using HTML mouse events.

I have forked Ed's example to https://codesandbox.io/s/model-viewer-annotations-demo-forked-ihynhc for which I have preloaded the
text area with json to create two annotations. Clicking the "Set Annotations" button should generate annotations in the 3D view area.

My goal is to demonstrate a similar capability with an X3D scene and viewed in a X3D viewer, in particular X3DOM and potentially view3dscene,
as these browser have the ability to inline glb files according to the X3DV4 spec.

I have created a beginning scene showing the same astronaut glb file, it can be seen at https://codesandbox.io/s/github/vincentmarchetti/x3d-remote-annotation

The next step will be to create the annotations in X3D using this scene as an example: https://www.kshell.com/pages/webinar_20220531/coral/coral_glb_inline.html
and then, finally, to demonstrate building these annotations dynamically from json input using either HTML scripting (in X3DOM) or CastleScript in view3dscene.


There is a significant  difference in the annotations displayed in Ed Silvertons example and in the X3D example.
In the original, the annotations are created using the annotation feature of model-viewer, as documented at https://modelviewer.dev/examples/annotations/index.html
The annotations are 2D HTML elements which are overlaid on the 3D viewing area and dynamically moved to 'track' the projected position of the 'hotpoint' as defined in 3D space.

In the X3D example of the coral model, https://www.kshell.com/pages/webinar_20220531/coral/coral_glb_inline.html the annotations are elements in the same 3D space as the model.
The Billboard node is used so that the annotations remain oriented toward the viewer, but you can see that the annotations move away and toward the viewer as the viewpoint changes, whereas
in the model-viewer implementation the annotations just slide around in the 2D plane.

Vince Marchetti




More information about the x3d-public mailing list