Advertisement

3DS Max - XNA: Rotation doesn't stick

Started by April 04, 2007 05:55 PM
3 comments, last by BLiTZWiNG 17 years, 9 months ago
Let me start by saying I am a programmer, not an artist, so I only occasionally dabble in the art packages. In max I have made a simple plane (Standard Primitives -> Plane) then adding a material map (a .bmp I made). The plane is created on the xy axis, with z being up. However as some of you may know, DirectX uses the y axis as up. The problem I have at the moment is that I would simply like to rotate my mode 90° around the x axis so that it is aligned along the z axis. The problem I have found however is that no matter how I rotate the plane, it always gets loaded into XNA in exactly the same orientation (ie on the xy plane as it was created, which in XNA makes it sit vertical). I have tried rotating in Local RCS, as well as rotating the pivot point, and then the object without affecting the pivot point, but it never changes on loading into max. I have heard that other packages (milkshape I think it is) can export the rotations correctly. I am currently exporting to .FBX as I know that panda and kw don't work in max 9. I was wondering if anyone knows a solution to this problem, or what the possible cause is. I used to use max 7 and I had the same problem when I exported using the panda DirectX plugin and loaded the model using MDX, so that pretty much eliminates file type, max version and DirectX API as the cause of the problem. As a reference, there are one or two people having similiar or same issues on the XNA forum, and this one post has a picture of exactly what is happening to me a few posts down. http://creators.xna.com/forums/4988/ShowThread.aspx#4988 Thanks.
Look for Left Handed Axis checkbox in your exporter settings.

[Edited by - spopo on April 5, 2007 11:38:11 AM]
Advertisement
Quote: Original post by spopo
Look for Left Handed Axis checkbox in your exporter settings.

Actually, I believe XNA uses a right hand coordinate system, unlike the usual DirectX left handed coordinate system.

It probably has something to do with Max, and how you are rotating it. I am assuming you are saving your changes, and re-exporting after making the rotation in Max, right? (I haven't specifically worked with Max, so I can't help you there. What it does look like though is that the Mesh isn't properly being rotated in Max (or not being saved properly, or something similar).
I dont know the panda exporter(that its name?) at all, but I can tell u that I have written my own exporters for 3dsmax 6, 7, & 8. That experience has told me that NEVER EVER USE 3DXI(IGame) for 3DSMAX SDK. The rotations will be absolutely bad. Now if that exporter for 3dsmax uses 3DXI(IGame) then they will of course be wrong. Do me a favor, does this panda exporter have a 3dsmax6 version? Try that. I found that the 3DXI for 7 and above is worse than on 6. My rotations and normals were atleast correct on 6. I had to upgrade because I wanted boning support. Which the later versions have but then they messed up the rotations and normals so I had to revert back to just using the 3DSMAX SDK without the garbage that is 3DXI.

So if you really want to fix the bug(if it exists) write yer own exporter. If panda uses 3DXI(IGame) then try the max 6 version to test it on.

GL!


Edit: not Panda but FBX sorry. Bottom line is find out if this FBX uses 3DXI(IGame) if so, the rotations will be wrong everytime. It needs to do its own conversion within the 3dsmax SDK DIRECTLY.
--X
Ok, now that I have panda 9 installed, I can see what I'm doing wrong, and what XNA is doing wrong (yes, I'm not the only one at fault!)

Max (or panda) is adding in the scene transform as a frame, then adding in the object frame, so even if you make the simplest of meshes, the mesh you made is the child of a frame in the file.

On top of that, XNA is adding in an identity matrix to your frame, so you have

Scene Transform (identity)
|
+ Object Transform (our desired transform)
|
+ Extra Unwanted Identity Transform (added by XNA)
|
+ Mesh

I can work around this of course, but the extra stuff is annoying.

This topic is closed to new replies.

Advertisement