HAnimDisplacer
Overview
HAnimDisplacer nodes alter the shape of coordinate-based geometry within HAnim nodes. Allowed parent nodes for HAnimDisplacer are HAnimHumanoid or HAnimJoint (where animations affect the Coordinate node the ancestor HAnimHumanoid skinCoord field) and HAnimSegment or HAnimSite (where animations affect the Coordinate node in the coord field of the local parent node). Displacer effects are scaled by the corresponding weight field, and no output ROUTE is needed for animation effects.
The HAnimDisplacer node belongs to the HAnim component and requires at least support 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
| Type | Access Type | Name | Default Value |
|---|---|---|---|
| SFNode | [in, out] | metadata | NULL |
| SFString | [in, out] | description | ”” |
| SFString | [in, out] | name | ”” |
| SFFloat | [in, out] | weight | 0 |
| MFInt32 | [in, out] | coordIndex | [ ] |
| MFVec3f | [in, out] | displacements | [ ] |
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
- HAnimDisplacer names are based on feature point names.
- Https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19774/ISO-IEC19774-2/ISO-IEC19774-2v2.1/ISO-IEC19774-2v2.1-WD/Architecture/FeaturePoints.html
- Well-defined names can simplify design and debugging through improved author understanding.
- X3D Scene Authoring Hints, Naming Conventions
- HAnim2 Names HAnim1 Alias Tables
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.
Warning
- weight values that are negative or have magnitude significantly greater than 1 might produce unnatural displacements.
MFInt32 [in, out] coordIndex [ ] [0,∞) or -1
Defines index values into the parent HAnimJoint or ancestor HAnimHumanoid coordinate array for the mesh of vertices affected by this HAnimDisplacer. Alternatively can modify coord node of a parent HAnimSegment or HAnimSite. Index values start at index 0.
Hint
- Multiple Displacer objects can coexist without mutual interference if each is modifying different coordIndex values (and thus different vertices).
Warnings
- Do not simultaneously modify a specific vertex with multiple HAnimDisplacer nodes.
- -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
- HAnimDisplacer can be used in several different ways, for example: (a) identify vertices corresponding to a particular feature in a parent HAnimSegment node, (b) represent a particular muscular action for a parent HAnimJoint node by displacing corresponding HAnimHumanoid skin vertices in various directions (linearly or radially), or (c) represent a complete configuration of coordinate vertices in parent HAnimSegment or HAnimJoint nodes. Example: in the case of a face, there might be a separate HAnimDisplacer node for each facial expression.
- Multiple Displacer objects can coexist without mutual interference if each is modifying different coordIndex values (and thus different vertices).
- Multiple HAnimDisplacer nodes must appear consecutively inside parent HAnimSegment for proper content validation in XML encoding.
- HAnim Architecture draft version 2.1
- X3D HAnim component draft version 4.1
- X3D for Advanced Modeling (X3D4AM) slideset
- Wikipedia, Morph target animation
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).
Browser Compatibility
| Castle Game Engine | FreeWRL | X_ITE X3D Browser | X3D-Edit | X3DOM |
|---|---|---|---|---|