Assistance with animated .x model

Started by
3 comments, last by rm2000 13 years, 4 months ago
Hello:

I'm trying to get an animated model to load. I figure, first step is getting it to load in the SDK viewer or mesh viewer with the animations and then go from there. I have provided a link below of our model - it is created in 3dsmax using Character Studio biped animation (I'm not a modeler so I hope I'm using the right terms) and using the Panda exporter. I notice it does not show up animated in the .x viewer and when trying to load into the Skinning example I get "Input Skeleton not Found." during compilation once I've updated it to use the SkinnedModelProcessor.

Can somone either (a) provide guidance as to the steps they took to get a model rigged and exported, (b) review the model in the attached zip file (the x file is there as well) and tell me what I need to do to correct it, or (c) provide me with an example of a file that DOES work? I noticed in the SDK that none of the files in the media folder seem to be animated...

http://www.merg3d.com/resources/model.zip

Thanks much!
Advertisement
First, it would've helped if you'd exported a text format x-file, rather than binary. Text format x-files can be examined in an ASCII editor.

In any case, it looks like the mesh is a right-handed vs left-handed model. That is, the triangles all have a CCW winding order vs CW which your program expects. The normals all seem to point outward (as should be expected).

The x-file loads in my viewer as a dark figure (probably due to the normals pointing to the back of each face.) In wireframe it appears to be a mohawked hair-style person, and the viewer indicates it has a "anim-1" animation. But there's no movement involved.

If you can get the mesh loaded in your program, render it with a scaling matrix of ( 1, 1, -1 ) - scale the Z-axis by -1. You can also try scales of -1 for the X and Y axes to see what happens, but scale ONLY one axis at a time. Note: that will probably scale the normals also so it may appear dark. Render it without lighting to see if that helps.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

Thanks for the assistance. It is the model as you've described it. I believe the problem was with the bones (apparently my graphics guy didn't export the bones correctly). It now shows up right in the SDK viewer.

One additional question - I have a shader (material) applied to this. In the basic skinning sample provided by Microsoft all of the documentation I'm reading states you have to use the SkinnedModelProcessor. When I change the model to this type I get a compiler error saying the type only support the basic effect. Have you used the Microsoft skinning sample with success on shader files or is there a way to work around this? I've been trying to find good examples for playing the animations but am having little luck...

Thanks in advance AND for the tip on the .x file in non-binary.
Quote:I believe the problem was with the bones..

I don't think so. But, if you've got it working...

I'm guessing SkinnedModelProcessor has something to do with XNA. I'm not familiar with it.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

It indeed is the XNA skinning example. I'm having a real challenge finding examples of loading the animation frames of a skinned, shaded model.

This topic is closed to new replies.

Advertisement