Jump to content
  • Advertisement
Sign in to follow this  
Luminous

Vertex Tweening Animation with DirectX

This topic is 4484 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 Vertex Blending/Tweening techniques in DirectX whether you do it by shaders or through normal rendering states. The question I have is that is there anyway to retrieve the mesh/model generated by the tweening for use in Collision Detection? The only way I can think of doing it is manually tweening every vertex but my models have tons of vertices(poser models), so that is definitely out the question. Any thoughts, ideas, comments on the matter?

Share this post


Link to post
Share on other sites
Advertisement
You might be able to get somewhere with IDirect3DDevice9::ProcessVertices().

Short of doing software skinning/morphing/tweening I don't think you'll get the information you want.

There might be others, but one I've seen mentioned before:

Create a series of bounding boxes around the limbs of your character (e.g. one per bone) and then morph these on the CPU. That way you can get fairly accurate collision detection without having to deal with the real geometric complexity of the model. If you really need triangle-level accuracy you could (once past a bounding-box test) transform the relevant triangles and test accordingly...

hth
Jack

Share this post


Link to post
Share on other sites
I figured that much, ProcessVertices() seems okay but I think it would have to be more on a precalculated level. It's just a general problem I've had trying to animate some 3d models.

Poser seems to not export bone information with any of the export formats it has so I'll look into writing my own export plugin with it's python library.

Also, using the PandaX Exporter for DirectX Files in 3D studio max seems to cause problems when trying to include animations and bones. I can export a .max scene as a single mesh and it will render correctly with materials, textures, and everything else. When including the animations and bones, when rendering the X format cause tons of warping and spikeyness within the model. I guess there is something about the limit of bones or weights with the X format but I'm not sure.

I'm really just trying to find a good way to use Poser models and their animations altogether but if need be I can animate the models in 3ds max and export to X file format.

Share this post


Link to post
Share on other sites
ProcessVertices() is in general very slow. I wouldn't use it for this. JJ's suggestion of bounding volumes around the major parts is probably best. DX10 will allow better retrieval of processed vertices, but that won't be mainstream for years still.

Share this post


Link to post
Share on other sites
CPU side is probably the best choice, being compatible with all systems and a rather simple calculation.

An alternative would be storing vertex positions in textures and using a pixel shader to tween. On the Radeon X1x00 cards you could then use R2VB to read the results in the vertex shader, but even without this you could read this back. Whether the speed of doing it on the GPU is worth it with the overhead of readback (and the more complex code) is something you'd have to see for yourself.

Share this post


Link to post
Share on other sites
dude just tween a few vertices on the CPU, and build bounding boxes around them. we use max and insert 'dummy' frames for our boned models, but in tweening you should just be able to interpolate a few vectors during the animation.

-programmer_tom

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!