[x3d-public] considering general conversion of metadata

Michalis Kamburelis michalis.kambi at gmail.com
Fri Apr 7 14:45:09 PDT 2017


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

  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:)

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



More information about the x3d-public mailing list