|
|
|
Animation
This page describes how to do animation in Verse. "Animation" is here used to mean some kind of time-varying, structured and typically cyclic modification of object geometry. Standard uses is for characters, to do e.g. walking, gesturing, or even facial expressions.
Verse's bone-based animation system is quite complex, since it relies on features of many different nodes to achieve its goals. To animate for instance a walk cycle, these parts would be involved:

 | A top-level object node representing the character.
|  | A geometry node holding the base mesh, and also weighting layers for bones.
|  | A curve node holding a number of curves that define required transforms for the animation. |
 This data needs to be properly referenced and linked to actually be used in animation. Here is how:

 | There must be a link (o_link_set), labelled "geometry" from the object node to the geometry node, to idenfify that geometry node as the one carrying the main geometry for the object. This is standard, not specific to animation at all.
|  | There must be a link (o_link_set), whose label typically indicates the animation name, like "walk", from the object to the curve node. The ID of this link is what is being used in the o_anim_run command to start the animation.
|  | The geometry node must define a suitable number of bones (g_bone_create) that connect the vertices of the model into a hierarchical transformation system. The bones should contain names of individual curves in the curve node. |
 To actually start an animation, issue the o_anim_run command to the object in question. This command addresses the link to the curve node, to indicate to all listeners which node's curves are going to be applied. Note that the command runs all individual curves of that node, not just a single one.
When a curve runs, all bones that refer to that curve must be recomputed on a per-frame basis (or whatever suits the application at hand). Then, the vertices that the bone affects must be displaced accordingly.

|
|