[x3d-public] conversion of glTF metadata to X3D metadata; . versus _ in names

Andreas Plesch andreasplesch at gmail.com
Mon Oct 9 11:02:00 PDT 2023


Hi Don,

Thank you for the heads up. So far the discussion was on the name
field of Metadata nodes but DEF names will be relevant for the glTF
metadata extension packets. It may make sense to align rules for name
field values with rules for DEF names although not necessary. It seems
natural to use the same name for both DEF and name if both are
provided. Thinking ahead, I think, for packets this means names like
"glTFSceneName_packet_0". Packets are referenced by index.

Best,
-Andreas


On Mon, Oct 9, 2023 at 11:40 AM Brutzman, Donald (Don) (CIV)
<brutzman at nps.edu> wrote:
>
> Seems like an authoring-style preference but it actually has an interoperability consideration.
>
>
>
> If these names might be used as DEF identifiers, then it turns out to be important to avoid using a dot (.) notation scheme.  That is because, when converted to equivalent ClassicVRML or VRML97, that character will thwart proper execution of ROUTE statement which use it.
>
>
>
> X3D-Edit has option of appending Script nodes as part of a tracing feature, appending debug labels to DEF names for predictability while avoiding other name collisions.  Originally those were using "." to create new names, now using "_" as the connecting character.
>
>
>
> Have recently added warnings to X3D-Edit when “.” gets used.  Continuing, will further update X3D Tooltips, X3D Schematron QA, and X3D Tidy cleanups too.  Will further update our collected hints on these issues.
>
>
>
> X3D Scene Authoring Hints: Naming Conventions
> https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#NamingConventions
>
>
>
> I think this consideration only applies to DEF names, not seeing any problem with Metadata node name fields.
>
>
>
> all the best, Don
>
> --
>
> Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu
>
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149
>
> X3D graphics, virtual worlds, navy robotics https://faculty.nps.edu/brutzman
>
>
>
> -----Original Message-----
> From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of Andreas Plesch
> Sent: Monday, October 9, 2023 7:48 AM
> To: Holger Seelig <holger.seelig at yahoo.de>
> Cc: X3D <x3d-public at web3d.org>
> Subject: Re: [x3d-public] conversion of glTF metadata to X3D metadata
>
>
>
> Hi Holger,
>
>
>
> Thank you for your feedback. I did not think too much about the name for the Metadata node which holds the scene.extras json value.
>
>
>
> To me "scene.extras" is more of a programming convention whereas the value of a name string should be more abstract, or descriptive in a linguistic sense. So a dot would mean a full stop which would not make a lot of sense. But I can see that this is a rather aesthetic consideration, and that a direct json path style name has its own benefits by following very closely the glTF source..
>
>
>
> Let us know what you think,
>
>
>
> Cheers, Andreas
>
>
>
> On Mon, Oct 9, 2023 at 7:25 AM Holger Seelig <holger.seelig at yahoo.de> wrote:
>
> >
>
> > In X_ITE I also create a WorldInfo, but parse only the toplevel metadata so far.
>
> >
>
> > I like the way you described it, but why do you translate 'scene.extras' to 'scene_extras'? I would leave it as it is.
>
> >
>
> > Holger
>
> >
>
> > --
>
> > Holger Seelig
>
> > Leipzig, Germany
>
> >
>
> > holger.seelig at yahoo.de
>
> > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcrea
>
> > te3000.github.io%2Fx_ite%2F&data=05%7C01%7Cbrutzman%40nps.edu%7Ccf4f0e
>
> > 97804a4fcea0bf08dbc8d6f0b9%7C6d936231a51740ea9199f7578963378e%7C0%7C0%
>
> > 7C638324597718881372%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQI
>
> > joiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=EBmxnT
>
> > 5bwmCp5%2BnWcoTZT3ttFfXIWF8lNjsRGR0%2FupM%3D&reserved=0
>
> >
>
> > Am 09.10.2023 um 00:14 schrieb Andreas Plesch <andreasplesch at gmail.com>:
>
> >
>
> > glTF can contain rich metadata, on the toplevel and very targeted at
>
> > any sublevel.
>
> >
>
> > At any level, there is an "extras" property which can contain any
>
> > value including objects with arbitrary key:value pairs.
>
> >
>
> > At the toplevel, there is an asset object which has a set of defined
>
> > keys such as "copyright" (as well as its own "extras" property).
>
> >
>
> > In addition to this unstructured metadata for core glTF, there is a
>
> > metadata extension for more structured metadata, extensible through
>
> > namespaces:
>
> >
>
> > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
>
> > ub.com%2FKhronosGroup%2FglTF%2Fblob%2Fmain%2Fextensions%2F2.0%2FKhrono
>
> > s%2FKHR_xmp_json_ld%2FREADME.md&data=05%7C01%7Cbrutzman%40nps.edu%7Ccf
>
> > 4f0e97804a4fcea0bf08dbc8d6f0b9%7C6d936231a51740ea9199f7578963378e%7C0%
>
> > 7C0%7C638324597718881372%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL
>
> > CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IX
>
> > 8lXkW3K1nuBhZaurJlA6Qz0Db%2BYqjj6bicwxDg4%2FM%3D&reserved=0
>
> >
>
> > There are many ways to map glTF metadata to X3D metadata. How should
>
> > we manage this ? It may make sense to coordinate systematic behaviour.
>
> >
>
> > x3dom uses the WorldInfo node for toplevel metadata:
>
> > - asset object properties go into the info field as key:value string pairs.
>
> > - asset.extras go into a WorldInfo MetadataSet "asset_extras"
>
> > - scene.extras  go into a WorldInfo MetadataSet "scene_extras"
>
> >
>
> > In addition, "extras" at lower levels go into MetadataSets of
>
> > corresponding nodes, using the json value types for Metadata types.
>
> >
>
> > How do other browsers translate "extras" ?
>
> >
>
> > x3dom should also support the KHR_xmp_json_ld extension, by staying
>
> > very close and literal to the glTF data.
>
> >
>
> > One feature of the extension is that sets (packets) of metadata are
>
> > defined once at the toplevel, and then referenced (instantiated) from
>
> > any other level. This seems to map well into DEF/USE. A large
>
> > "KHR_XMP_GLTF" root MetadataSet would contain all metadata and just
>
> > referenced by USE from Shapes/Material etc. I think this could work
>
> > well. I think json property names can become Metadata name values, and
>
> > json value types can be mapped into Metadata types.
>
> >
>
> > If there have been thoughts or attempts to implement the glTF metadata
>
> > extension, any ideas or feedback would be great. Would it be useful to
>
> > start to think about a xml Metadata schema which follows the glTF
>
> > extension requirements and recommendations ? This may not be feasible
>
> > due to the extensible nature of the extension..
>
> >
>
> > Cheers, Andreas
>
> >
>
> > --
>
> > Andreas Plesch
>
> > Waltham, MA 02453
>
> >
>
> > _______________________________________________
>
> > x3d-public mailing list
>
> > x3d-public at web3d.org
>
> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
> >
>
> >
>
>
>
>
>
> --
>
> Andreas Plesch
>
> Waltham, MA 02453
>
>
>
> _______________________________________________
>
> x3d-public mailing list
>
> x3d-public at web3d.org
>
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org



-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list