Post

HAnimHumanoid

Overview

The HAnimHumanoid node is used to: (a) store references to the joints, segments, sites, skeleton, optional skin, and fixed viewpoints, (b) serve as a container for the entire humanoid, (c) provide a convenient way of moving the humanoid through its environment, and (d) store human-readable metadata such as name, version, author, copyright, age, gender and other information. HAnimHumanoid contains a skeleton consisting of HAnimJoint, HAnimSegment and HAnimSite nodes. HAnimHumanoid can also contain an optional skin consisting of an IndexedFaceSet mesh with corresponding skinCoord Coordinate or CoordinateDouble vertices and skinNormal Normal vectors.

The HAnimHumanoid node belongs to the HAnim component and requires at least level 1, its default container field is children. It is available from X3D version 3.0 or higher.

Hierarchy

1
2
3
+ X3DNode
  + X3DChildNode
    + HAnimHumanoid (X3DBoundedObject)*

* Derived from multiple interfaces.

Fields

SFNode [in, out] metadata NULL [X3DMetadataObject]

Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.

Hint

SFString [in, out] version “2.0”

HAnimHumanoid version, where allowed value is 2.0 for final ISO 19774 version 2019.

Hint

  • Default HAnimHumanoid version is 1.0 for X3D version 3, and HAnimHumanoid required version is 2.0 for X3D version 4.

Warnings

  • No other values are allowed for strict validation.
  • Prior developmental versions of HAnim nodes, such as version 1 of standardized ISO 19774 version 2006, might not validate correctly due to small changes in the contained-node content model, so conversion of such models is recommended.

SFString [in, out] description “”

Author-provided prose that describes intended purpose of this node.

Hint

  • Many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as & for & ampersand character, or " for “ quotation-mark character).

SFString [in, out] name “”

Unique name attribute must be defined so that each HAnimHumanoid node in a scene can be identified at run time for animation purposes.

Hints

Warning

  • name field is not included if this instance is a USE node, in order to avoid potential mismatches.

MFString [in, out] info [ ]

Contains metadata keyword=value pairs, where approved keyword terms are humanoidVersion authorName authorEmail copyright creationDate usageRestrictions age gender height and weight.

Hints

  • Height and weight are in base units (typically meters), hanimVersion is for author use and separate from HAnimHumanoid version field.
  • Alternate metadata keywords are also allowed.

SFString [in, out] skeletalConfiguration “BASIC”

Models sharing a common skeletal configuration can share animations and binding poses.

Hint

SFInt32 [in, out] loa -1 [-1,∞)

Level Of Articulation 0..4 indicates complexity and detail of joints for given humanoid skeletal hierarchy.

Hints

SFVec3f [in, out] translation 0 0 0 (-∞,∞)

Position of children relative to local coordinate system.

Hint

  • Since default pose faces along +Z axis, -x values are right side and +x values are left side within HAnimHumanoid.

SFRotation [in, out] rotation 0 0 1 0 (-∞,∞) or [-1,1]

Orientation of children relative to local coordinate system.

Warning

  • Default pose is typically empty (or an identity rotation) to avoid distorted body animations.

SFVec3f [in, out] scale 1 1 1 (0,∞)

Non-uniform x-y-z scale of child coordinate system, adjusted by center and scaleOrientation.

Warning

  • HAnimHumanoid scale values must be positive.

SFRotation [in, out] scaleOrientation 0 0 1 0 (-∞,∞) or [-1,1]

Preliminary rotation of coordinate system before scaling (to allow scaling around arbitrary orientations).

SFVec3f [in, out] center 0 0 0 (-∞,∞)

Translation offset from origin of local coordinate system.

SFBool [in, out] visible TRUE

Whether or not renderable content within this node is visually displayed.

Hints

  • The visible field has no effect on animation behaviors, event passing or other non-visual characteristics.
  • Content must be visible to be collidable and to be pickable.

SFBool [in, out] bboxDisplay FALSE

Whether to display bounding box for associated geometry, aligned with world coordinates.

Hint

  • The bounding box is displayed regardless of whether contained content is visible.

SFVec3f [ ] bboxSize -1 -1 -1 [0,∞) or −1 −1 −1

Bounding box size is usually omitted, and can easily be calculated automatically by an X3D player at scene-loading time with minimal computational cost. Bounding box size can also be defined as an optional authoring hint that suggests an optimization or constraint.

Hints

SFVec3f [ ] bboxCenter 0 0 0 (-∞,∞)

Bounding box center accompanies bboxSize and provides an optional hint for bounding box position offset from origin of local coordinate system.

Hints

MFNode [in, out] skeleton [ ] [HAnimJoint, HAnimSite]

List of top-level HAnimJoint and HAnimSite nodes that create the skeleton model. The skeleton field contains the humanoid_root Joint object, and thus the entire hierarchy of HAnimJoint/HAnimSegment nodes making up the articulated skeleton model.

Hints

  • Typically contains HAnimJoint with name=’humanoid_root’.
  • Immediate children in the skeleton field can also include top-level HAnimSite node declarations, which are landmarks for the overall humanoid figure that are not affected by HAnimJoint movement.

Warning

  • Top-level HAnimJoint and HAnimSite nodes must include containerField='skeleton' for proper validation and operation.

MFNode [in, out] viewpoints [ ] [HAnimSite]

List of HAnimSite nodes containing Viewpoint nodes that appear in the skeleton model, usually as USE node references. The viewpoints field contains zero or more special HAnimSite nodes that are only affected by HAnimHumanoid transformations (and no HAnimJoint transformations). Each HAnimSite can contain a Viewpoint as virtual camera in the HAnimHumanoid reference frame (such as viewing the face or profile of the human figure).

Hints

  • The viewpoint field has different functionality than the joints, segments and sites fields.
  • The viewpoints field connects internal Site nodes that in turn hold relative Viewpoint nodes, such as <[HAnimSite](/x_ite/components/hanim/hanimsite/) USE='ObserveFaceSite_view' containerField='viewpoints'/> which has corresponding counterpart nodes <[HAnimSite](/x_ite/components/hanim/hanimsite/) DEF='ObserveFaceSite_view' name='ObserveFaceSite_view' containerField='children'> <[Viewpoint](/x_ite/components/navigation/viewpoint/) description='look at me!'/> </HAnimSite>.

Warnings

  • These are actual node declarations, not USE nodes.
  • Top-level HAnimSite nodes (in turn containing Viewpoint nodes) must include containerField='viewpoints' for proper validation and operation.

MFNode [in, out] sites [ ] [HAnimSite]

sites field contains a list of USE references for all HAnimSite node instances found within the preceding skeleton hierarchy.

Hints

  • Order is irrelevant since names are contained in the original DEF objects.
  • These USE nodes can be utilized by inverse kinematics (IK) and animation engines.

Warnings

  • The number of contained <[HAnimSite](/x_ite/components/hanim/hanimsite/) USE='*' containerField='sites, skeleton or viewpoints'/> nodes at top level of HAnimHumanoid needs to match the number of corresponding HAnimSite node instances found within the preceding skeleton hierarchy.
  • Top-level HAnimSite USE nodes must include containerField='sites' for proper validation and operation.

MFNode [in, out] segments [ ] [HAnimSegment]

The segments field contains a list of USE references for all HAnimSegment node instances found within the preceding skeleton hierarchy.

Hints

  • Order is irrelevant since names are contained in the original DEF objects.
  • These USE nodes can be utilized by inverse kinematics (IK) and animation engines.

Warnings

  • The number of contained <[HAnimSegment](/x_ite/components/hanim/hanimsegment/) USE='*' containerField='segments'/> nodes at top level of HAnimHumanoid needs to match the number of corresponding HAnimSegment node instances found within the preceding skeleton hierarchy.
  • Top-level HAnimSegment USE nodes must include containerField='segments' for proper validation and operation.

MFBool [in, out] motionsEnabled [ ]

Array of boolean values corresponding to HAnimMotion nodes indicating which can animate the HAnimHumanoid.

MFNode [in, out] motions [ ] [HAnimMotion]

Contains any HAnimMotion nodes that can animate the HAnimHumanoid.

MFVec3f [in, out] jointBindingPositions [ ] (-∞,∞)

Specifies an array of position values for each HAnimJoint node in the joints field, in order, corresponding to each binding pose.

Hint

  • If only one value is provided, it is provided to each Joint equivalently.

Warning

  • Not used when skeletalConfiguration=’BASIC’.

MFRotation [in, out] jointBindingRotations [ ] (-∞,∞) or [-1,1]

Specifies an array of rotation values for each HAnimJoint node in the joints field, in order, corresponding to each binding pose.

Hint

  • If only one value is provided, it is provided to each Joint equivalently.

Warning

  • Not used when skeletalConfiguration=’BASIC’.

MFVec3f [in, out] jointBindingScales [ ] (-∞,∞)

Specifies an array of scale values for each HAnimJoint node in the joints field, in order, corresponding to each binding pose.

Hint

  • If only one value is provided, it is provided to each Joint equivalently.

Warning

  • Not used when skeletalConfiguration=’BASIC’.

MFNode [in, out] joints [ ] [HAnimJoint]

The joints field contains a list of USE references for all HAnimJoint node instances found within the preceding skeleton hierarchy.

Hints

  • Order is irrelevant since names are contained in the original DEF objects.
  • These USE nodes can be utilized by inverse kinematics (IK) and animation engines.

Warnings

  • The number of contained <[HAnimJoint](/x_ite/components/hanim/hanimjoint/) USE='*' containerField='joints'/> nodes at top level of HAnimHumanoid needs to match the number of corresponding HAnimJoint node instances found within the preceding skeleton hierarchy.
  • Top-level HAnimJoint USE nodes must include containerField='joints' for proper validation and operation.

SFNode [in, out] skinBindingNormals NULL [X3DNormalNode]

Array of Normal nodes to handle non-default source pose so that both skin and skeleton can be in same binding pose.

Warnings

  • Index values for HAnimHumanoid skin IndexedFaceSet, skinCoord and skinNormal nodes must all be consistently defined together with HAnimJoint HAnimSegment and HAnimDisplacer nodes for proper skin animation.
  • Top-level Normal nodes must include containerField='skinBindingNormals' for proper validation and operation.
  • (X3D version 4.0 ISO.proof draft) requires X3D profile='Full' or else include <component name='HAnim' level='2'/>
  • For X3D3 HAnim1, spelling of component name is ‘H-Anim’ (including hyphen).
  • Not used when skeletalConfiguration=’BASIC’.

SFNode [in, out] skinBindingCoords NULL [X3DCoordinateNode]

Array of Coordinate nodes to handle non-default source pose so that both skin and skeleton can be in same binding pose.

Hint

  • A single node is used so that coordIndex references are consistent for all references to these coordinates.

Warnings

  • Index values for HAnimHumanoid skin IndexedFaceSet, skinCoord and skinNormal nodes must all be consistently defined together with HAnimJoint HAnimSegment and HAnimDisplacer nodes for proper skin animation.
  • Top-level Coordinate or CoordinateDouble nodes must include containerField='skinBindingCoords' for proper validation and operation.
  • (X3D version 4.0 ISO.proof draft) requires X3D profile='Full' or else include <component name='HAnim' level='2'/>
  • For X3D3 HAnim1, spelling of component name is ‘H-Anim’ (including hyphen).
  • Not used when skeletalConfiguration=’BASIC’.

SFNode [in, out] skinNormal NULL [X3DNormalNode]

Single Normal node utilized by indexed mesh definitions for skin. The skinNormal field contains a single sequence of normal values, used by internal HAnimHumanoid mechanisms to create appropriate surface deformations as well as by the indexed face set definitions within the skin field that perform the actual rendering of surface geometry.

Warnings

  • Index values for HAnimHumanoid skin IndexedFaceSet, skinCoord and skinNormal nodes must all be consistently defined together with HAnimJoint HAnimSegment and HAnimDisplacer nodes for proper skin animation.
  • Top-level Normal node must include containerField='skinNormal' for proper validation and operation.
  • (X3D version 4.0 ISO.proof draft) requires X3D profile='Full' or else include <component name='HAnim' level='2'/>
  • For X3D3 HAnim1, spelling of component name is ‘H-Anim’ (including hyphen).

SFNode [in, out] skinCoord NULL [X3DCoordinateNode]

Coordinate node utilized by indexed mesh definitions for skin. The skinCoord field contains a single sequence of points, used by internal HAnimHumanoid mechanisms to create appropriate surface deformations as well as by the indexed face set definitions within the skin field that perform the actual rendering of surface geometry.

Hint

  • A single node is used so that coordIndex references are consistent for all references to these coordinates.

Warnings

  • Index values for HAnimHumanoid skin IndexedFaceSet, skinCoord and skinNormal nodes must all be consistently defined together with HAnimJoint HAnimSegment and HAnimDisplacer nodes for proper skin animation.
  • Top-level Coordinate or CoordinateDouble node must include containerField='skinCoord' for proper validation and operation.
  • (X3D version 4.0 ISO.proof draft) requires X3D profile='Full' or else include <component name='HAnim' level='2'/>
  • For X3D3 HAnim1, previous spelling of component name was ‘H-Anim’ (including hyphen)

MFNode [in, out] skin [ ] [X3DChildNode]

List of one or more indexed mesh definitions (such as IndexedFaceSet) that utilize skinCoord point and skinNormal normal data.

Hint

  • Put skin node first and provide DEF label to simplify USE node usage within the skeleton hierarchy.

Warnings

  • Index values for HAnimHumanoid skin IndexedFaceSet, skinCoord and skinNormal nodes must all be consistently defined together with HAnimJoint HAnimSegment and HAnimDisplacer nodes for proper skin animation.
  • Top-level node must include containerField='skin' for proper validation and operation.
  • (X3D version 4.0 ISO.proof draft) requires X3D profile='Full' or else include <component name='HAnim' level='2'/>
  • For X3D3 HAnim1, previous spelling of component name was ‘H-Anim’ (including hyphen)

Advice

Hints

Warnings

  • Requires X3D profile='Full' or else include <component name='HAnim' level='1'/>
  • For X3D3 HAnim1, previous spelling of component name was ‘H-Anim’ (including hyphen)

Example

View Source in Playground

See Also

This post is licensed under CC BY 4.0 by the author.