[x3d-public] HAnim Vertex Displacer Operation

Joe D Williams joedwil at earthlink.net
Thu Sep 15 17:32:45 PDT 2016


http://www.web3d.org/documents/specifications/19774-1/V2.0/HAnim/ObjectInterfaces.html#Displacer

"... uniformly scale the displacements by the value of the weight 
field ... "

HAnim Vertex Displacer Operation

Defined in displacers field of either
Humanoid, if appled to Humanoid skin field geometry,
or
Segment if applied to current child geometry.

Displacer binds target vertices by
index of points field (0 to n) in the user code.

Applied after Joint derived animation.

Defines maximum x y z displacement
from current animated position.

Animates target vertices up to the maximum given values
according to Displacer weight field.

Displacer weight field initialized to 0 so no added animation.

TimeSensor drives ScalarInterpolator

ScalarInterpolator 0 to 1 output drives Displacer weight field.

Each target vertex is animated
from 0 0 0 position change, if weight 0.
or
to full defined x y z value change if weight 1.

Animate target vertices by changing weight field.


Displacer {
    coordIndex [ 7, 12, 21, 28 ]
    displacements [ 0 0.0025 0, 0 0.005 0, 0 0.0025 0, 0 0.001 0 ]
    weight [ 0 ]
    name "l_eyebrow_raiser_action"
}

Here the Displacer identifies vertices
7, 12, 21, and 28 of the subject geometery

When the weight is 0, then no added displacement
is applied to any vertex.

For instance, if the weight is 1,
then vertex 7 would be moved 0.0025 units
along the y axis;
if weight is 0.5 then 0.0012 units.

Another Example:

Humanoid ...
 displacers [
  DEF Joe_skull_tipTest Displacer {
    coordIndex [ 0 1 2 3 ]
    displacements [ 0 0.25 0, 0 0.5 0, 0 0.25 0, 0 0.1 0 ]
    weight 0
    name "skull_tip_raiser_action"
 }
]

Joe_skull_tipTest

DEF skull_tipTest_Run ScalarInterpolator {
key [ 0, 0.2 0.5 0.65 1 ]
keyValue [ 0, 0.2 0.5 0.65 1 ] }

ROUTE Run_Time.fraction_changed TO skull_tipTest_Run.set_fraction
ROUTE skull_tipTest_Run.value_changed TO Joe_skull_tipTest.weight


http://www.hypermultimedia.com/x3d/hanim/HAnimCollection20130818/0MainStageScene0818.x3dv

purple guy in row four, to the right, touch to run and animate 
DIsplacer of head verts.

Thanks and Best,
Joe
Comments being accepted for HAnim V2.0 that you see up there now, 
along with V1.0.




More information about the x3d-public mailing list