visemes_to_gpu ‐ An action for transfering viseme animation tables to a vertex shader for GPU-based subdivision animation
This action passes a source viseme and a target viseme stored in tables to the GPU (see GPU-based keypoint animation in the subdivision element). These tables must have IDs made of a string prefix and a numerical suffix such as viseme1, viseme2, viseme3... There must be as many tables as visemes that are used during animations.
The string value of the id attribute defines the string prefix of the viseme table IDs, and the integer values of the source_value and target_value attributes defines the numerical suffixes of the IDs of the source and target viseme tables.
The value of the xlink:href string attribute refers to the node that carries the viseme tables by its URI reference.
The integer value of the index attribute defines the index of the animation channel (1 or 2).
The target node must be a subdivision.
The example below is an action that defines an interpolation between the visemes stored in tables face({$root:indViseme}) and face({$root:indViseme}+1) carried by node ID tables: for example, tables face11 and face12 if the variable indViseme of node root is equal to 11. The interpolation is applied to the subdivision (the mesh) carried by node ID don.wrl_0 and concerns the first animation channel.
<action> <visemes_to_gpu id="table" source_value="({$root:indViseme})" target_value="({$root:indViseme}+1)" xlink:href="#root" index="1"/> <target type="single_node" value="#don.wrl_0" /> </action>