Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: HelLRaiseR on January 09, 2009, 04:37:55 PM

Title: Problem with 3d actor position
Post by: HelLRaiseR on January 09, 2009, 04:37:55 PM
 I have a problem with a character. I've been created a .x character from max exported with Panda, the problem is that the character is not in the correct position.

I try to explain it better:

If I specify the position with actor.Direction (DI_UP), the result is the same as actor.Direction (DI_LEFT). The character is rotated 90ยบ to the right

If I put a light in the geometry file, the shadow is projected 90 degrees to the right, but instead of placing the light in the geometry file, I put the light in code with actor.SetLightPosition (x, y, z), where x, y, z as the same position that in the .3ds file, the shadows is display correctly.

I thought that maybe the character had to be in a exactly position respect to the z axis, we have rotated the character 90 degrees to the left, but the result is the same.

Any ideas?

This is a scene with actor.Direction(DI_UP) and the light in the 3ds geometry file:

(http://www.fnavarro.com/images/3dactor1.jpg)

This is a scene with actor.Direccion(DI_UP) and the light is in the script with actor.SetLightPosition(x,y,z):

(http://www.fnavarro.com/images/3dactor2.jpg)


Title: Re: Problem with 3d actor position
Post by: Jyujinkai on January 09, 2009, 07:24:44 PM
you need to build your toon at 0,0,0 and facing teh default directions... so when you look in the front viewport you see the front of teh file.

Make sure you use the tools panel to reset the xforms of the model before you skin and export. Then animate form there...

So if you doign a walk he need to walk foreard facing the front view port.
Title: Re: Problem with 3d actor position
Post by: HelLRaiseR on January 11, 2009, 03:22:48 PM
The actor is in x=0 and y=0, but the z value not is 0 becouse the 0 is the middle of the character height. The position is correct, the character front face is in the same direction that the max front indicator. Could be that the problem is the z value?

(http://www.fnavarro.com/images/jhonny_model.jpg)
Title: Re: Problem with 3d actor position
Post by: Jyujinkai on January 11, 2009, 05:57:07 PM
I would make sure that the animation is also in the correct direction first. So just check that when he walks "forward" in max he is still facing forward.

If that dose not work... I would same a copy of the file, strip off the skin (remember to save the skin info mation to a file first), make sure you toon is zeroed out.. as in have the pivot a 0,0,0 and all the scales at 100% and the rotations all at 0,0,0 You do this by getting the model in place and pivot in place then resetting the Xform. Then collapsing the stack. You now should have a working mesh that faces the correct direction... test it now.. by exporting it to a .X file... even though you have no skin or animation on it.. just define the idle and walk animations... you should now be able to walk around in wme and stuff... everything should be in the correct positions. After you get that working put back on a skin and then load in the vertex info mation..... This will get it all working.