Transcending through blended models

Started by
0 comments, last by imaginary 19 years, 4 months ago
I'm just wondering how to go through a bone animated model with many bones and with blended verticies. Basically I want to know how you control when to change the matricies and how to orginize the verticies and triangle to render correctly, etc.
Advertisement
One word: skinned paletted vertex blending. In addition to the weights at each vertex, you also supply indices into a list of all your bone matrices over the entire model. One index per weight.

This approach enables you to render the entire model in one single pass, with one single vertex buffer or array render call. No management of individual vertex or triangle parts are needed.

About the matrix updating, you traverse the skeleton in its inherent hierarchical order, and multiply the matrices together. At each branching point, push the current matrix on a stack, and recurse into the children branches. When you return, pop back the original matrix. The local matrices can be directly assigned to your vertex shader's parameters.

So it's basically: recursively traverse your bones, multiply all matrices, and assign them to local vertex shader parameters. Then render the whole model with one single draw element or draw primitive call.

This topic is closed to new replies.

Advertisement