2. Multithreading solution to accelerate rendering
for animated 3D models.
Relevant techniques :
Level of detail of mesh and skeleton.
SIMD extension instruction.
GPU based (vertex shader) calculation – models are
offloaded to video memory.
Skeleton animation – bone structure and pose
transform.
Animate bone to animate model – vertices are
influenced by parent bones (maybe > 1).
3. Animation pipeline has massive matrix
calculations.
Bone positioning (transforms), vertex positioning
(skinning).
Animated models are independent.
Not all models have to be updated for
animation every frame.
Intermittently update reduces bus traffic, improves
parallelism between CPU and GPU, and void
redundant calculations.
4. Modules: thread pool, double buffering, main
thread (rendering call).
5. Send the model to be animated into the pool
for multi-threading.
Store number of models in the thread pool,
g_iNumModelsInPool, accessed by the main thread.
If g_iNumModelsInPool = 0, models are completely
animation updated and ready for drawing.
6. Allow simultaneous skinning and rendering.
Each model is given two buffers for skinning.
Read buffer with ready data for main thread to draw.
Write buffer with next frame data written by the
animation thread.
Lifetime for each buffer, avoid unready or too old
skinning data.
Animation thread accesses valid skinned data in
the read buffer for other parallelism (collision …).
7. Bus bandwidth for uploading data to video
memory is a bottleneck.
Update interval of frames, g_iUpdateInterval,
controls the frequency of animation updates.
Lower interval yields more frequent (smooth)
animation and more computations.
Higher interval yield less frequent (slower)
animation and less computations.
Data do not have to be uploaded to video memory
every frame.
8. Bones compose the skeleton. Mesh (vertices)
attached to bones compose the skinned model.
Vertex positions are relative to its parent bones
with weights.
See red vertex in the following figure.