Post

HAnimDisplacer

Overview

HAnimDisplacer nodes alter the shape of coordinate-based geometry within parent HAnimJoint or HAnimSegment nodes. Displacer effects are scaled by the corresponding weight field.

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

Hierarchy

1
2
3
+ X3DNode
  + X3DGeometricPropertyNode
    + HAnimDisplacer

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] 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 HAnimDisplacer node can be identified at run time for animation purposes.

Hints

Warnings

  • Allowed name suffixes include _feature, _action and _config.
  • name prefix must match ancestor HAnimHumanoid name followed by underscore character, if more than one humanoid appears within a scene file. For example, ‘Nancy_’ prepended before location name.
  • name field is not included if this instance is a USE node, in order to avoid potential mismatches.

SFFloat [in, out] weight 0 (-∞,∞)

The weigh factor has typical range [0,1] and defines the scale factor applied to displacement values before adding them to neutral vertex positions.

Hint

  • Apply a non-zero weight factor to see the effect of HAnimDisplacer displacements.

MFInt32 [in, out] coordIndex [ ] [0,∞) or -1

Defines index values into the parent HAnimSegment or HAnimBody/HAnimHumanoid coordinate array for the mesh of vertices affected by this HAnimDisplacer. Values start at index 0.

Warning

  • -1 sentinel values are not allowed.

MFVec3f [in, out] displacements [ ]

displacements are a set of SFVec3f values added to neutral/resting position of each of the corresponding HAnimSegment vertices (or HAnimJoint/HAnimHumanoid vertices) referenced by coordIndex field.

Hints

  • Individual displacement values are scaled by the weight factor, if present.
  • Since default pose faces along +Z axis, -x values are right side and +x values are left side within HAnimHumanoid.

Advice

Hints

Warnings

  • Allowed name suffixes include _feature, _action and _config.
  • 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.
  • 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).

See Also

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