[x3d-public] considering general conversion of metadata

Don Brutzman brutzman at nps.edu
Mon Apr 10 07:12:47 PDT 2017


On 4/7/2017 2:45 PM, Michalis Kamburelis wrote:
> Don Brutzman wrote:
>> As noted a few times before, Metadata design issues are shared by CAD
>> Heritage and Medical groups.  So getting a general technique is valuable
>> and important.
>
> 1. Metadata is also very useful for games:) Metadata allows to pass
> information about objects that cannot be expressed using X3D nodes. (And
> sometimes it's unhandy to define new nodes with EXTERNPROTO just to
> carry this extra information.)
>
>   E.g. when generating X3D from Blender, we could export Blender's
> "Custom Properties" to X3D metadata. This is how you define custom
> metadata in Blender:
> https://docs.blender.org/manual/de/dev/data_system/custom_properties.html

very interesting.  of further note is that it appears to utilize a Python mechanism for dictionaries:

https://docs.python.org/3/tutorial/datastructures.html#dictionaries


>   This way the level designer could write in Blender something
> application-specific (like the name of a monster to be spawned here, for
> a game). And it would work -- without any need for adjusting Blender X3D
> exporter, or adjusting the game engine. The data is "passed through",
> from the level designer using Blender to the application-specific code.
>
>   I hope to improve the Blender X3D exporter some day to enable this:)

cool.  wondering, is there a Blender example with metadata in Custom Properties that we might use to show a mapping to MetadataSet?

it would be good to compare source-to-source to explore a mapping

> 2. Collada has a similar feature: the <extra> element. See
> https://www.khronos.org/files/collada_spec_1_5.pdf page 75 for a
> description and some examples. Roughly,
>
> - The <extra> element in Collada is like our MetadataGroup.
>
> - Inside, you place <technique> (if multiple <technique> are present,
> the processor usually should choose only the one "matching" looking at
> it's "profile").
>
> - Inside <technique>, you place *any well-formed XML data*. Quoting from
> the specification (https://www.khronos.org/files/collada_spec_1_5.pdf ,
> page 184 ):
>
>   """
>   The <technique> element can contain any well-formed XML data. Any data
> that can be, will be validated against the COLLADA schema. It is also
> possible to specify another schema to use for validating the data.
> Anything else will also be considered legal, but cannot actually be
> validated.
>   """
>
>   I like the X3D approach with MetadataXxx nodes more than the Collada
> <extra>, BTW:) Allowing "any well-formed XML data" in Collada means that
> the Collada doesn't try to enforce any structure inside this "extra
> metadata". A generic Collada reader cannot represent this in any other
> way than "custom XML elements with attributes". In X3D, the MetadataXxx
> nodes give a little more awareness of what is encoded there.
>
> Regards,
> Michalis

agreed here, a little bit of XML structure certainly helps but that is not enough to (a) validate, (b) look up properties, or (c) share.

am hoping that by coming up with conventions for X3D metadata, we can bidirectionally map without ambiguity to a variety of structured metadata.

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 http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list