[x3d-public] HAnim implementation minutes 2 July 2020, substantial progress; HAnimHumanoid info as MetadataSet

Don Brutzman brutzman at nps.edu
Sun Jul 5 09:26:33 PDT 2020


... continuing with one more good step forward.

BLUF: X3D metadata structures in XML can be much better than before.

----

5. *HAnimHumanoid info as MetadataSet*

Long-standing issue has been the great difficult effort needed to create, parse, modify and use metadata information associated with an HAnim Humanoid.  One big long MFString array of name=value pairs is error prone and complex to parse.

Baseline metadata structures for X3D3 HAnimHumanoid are found in the 'info' field, described at

[7] HAnim2, Part 1 Architecture, 6 Object interfaces, 6.2 Humanoid
     https://www.web3d.org/documents/specifications/19774/V2.0/Architecture/ObjectInterfaces.html#Humanoid

[8] X3D4 Tooltips, HAnimHumanoid node, info field
     https://www.web3d.org/x3d/tooltips/X3dTooltips.html#HAnimHumanoid.info

Many good examples are found in our new HumanoidAnimation Example Archive.  Here are metadata excerpts from X3D3 HAnim1 and X3D4 HAnim2 paired versions of the Jin model:

[9]  X3D Example Archives: Humanoid Animation, Legacy, Korean Character 01 Jin (HAnim1)
      https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/KoreanCharacter01JinIndex.html

========================================================
<HAnimHumanoid DEF='hanim_Jin' name='Jin' scale='0.0225 0.0225 0.0225' version='1.0'
  info='"authorName=Chul Hee Jung and Myeong Won Lee" "authorEmail=myeongwonlee at gmail.com"
        "creationDate=31 March 2011" "humanoidVersion=1.0" "gender=female" "height=1.5"'>
========================================================

[10] X3D Example Archives: Humanoid Animation, Characters, Korean Character 01 Jin (HAnim2)
      https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/KoreanCharacter01JinIndex.html

X3dTidy.xslt now takes such HAnimHumanoid info and splits the name=value pairs into MetadataString values within a single MetadataSet.  Conversion of valid information is lossless.

========================================================
<HAnimHumanoid DEF='hanim_Jin' name='Jin' scale='0.0225 0.0225 0.0225' version='2.0'>

   <!-- HAnimHumanoid original info='"authorName=Chul Hee Jung and Myeong Won Lee" "authorEmail=myeongwonlee at gmail.com"
        "creationDate=31 March 2011" "humanoidVersion=2.0" "gender=female" "height=1.5"' -->

   <MetadataSet name='HAnimHumanoid.info' containerField='metadata'
      reference='https://www.web3d.org/documents/specifications/19774/V2.0/Architecture/ObjectInterfaces.html#Humanoid'>

     <MetadataString name='authorName' value='Chul Hee Jung and Myeong Won Lee'/>
     <MetadataString name='authorEmail' value='myeongwonlee at gmail.com'/>
     <MetadataString name='creationDate' value='31 March 2011'/>
     <MetadataString name='gender' value='female'/>
     <MetadataString name='height' value='1.5'/>
     <MetadataString name='humanoidVersion' value='2.0'/>

   </MetadataSet>
   <!-- remainder of Humanoid follows -->
========================================================

Observations:

a. This is easier for someone to read,
b. This is much easier for any program to parse,
c. This is much much easier to validate and fix metadata information errors,
d. Eliminating complications encourages metadata production by authors and tools,
e. Including MetadataSet reference url makes syntax + semantics of values unambiguous.

This is an example solution to multiple issues that are currently active for this topic.

[11] Mantis 1300: Consistently unify metadata model for GeoMetadata and HAnimHumanoid info array
      https://www.web3d.org/member-only/mantis/view.php?id=1300

Metadata clarity and robustness by avoiding superfluous quotation marks surrounding each value (over and over, redundantly, endlessly, sheesh) is also pretty obvious.  The vast majority of metadata on the Web (and certainly in HTML) is captured as name=value pairs, not name=array structures.

[12] Mantis 1320: relax requirement for quoted single-string value in MFString array
      https://www.web3d.org/member-only/mantis/view.php?id=1320

Metadata clarity and conciseness by avoiding superfluous containerField expressions in the XML encoding is also pretty obvious.  No change in object model is necessary, this just refers to XML encoding for X3D.

[13] Mantis 1283: XML encoding: change X3D4 MetadataSet default containerField='value' ?
      https://www.web3d.org/member-only/mantis/view.php?id=1283

Of further potential interest is that this approach is fully backwards compatible with X3D3, since there is no problem adding a MetadataSet child.  So we can safely adopt this as a "best practice" in X3D3 and deprecate the HAnimHumanoid info field in X3D4.

So, this simple example looks like a big step forward towards convenient-yet-strict handling of metadata for X3D HAnim models.  These patterns are also repeatable for CAD, printing, scanning, medical, geospatial, heritage, etc. etc.

Hopefully others think so as well.  I think we have tightened the metadata design pattern as far as it can go.

TODO continuing improvement and refinements:
- similar conversion support for GeoMetadata in X3dTidy.
- similar conversion utilities in X3DJSAIL Java, X3DPSAI Python.
- Mantis issue review and resolution.
- Semantic Web query of contained model metadata using X3D Ontology and SPARQL.

As ever: all review, feedback, problems, improvements and implementation progress are welcome.

Have fun with X3D Metadata!  8)

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