[x3d-public] HAnimDisplacer from CoordinateInterpolator

Joe D Williams joedwil at earthlink.net
Thu Oct 17 18:56:45 PDT 2024


Hi Don,   
as my Ai helped explain to me:   

To get the displacements from CoordinateInterpolators, identify the coordinates at time0 and time1 for each point:

Let’s say at time0, the coordinates are 
   ((x_0, y_0, z_0)).  

At time1, the coordinates are  
  ((x_1, y_1, z_1)).

Compute the displacement vector:  
Use the formula: (vec{v} = (x_1 - x_0, y_1 - y_0, z_1 - z_0)).   

For instance, if you have the following coordinates:
At time0: ((2, 3, 4)) At time1: ((5, 7, 9))  
The displacement vector would be: [ vec{v} = (5 - 2, 7 - 3, 9 - 4) = (3, 4, 5) ]

This vector (vec{v}) represents the change in position from time0 to time1.   

Finally create two lists, the coordIndex for each index of point to be animated and a corresponding second displacements list in order of the indices.   

Now send 0 to 1 input to weight to scale the value added to the point relative 2 its current position.   

There are some fine points to this relating to the point coordsys at default pose but since the point, like the Joint maintains its initial body coordinate system when animated from default pose, it works fine and as expected.   

I'm wanting to send a representative example soon. Right now I am looking at the FACS AU46 left eye wink morpher interpolator. 
      
Overall, taking these base FACS examples working them into a single file with a menu and making some logic to select the correct Displacers to operate for each expression would help make these examples useful.   
   
Thanks and All Best, 
Joe



More information about the x3d-public mailing list