Sign in to follow this  
Axiverse

Transcending through blended models

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this