[x3d-public] HAnim implementation minutes 2 July 2020, substantial progress

Don Brutzman brutzman at nps.edu
Sat Jul 4 22:40:35 PDT 2020


Attendees: John Carlson, Joe Williams, Don Brutzman

No members-only information is present in these minutes & progress report.

We typically meet in Web3D Zoom room Thursday afternoons, 1300-1430 pacific.

----

1. *Examples Archive*

We reviewed numerous errors and warnings in 66 example scenes, all ported from the Basic examples archive.

[1] HumanoidAnimation X3D Examples Archive
     https://www.web3d.org/x3d/content/examples/HumanoidAnimation

Validation with X3D XML Schema and DTD is working well.

We have been focusing on X3D Schematron warnings and X3dTidy.xslt corrections.  Recent checks have included tests autogenerated from X3DUOM information on HAnim nodes, field types, accessTypes, allowed names, expected parent-child relationships, and allowed alias names.

Build logs and (most importantly) regression-testing outputs are found at

[2] HumanoidAnimation build log
     https://www.web3d.org/x3d/content/examples/HumanoidAnimation/build.log.txt

[3] HumanoidAnimation regression-testing log, X3D Schematron and X3D Tidy stylesheets
     https://www.web3d.org/x3d/content/examples/HumanoidAnimation/build.X3dSchematronX3dTidy.log.txt

Numerous discussion points clarified test relevance and focus.  Subsequent progress follows.

a. Although some warnings may be considered excessive, we decided to keep everything so that these checks can continue to improve.  Heuristic: the worst errors are the ones with no indication that a problem is occurring.

b. Left/right asymmetry warnings: silenced if only one side is present.

c. center='0 0 0' is a common error but it is also the default.  Usually a value must be provided, each center is relative to the humanoid coordinate system, NOT the local fram of the HAnimJoint or HAnimSegment or HAnimSIte.

d. TODO: continued look at automatically upgrading HAnim1 names to HAnim2 preferred name if an alias is provided.  Am expecting we will add that correction is it leads to better interoperability of animations.  Considering how/whether to nevertheless note original name, perhaps in the description field.

e. HAnimSite names are supposed to end with suffix _pt _tip (end effector) or _view (viewpoint).  Now appending _pt if other values not provided.

f. Better diagnostics of humanoid_root

g. Fixed hundreds of naming inconsistencies/glitches through a mix of rules, corrections and editing.  More remain but we are getting much closer to strict compliance, and logs are much cleaner.

h. Improved addition/replacement/removal of USE nodes is occurring under HAnimHumanoid.

Also now sorting USE nodes so that left and right values alternate, facilitating troubleshooting of missing or misspelled names.  Example:

[...]
<HAnimJoint USE='Joe_vt7' containerField='joints'/>
<HAnimJoint USE='Joe_vt8' containerField='joints'/>
<HAnimJoint USE='Joe_vt9' containerField='joints'/>
<HAnimJoint USE='Joe_l_acromioclavicular' containerField='joints'/>
<HAnimJoint USE='Joe_r_acromioclavicular' containerField='joints'/>
<HAnimJoint USE='Joe_l_ankle' containerField='joints'/>
<HAnimJoint USE='Joe_r_ankle' containerField='joints'/>
<HAnimJoint USE='Joe_l_elbow' containerField='joints'/>
<HAnimJoint USE='Joe_r_elbow' containerField='joints'/>
<HAnimJoint USE='Joe_l_eyeball_joint' containerField='joints'/>
<HAnimJoint USE='Joe_r_eyeball_joint' containerField='joints'/>
<HAnimJoint USE='Joe_l_eyebrow_joint' containerField='joints'/>
<HAnimJoint USE='Joe_r_eyebrow_joint' containerField='joints'/>
<HAnimJoint USE='Joe_l_eyelid_joint' containerField='joints'/>
<HAnimJoint USE='Joe_r_eyelid_joint' containerField='joints'/>
<HAnimJoint USE='Joe_l_hip' containerField='joints'/>
<HAnimJoint USE='Joe_r_hip' containerField='joints'/>
<HAnimJoint USE='Joe_l_index0' containerField='joints'/>
<HAnimJoint USE='Joe_r_index0' containerField='joints'/>
<HAnimJoint USE='Joe_l_index1' containerField='joints'/>
<HAnimJoint USE='Joe_r_index1' containerField='joints'/>
etc.

i. Troubleshooting technique: when names are confusing or garbled, or duplicate name/DEF pairs are confounding, then looking at parent node often helps disambiguate what the correct value is.

----

2. *Specification questions*

a. Legacy question: wondering if we need HAnim component level corresponding to higher LOAs?  Am thinking no, because no special player capabilities are required.  Right now we have level 2 for HAnimMotion and level 1 for everything else in HAnim2, seems sufficient and a good evolution from HAnim1.

----

b. Noted mismatched field names, expecting to correct them in near future.

[4] Mantis 1314: X3D4 HAnimHumanoid spelling of skinBindingCoords, skinBindingNormals
     https://www.web3d.org/member-only/mantis/view.php?id=1314

[4] Mantis 1315: HAnim2 Humanoid spelling of skinBindingCoords, skinBindingNormals should be singular
     https://www.web3d.org/member-only/mantis/view.php?id=1315

=====================
HAnim2 Humanoid spelling of skinBindingCoords, skinBindingNormals is inconsistent with spelling of skinCoord, skinNormal. Inclusion of "s" seems mistaken since these are all SFNode fields.

Proposed remedy: avoid "s" suffix in X3D Architecture, submit erratum to HAnim2 abstract reference model as a proposed corrigendum to ISO. This would be submitted to SC24 as a change document.
=====================

c. Editorial omission, corrections underway:

[5] Mantis 1322: X3D4 HAnimMotion node is missing startFrame, endFrame fields
     https://www.web3d.org/member-only/mantis/view.php?id=1322

----

3. *Generating the HAnim model skeleton as an ASCII-art text tree*

a. Really important references in the HAnim2 specification are the text trees showing Joint/Segment pairs and hierarchy.  Check it out:

[6] HAnim2 part 1, 4.9.6 Hierarchy
     https://www.web3d.org/documents/specifications/19774/V2.0/Architecture/concepts.html#Hierarchy

> 4.9.6.1 LOA‑1 hierarchy
> 
> The LOA‑1 hierarchy forming the basic set of Joint objects is specified in Figure 4.10 with the segment names listed after the joints to which they are attached.
> 
> humanoid_root : sacrum
>   sacroiliac : pelvis
>   | l_hip : l_thigh
>   | | l_knee : l_calf
>   | |   l_talocrural : l_talus
>   | |     l_metatarsophalangeal_2 : l_tarsal_proximal_phalanx_2
>   | r_hip : r_thigh
>   |   r_knee : r_calf
>   |     r_talocrural : r_talus
>   |       r_metatarsophalangeal_2 : r_tarsal_proximal_phalanx_2
>   vl5 : l5
>     skullbase : skull
>     l_shoulder : l_upperarm
>     | l_elbow : l_forearm
>     |   l_radiocarpal : l_carpal
>     r_shoulder : r_upperarm
>       r_elbow : r_forearm
>         r_radiocarpal : r_carpal
> 
> Figure 4.10 — Basic set of Joint:Segment hierarchy for LOA‑1 (joint name : segment name)

----

b. Inspired by these diagrams, X3dTidy now produces diagrams for each HAnim model by walking the tree.

This _really_ helps debugging!  Example excerpt:

C:\x3d-code\www.web3d.org\x3d\content\examples\HumanoidAnimation/Characters//KoreanCharacter01Jin.x3d processing with X3dTidy.xslt stylesheet for tidied-up .x3d
=============================================================================
HAnimHumanoid skeleton holds HAnimJoint : HAnimSegment pairs, names follow...
=============================================================================
Jin
   humanoid_root : sacrum
     l_hip : l_thigh
     | l_knee : l_calf
     |   l_ankle : l_hindfoot
     |     l_midtarsal : l_middistal
     r_hip : r_thigh
     | r_knee : r_calf
     |   r_ankle : r_hindfoot
     |     r_midtarsal : r_middistal
     sacroiliac : pelvis
       l_shoulder : l_upperarm
       | l_elbow : l_forearm
       |   l_wrist : l_hand
       r_shoulder : r_upperarm
       | r_elbow : r_forearm
       |   r_wrist : r_hand
       vl5 : l5
         skullbase : skull
=============================================================================

wow.  we've had this model for years without knowing if it is exactly correct since checking monster trees is challenging.  compare this diagram to just-preceding tree excerpted from specification... uh oh, it does not match the LOA-1 hierarchy!  The Jin model has hips as peers of sacroiliac, rather than children.

We're turning a corner here, proper understanding to match low-level debugging of models appears to be emerging.  8)

Myeong Won Lee, I believe all of your models and corresponding animations have this topological variation from HAnim standard skeleton.  It will be interesting to see if we can straighten these out in a simple manner.

----

c. Here is a longer example.  Joe, does this actually match LOA-3, for Joint nodes at least?

C:\x3d-code\www.web3d.org\x3d\content\examples\HumanoidAnimation\Characters\JoeKick.x3d validation using X3D Schematron rules
X3D version 4.0 is experimental and under development, focused on HTML5/DOM interoperabiliity. [/X3D, diagnostic]
<meta name='TODO' content='Record information about skin coordinates (found in comment at end of scene) as a structured MetadataSet containing MetadataString nodes'/>[/X3D/head/meta[7], diagnostic]

====================================================================================================================[/X3D/Scene/Group[1]/HAnimHumanoid, diagnostic]
<HAnimHumanoid DEF='Joe_Human' name='Human'/> node count(HAnimJoint)           within skeleton hierarchy        = 94[/X3D/Scene/Group[1]/HAnimHumanoid, diagnostic]
<HAnimHumanoid DEF='Joe_Human' name='Human'/> node count(HAnimSegment)         within skeleton hierarchy        = 1[/X3D/Scene/Group[1]/HAnimHumanoid, diagnostic]
<HAnimHumanoid DEF='Joe_Human' name='Human'/> node count(HAnimSite)            within HAnimHumanoid             = 1[/X3D/Scene/Group[1]/HAnimHumanoid, diagnostic]
<HAnimHumanoid DEF='Joe_Human' name='Human'/> node count(HAnimSite//Viewpoint) within skeleton hierarchy        = 1[/X3D/Scene/Group[1]/HAnimHumanoid, diagnostic]
<HAnimHumanoid DEF='Joe_Human' name='Human'/> node count(HAnimDisplacer)       within skeleton hierarchy        = 1[/X3D/Scene/Group[1]/HAnimHumanoid, diagnostic]
<HAnimHumanoid DEF='Joe_Human' name='Human'/> node count(<HAnimJoint   USE='*' containerField = 'joints'/>      = 94[/X3D/Scene/Group[1]/HAnimHumanoid, diagnostic]
<HAnimHumanoid DEF='Joe_Human' name='Human'/> node count(<HAnimSegment USE='*' containerField = 'segments'/>    = 1[/X3D/Scene/Group[1]/HAnimHumanoid, diagnostic]
<HAnimHumanoid DEF='Joe_Human' name='Human'/> node count(<HAnimSite    USE='*' containerField = 'sites'/>       = 1[/X3D/Scene/Group[1]/HAnimHumanoid, diagnostic]
<HAnimHumanoid DEF='Joe_Human' name='Human'/> node count(<HAnimSite    DEF='*' name ends with '_view'/>         = 0[/X3D/Scene/Group[1]/HAnimHumanoid, diagnostic]
====================================================================================================================[/X3D/Scene/Group[1]/HAnimHumanoid, diagnostic]
<HAnimSite DEF='Joe_RootFront_view' name='RootFront_view'/> is not a recognized name for HAnimSite in HAnim2[/X3D/Scene/Group[1]/HAnimHumanoid/HAnimJoint[1]/HAnimSegment/HAnimSite, warning]
<HAnimJoint DEF='Joe_l_ankle' name='l_ankle'/> is not a recognized name for HAnimJoint in HAnim2[/X3D/Scene/Group[1]/HAnimHumanoid/HAnimJoint[1]/HAnimJoint[1]/HAnimJoint[1]/HAnimJoint/HAnimJoint, warning]
<HAnimJoint DEF='Joe_l_ankle' name='l_ankle'/> is an HAnimJoint alias for 'l_talocrural', recommend updating model[/X3D/Scene/Group[1]/HAnimHumanoid/HAnimJoint[1]/HAnimJoint[1]/HAnimJoint[1]/HAnimJoint/HAnimJoint, warning]
<HAnimJoint DEF='Joe_l_subtalar' name='l_subtalar'/> is not a recognized name for HAnimJoint in HAnim2[/X3D/Scene/Group[1]/HAnimHumanoid/HAnimJoint[1]/HAnimJoint[1]/HAnimJoint[1]/HAnimJoint/HAnimJoint/HAnimJoint, warning]
<HAnimJoint DEF='Joe_l_subtalar' name='l_subtalar'/> is an HAnimJoint alias for 'l_tarsometatarsal_2', recommend updating model[/X3D/Scene/Group[1]/HAnimHumanoid/HAnimJoint[1]/HAnimJoint[1]/HAnimJoint[1]/HAnimJoint/HAnimJoint/HAnimJoint, warning]
<HAnimJoint DEF='Joe_l_midtarsal' name='l_midtarsal'/> is not a recognized name for HAnimJoint in HAnim2[/X3D/Scene/Group[1]/HAnimHumanoid/HAnimJoint[1]/HAnimJoint[1]/HAnimJoint[1]/HAnimJoint/HAnimJoint/HAnimJoint/HAnimJoint, warning]
<HAnimJoint DEF='Joe_l_midtarsal' name='l_midtarsal'/> is an HAnimJoint alias for 'l_metatarsophalangeal_2', recommend updating model[/X3D/Scene/Group[1]/HAnimHumanoid/HAnimJoint[1]/HAnimJoint[1]/HAnimJoint[1]/HAnimJoint/HAnimJoint/HAnimJoint/HAnimJoint, warning]
[...]

note that we can likely clean up names when transitioning models from HAnim1 to HAnim2.  Will continue working at deliberate pace with Joe on these improvements, it is better to produce rules and correction heuristics as we go, rather than simply "fixing" an apparent error that simply reemerges when the next model comes along.

next check X3dTidy...
C:\x3d-code\www.web3d.org\x3d\content\examples\HumanoidAnimation/Characters//JoeKick.x3d processing with X3dTidy.xslt stylesheet for tidied-up .x3d
=============================================================================
HAnimHumanoid skeleton holds HAnimJoint : HAnimSegment pairs, names follow...
=============================================================================
Human
   humanoid_root : sacrum
   | sacroiliac
   | | l_hip
   | | | l_knee
   | | |   l_ankle
   | | |     l_subtalar
   | | |       l_midtarsal
   | | |         l_metatarsal
   | | r_hip
   | |   r_knee
   | |     r_ankle
   | |       r_subtalar
   | |         r_midtarsal
   | |           r_metatarsal
   | vl5
   |   vl4
   |     vl3
   |       vl2
   |         vl1
   |           vt12
   |             vt11
   |               vt10
   |                 vt9
   |                   vt8
   |                     vt7
   |                       vt6
   |                         vt5
   |                           vt4
   |                             vt3
   |                               vt2
   |                                 vt1
   |                                   vc7
   |                                     vc6
   |                                     | vc5
   |                                     |   vc4
   |                                     |     vc3
   |                                     |       vc2
   |                                     |         vc1
   |                                     |           skullbase
   |                                     |             l_eyelid_joint
   |                                     |             l_eyeball_joint
   |                                     |             l_eyebrow_joint
   |                                     |             r_eyelid_joint
   |                                     |             r_eyeball_joint
   |                                     |             r_eyebrow_joint
   |                                     |             temporomandibular
   |                                     l_sternoclavicular
   |                                     | l_acromioclavicular
   |                                     |   l_shoulder
   |                                     |     l_elbow
   |                                     |       l_wrist
   |                                     |         l_thumb1
   |                                     |         | l_thumb2
   |                                     |         |   l_thumb3
   |                                     |         l_index0
   |                                     |         | l_index1
   |                                     |         |   l_index2
   |                                     |         |     l_index3
   |                                     |         l_middle0
   |                                     |         | l_middle1
   |                                     |         |   l_middle2
   |                                     |         |     l_middle3
   |                                     |         l_ring0
   |                                     |         | l_ring1
   |                                     |         |   l_ring2
   |                                     |         |     l_ring3
   |                                     |         l_pinky0
   |                                     |           l_pinky1
   |                                     |             l_pinky2
   |                                     |               l_pinky3
   |                                     r_sternoclavicular
   |                                       r_acromioclavicular
   |                                         r_shoulder
   |                                           r_elbow
   |                                             r_wrist
   |                                               r_thumb1
   |                                               | r_thumb2
   |                                               |   r_thumb3
   |                                               r_index0
   |                                               | r_index1
   |                                               |   r_index2
   |                                               |     r_index3
   |                                               r_middle0
   |                                               | r_middle1
   |                                               |   r_middle2
   |                                               |     r_middle3
   |                                               r_ring0
   |                                               | r_ring1
   |                                               |   r_ring2
   |                                               |     r_ring3
   |                                               r_pinky0
   |                                                 r_pinky1
   |                                                   r_pinky2
   |                                                     r_pinky3

----

d. Future diagnostics need to be designed for assessing Level of Articulation (LOA) 1, 2, 3, 4 for HAnim2 models.

----

4. *Feature request and implementation planning*

X3DOM seems to be handling X3D version='4.0' HAnimHumanoid version='2.0' and <component level='1' name='HAnim'/> satisfactorily.

Hoping other X3D players can support these capabilities.

The examples provided in [1] are now mature enough that testing on most HAnim1/HAnim2 capabilities can proceed.

We still have more work to do regarding HAnimMotion, including potential refactoring into multiple nodes for better support of DEF/USE as proposed by Doug Sanden.

Implementers are encouraged to check scene validation, warnings and regression-test build logs when questionable results occur.

----

All feedback welcome, we are now "ready to receive" and continuing steady progress.

Have fun with X3D4 HAnim2!  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