Sign in to follow this  

Model Animation Without Using .X Files

This topic is 3847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am using Directx 9 in c# .NET. How do I do animation of 3D models without using .X files? I have a model divided up into subsets for each texture, each with a set of vertices, UVs, normals, and indices. The format for my animation data is still undecided but I have an idea. I was planning on having a 3D point which would act as a bone and be linked to a set of vertices. Then I'd have a list of transformations that would be applied to each "bone" (over time) which would just transform all of the vertices linked to that point about/relative to that point. Any Ideas?

Share this post


Link to post
Share on other sites
Quote:
Original post by Scet
You can do animation/skinning on the GPU by creating a custom vertex format that uses bone weights and indices and then apply the transformations with a vertex shader. Here's an article on the subject, by circlesoft.


I took a look at that link and everything made perfect sense. The only problem is how do I do that with the pipeline? With the code they provided, I'd have to lock the vertex buffer and do it manually. Isn't that really slow. I assume there's a way to make the videocard do it right? The truth is I know nothing about pipelines so that's probably the problem. Thanks.

Edit: Is this what HLSL is for?

Share this post


Link to post
Share on other sites
Quote:
Original post by punmaster
With the code they provided, I'd have to lock the vertex buffer and do it manually. Isn't that really slow. I assume there's a way to make the videocard do it right?


The code provided is HLSL(the vertex shader), except for the vertex definition. The vertex shader is how you get the video card to do the transformations, there really isn't another way.

Share this post


Link to post
Share on other sites
I think I've got it. Does anyone have a model which, for each vertex, has bone indices (up to 4), and for each bone index, has a weight, in some easy-to-parse format? If not, how can I get this from an .X file that has bone info?

Share this post


Link to post
Share on other sites

This topic is 3847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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