3D Model Coding Question - DX11

Started by
4 comments, last by unbird 6 years, 8 months ago

in directx I need to know how would I play the animation in directx rendering frames for each part of the model moving parts - like the bones, how would would that work?

I'm new to writing a animation player, for a model parser.

I'm asking so I understand how to do this, I'm new to loading a model and playing\moving the bones to effect the mesh.

Sign, Cyndanera

Advertisement

I'm not sure about DX but I think it's pretty much the same as in OpenGL. You upload the bone weights and IDs per vertex. Then upload the matrices of each bone in a uniform buffer (constant buffer in DX). These matrices can be given by interpolating between the matrices in the animation keyframes, based on the time. There are plenty of tutorials online if you need in depth info.

The Autodesk FBX SDK is a widely used toolkit for loading models and playback of animations. The SDK is generic and can be tied to whatever 3D API you want to use (OpenGL, DirectX etc) in the sence that it loads and animates the mesh and when it is finished you have to transfer the computed mesh vertices to your favorite 3D API.

The SDK contains examples on how to use the SDK but if I recall it only contains the glue towards OpenGL. That can be translated over to DirectX quite easily though since you are just dealing with simple vertices and material properties.

I suppose a good question to ask would be do you have a particular model format in mind?

-potential energy is easily made kinetic-

If you want to roll your own, read Buckeye's excellent article :

Blending Animation Controller

This topic is closed to new replies.

Advertisement