Skeleton
From TrainzOnline
Revision as of 13:51, 17 January 2018 by Tonyhilliam (Talk | contribs)
Animation in Trainz (and most other GPU-based renderers) involves several steps:
1. Creating a mesh, laid out in bind pose.
2. Creating a skeleton for that mesh, comprised of bones arranged in a hierarchy.
3. For each vertex of the mesh, defining which bones influence the vertex and how strong the influence is.
4. Defining animation sequences for the bones.
The mesh file contains the skeleton data (ie. a list of named bones and their parent-child relationships), and the vertex buffers in the mesh contains the per-vertex influence data.
The animation files contain a timeline with positioning data for each bone at various keyframes.