Rotation of 3ds and obj models

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
nemis99
Posts: 3
Joined: Wed Mar 12, 2008 1:05 am

Rotation of 3ds and obj models

Post by nemis99 »

I recently noticed something strange and was wondering if anyone else have seen this. I have a .3ds model (of car) and just displays the model in a small irrlicht demo. Then I open the model in Blender and export it as .obj and displays the .obj model in Irrlicht. Now the model is rotated 180 degrees compared to the .3ds model. Does Irrlicht give .3ds and .obj models different rotations or am I doing something wrong?
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Well what axis does it rotate the node 180 degress on? If I am remember correctly, it just has to do with the exporter, not the Irrlicht loader. The exporter may have the Z axis switched with the Y axis compared to Irrlicht, which is usually the case. And if that is the case, then the exporter should provide a method for you to flip axeses. And if it doesn't, then you mines well just rotate it in the modeler.
TheQuestion = 2B || !2B
nemis99
Posts: 3
Joined: Wed Mar 12, 2008 1:05 am

Post by nemis99 »

Yes it's rotated around the Blender Z-axis which is Y-axis in irrlicht. It's just a bit confusing as it's different for different formats.
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

nemis99 wrote:Yes it's rotated around the Blender Z-axis which is Y-axis in irrlicht. It's just a bit confusing as it's different for different formats.
Yeah, then just swap the axes with the exporter, if the OBJ exporter allows that. (Which if I recall correctly, it doesn't.) And if it doesn't, then just manually rotate it, and that should be just fine for you.
TheQuestion = 2B || !2B
nemis99
Posts: 3
Joined: Wed Mar 12, 2008 1:05 am

Post by nemis99 »

Thanks a lot. No, I don't think it is possible with the exporter so I just have to rotate all the .obj models.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

If you have a matrix lib, you can rotate and scale the model during init().

I have my own matrix lib and believe me, that thing can work wonders.

Hope that made sense.
Image
Post Reply