Michael Hansen

i see there is a lot of folks that ask for a animation sample

well it is all ready been written

use this


download it it works with all fbx and xfiles

but there is a bug in 3dsmax

so what you shood do is export your model from 3dsmax in fbx format

and load milkshape up and load the fbx file in and save it agian

and you will see it is now working

i have tryed 50 diffrent models exported from max 7,8,9 and when i load them in to max again

there are errors , some bones are gone , and some times there are missing polys , and animation

but when i export from max and load the model into milkshape and save it out again all the models are in smaller size and all is working perfect

it all so work when i load a fbx model that just exported from max ,then i export as x jit x file from milkshape

it allso work

so you can call milkshape a clenning and fixing tool for all your proplems you have

Re: XNA Framework Animation mesh sample

Jim Perry

Hmm, that link hangs. Waited about 30 seconds for it and it never came up.

Re: XNA Framework Animation mesh sample


I checked your code some weeks ago, but can you please try again, to explain your idea, how to find the correct absolute bone matrices in your processor. I dont understand the way, you did this, because the normal way to use the absolute bone transforms seems not to work.

Re: XNA Framework Animation mesh sample

Michael Hansen


fisrt direct link to download




bye the way it is not my code just found a link here in this forum

When you have build your animated model in 3dsmax ,7 ,8,9

you export the model as fbx format

now you have the model in fbx format on your harddisk

then start milkshape3d and import the model in

then save the model out agian as fbx or x format

and the model works perfect with all animations...........

once again yourmodel.fbx into milkshape save out yourmodel1.fbx

start visual c# express and the project you just downloadet

add yourmodel1.fbx to your project

compile and run

and you will see the model is now working 100% perfect

if you try to add yourmodel.fbx  - compile and run you will get a error in the content processor

and some models missing polyes and some missing animations and bones

so you see milkshape fix the models for you how

i think that max are saving some negative values on bones that why milkshape dosent save any negative values on bones

 and some imported factor that in max ..........2 subset of a hole mesh can share the same bone

the curent fbx format in xna framework does not support multibone 

3ds max like to use multibone even if you are not aware of this

mabye microsoft can conferm this about multibone

let me explain

sample model in bones

head---chest ---arm-------hand-----gun

hand and gun share the same bone

the gun subset mesh is following the hand subset mesh = to subset of a hole mesh sharing the same bone

so you have to beware of this..

if you have this problem when your model get exported just use in milshape mark the hand and the gun mesh

and collapse the to mesh into one subset mesh

the downside of this it is prytty diffecult to change you gun while you are playing your game

sullution = give the gun a new bone and give a sepretred animation from the gun

so you are playing 2 animations at the same time on your game player

one for you hero and one for the gun

if you model your model in 3dsmax or zbrush and rig the model in milkshape and exported it out in fbx or x format

it all ways work 100%






Re: XNA Framework Animation mesh sample


Hi, i had a closer look into your project. All works fine, but i saw, that the y-Position of tiny.x seemes to be a little bit to high, so the model stands at the top of its Bounding-Volume. Do you know, how to solve this problem I think it has something to do with the order of transformations, so that the model is rotated after it is transformed, but changing the transformation order ends in chaos.

Re: XNA Framework Animation mesh sample


Its time, that we get some official informations or a demo or something else, because nobody could solve all problems for 3d animations with xna.

Re: XNA Framework Animation mesh sample

Michael Hansen

read above this tread and download a sample

bye it is not my sample

Re: XNA Framework Animation mesh sample


I dont think, that is is a problem of the file. I tested tiny.x with an Managed DirectX sample and it just works fine, but in XNA it is a little bit confusing, how badly it runs.
btw: ms3d seems not to import animations from x-files.

Sometimes I think, that XNA is dead from the official side (MS). I should have stayed at Managed DirectX, this was a mistake :(.

Re: XNA Framework Animation mesh sample


malignate wrote:

Sometimes I think, that XNA is dead from the official side (MS). I should have stayed at Managed DirectX, this was a mistake :(.

http://www.youtube.com/watch v=Oyd18KokT_o&eurl=

I think "dead" is a bit exaggerating. If you want to give up because you can't get one question answered, then maybe you do DirectX/managed-dx until XNA support is more matured. As seen in the video, people can still do amazing stuff even without an official sample. Just have to do more research and learn stuff on your own. :)

Re: XNA Framework Animation mesh sample


Its not a question of giving up or loosing my motivation, is just a question of time and money. I changed the API from MDX to XNA with the hope, that XNA will help me to go faster. And in some parts its true. I think, the Content Pipeline is a good thing and helps the developers to easy load and manipulating files and the new addons, embedded in Visual C# Express, work well, too, but nevertheless, there are some issues. For example font support or a full animation example from the start. It could be no problem, if there would be some official informations. But in the todays situation it is a problem, because nobody could develope a working animation sample on the top of the content pipeline and so people have to wait or to spend time in the developing of animation addons, font support and all the technical stuff. As I understand it, XNA wants to improve the creation of games for beginners and professionals, but I only see people extending XNA, instead of programming games. The target is to get the same stuff, which is available for MDX, for example font-support, a simple GUI and animation stuff.
I know, that it is much easier for programmers to create technical things, because getting graphic artists is hard, but sometimes I think that XNA misses its target to help us developing games.
Afterwards I ask myself why somebody would take XNA, if he doesnt expect financial advantages.

btw: I think I know all existing animation samples, but none works well on the top of the content pipeline.

Re: XNA Framework Animation mesh sample


There is a pretty good example on how to do fonts in the spacewar starter kit. It isn't that hard if you think about it.

3D animation is something that is necessary for me, and a bit over my head at the moment, but I got enough other things to figure out until the animation sample finally makes its way to us.

If you are so serious about all of this, you probably would want to have the skills to create an animation module on your own. Otherwise, wait for someone to release an Engine.

Please don't come here to complain, go to connect.microsoft.com for that.

Re: XNA Framework Animation mesh sample


Font support isnt a problem, i developed a font creator in just about 2 hours, but you are right. Im quite now! :(

Re: XNA Framework Animation mesh sample

Michael Hansen

here is a small sample running 12 defferent animations on a game player

i used the above sample code

use the xbox controler to rotate the mesh around


so it can be done

the only limitation is your imagination--------------mike

Re: XNA Framework Animation mesh sample


It's version for Xbox i'm can't compile this example for windows! :-(