How to export node rotation from 3DS MAX?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Yoshiko
Posts: 17
Joined: Mon Feb 23, 2009 7:04 pm

How to export node rotation from 3DS MAX?

Post by Yoshiko »

I tried to make a script to create irrscene xml, but faced with the problem. I can't figure out how to transform the angles of rotation, to properly transfer them to irrlicht.
I tried all changes(XYZ, XZY, YXZ, YZX, ZXY, ZYX) and inversion(+++, ---, -++, +-+, ++-, +--, -+-, --+) of axes, but it didn't help :cry: ...

Please help me...
Yoshiko
Posts: 17
Joined: Mon Feb 23, 2009 7:04 pm

Hey! Did anyone hear me?

Post by Yoshiko »

What's wrong? Is it too complex a question?
Nobody knows the answer?
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Perhaps nobody understands the question. I don't! What coordinate system does 3DS Max use?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

well, I also don't realy understand the question...
but as far as you're talking about rotations, maybe this could help:
3dsm uses Z as up vector, means the world is rotated by 90° around the X axis compared to Irrlicht...
so 3dsm meshes must be rotated by -90° around X to get Y as up vector...

also, for 3dsm scripting questions you should visit a 3dsm forum, probably... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Yoshiko
Posts: 17
Joined: Mon Feb 23, 2009 7:04 pm

Post by Yoshiko »

Acki wrote: so 3dsm meshes must be rotated by -90° around X to get Y as up vector...
You mean something like this?

Code: Select all

format "<vector3d name="Position" value="%, %, %" />\n" irrnode.pos.x irrnode.pos.z irrnode.pos.y to:irrscene -- it's OK
format "<vector3d name="Rotation" value="%, %, %" />\n" (irrnode.rotation.x_rotation - 90) irrnode.rotation.z_rotation irrnode.rotation.y_rotation to:irrscene -- My problem there
-- irrnode is a 3DSMAX scene object
-- irrscene is a filestream
Nothing working
Acki wrote: also, for 3dsm scripting questions you should visit a 3dsm forum, probably... ;)
Do you realy think they even know something about irrlicht?
And I know how to use the maxscript. I'm interested in the mathematical side of the question.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Yoshiko wrote:You mean something like this?

Code: Select all

format "<vector3d name="Position" value="%, %, %" />\n" irrnode.pos.x irrnode.pos.z irrnode.pos.y to:irrscene -- it's OK
format "<vector3d name="Rotation" value="%, %, %" />\n" (irrnode.rotation.x_rotation - 90) irrnode.rotation.z_rotation irrnode.rotation.y_rotation to:irrscene -- My problem there
-- irrnode is a 3DSMAX scene object
-- irrscene is a filestream
looks nearly good, beside that it must be X, Y, Z and not X, Z, Y...
also this is only for a single object usable, if you have more than one mesh in the 3dsmax scene you'll have to rotate the whole scene, not only the meshes one by one...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Yoshiko
Posts: 17
Joined: Mon Feb 23, 2009 7:04 pm

Post by Yoshiko »

I don't want to rotate objects in max. I want to calculate coordinates of rotation into the irrlicht for every object of scene.
Strong99
Admin
Posts: 687
Joined: Fri Mar 31, 2006 7:06 pm
Location: Netherlands
Contact:

Post by Strong99 »

max and irrlicht using different coordinate systems the so called left and right-handed coordinate systems,
I think you need to search to left-handed and right-handed coordinate systems for more information

http://en.wikipedia.org/wiki/Coordinate_system

and I think Acki said the thing you want...
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

strong99 wrote:and I think Acki said the thing you want...
I think so, too... :lol:

well, I never said to rotate it in 3dsmax...
but in the end it doesn't matter where and how you rotate it, it's completely your choice, but you'll have to rotate it somewhere/somehow about -90° around X !!! ;)

and of course you'll have to rotate the complete scene, not only the meshes one by one...
if you rotate each single mesh then this meshes will be corectly orientated, but the whole scene won't... :lol:
a simple example: you have 2 cubes one above the other and you want them to be side by side, then it doesn't help to rotate each cube around itself (like you do now), you'll have to rotate both cubes at the same time around a certain point...
otherwise they're still one above the other... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply