Exported Character Moving too fast

Started by
6 comments, last by DrGUI 18 years, 3 months ago
I have a quite complicated problem that i've been trying to figure out for along time. It involves exporting a character from 3dsmax 7 using the pandasoft exporter. Everything works well apart from one thing. The character model in our engine moves too quickly. In more detail; when the engine is loaded, the character and the test collsion sphere start at their initial point. They are both aligned correctly at this point, the model sitting inside the collision sphere. The collision sphere marks the place where the character should be all the time however, when i move the character, it moves twice as fast as the sphere, in all directions. eg. if i jump, the sphere jumps 1m but the character model would jump roughly 2. If i move forward, the character model moves twice as far forward. This basically means that when I move around the environment, the player model get's further and further away from the place it should be. If I return to the initial start position, the character model would return back to the sphere. My senior programmer informs me there is a problem in the way I am exporting the model to .x format. That the players movement matrix is being multiplied by something. I have no idea what this is, and seeing as I am not a programmer, don't know how to solve this. Another thing of note, is that I can load in simple, non-skinned, models and they stay inside the sphere. So the problem is with the bone hierachy. I'd love to point the finger and say it's the progammers fault, but the 'tiny.x' model that comes with the directx SDK loads into the engine and is reported as being in the correct format. Sorry for wittering on, but I really need help with this. Thanks in Advance.
Advertisement
Maybe an animation frames per second issue?
Yeah, that sounds like its a problem that your programmer has to solve. I mean I don't use .x, but I am writing my own (simple) model importer that has to deal with bones, and heiriarchy (sp?), but when I have a problem with a standard file format, its Usually something I am doing wrong within the code. I don't think its plausable that your animations or the exporter are messing things up maybe its just a lazy programmer :)

I may be wrong though so maybe some other possibilities exist.
Thanks for the hasty responses. Well I'm technical enough to understand how frames per second could affect this. It's currently exporting with 30fps, are you saying that extra frames of animation maybe causing extra transform data to be calculated?

I'd like to say it was a programming issue, but the fact that there is an official working directx file already imported into the engine kinda suggests I am doing something wrong.
O well if you have an official model that works fine, then perhaps that is your fault. I guess it may be your fps, but I doubt it. As long as you model stays at the origin while the animations are running, even if the fps is messed up all that would really happen is the animations would play 2 times as fast but it should stick with the bounding sphere. You should read some tutorials on rigging and exporting to x files online, may be of some help. Check some of the options in the exporter on 3dsmax.
If I understand you, and correct me if I'm wrong, the situation is that the programmer moves the character mesh forward (walking forward) or up (jumping), etc., but the bounding sphere does not follow it with the same offset from the original position. If that's what you mean, then I don't see how that can be your fault. He should be applying a translation to the vertices of both meshes. Add x,y,z to all vertices and they'll all be at the same relative spot between each other that they were before, but in a different world position. Hence, if you translate two meshes, they'll be at the same position relative to each other no matter what.

If I misunderstood and the animations for jumping and walking forward are being exported, then it could be a problem, but if you are playing it in the 3DS Max and it looks right (the sphere stays with the character), chances are it's getting exported right too (wouldn't say 100% that it is though. :).

Good luck,
Chris
Chris ByersMicrosoft DirectX MVP - 2005
The actual collision sphere is not part of the export. That's an inbuilt marker that defines where the character should be also where the player collides with things.

The exported character consists of simple the mesh and bones. The programmer then makes the character move around. However the character mesh is moving off out of the sphere.

Today i've been comparing the tiny.x model and my own to try and see if there are any obvious differences. I'm reduced to look at the actual text of the x file and noticed that the hierachy is different slightly.

I'm now trying to create the same hierachy in max. But i can't help feeling there is just one matrix somewhere in the x file that is causing this. Perhaps a matrix that is counter acting something.
I believe I had something like this once - where the eyes of my models (see link in sig if you want to see the eyes) rapidly accelerated to the right.

When I debugged it I found that values in some bone transformation matrices were increasing.

I'm really sorry though that I can't remember how I solved it.

Happy New Year

This topic is closed to new replies.

Advertisement