Jump to content

FbxExporter generated model got a 90 degree rotation of X-axis?


foura
 Share

Recommended Posts

Hi,

I use FbxExporter to export the attached file rac_basic.fbx to babylon .

But after I load the generated file with babylonjs, it seems that the model get a 90 degree rotation of X-axis ? (The result is different from Autodesk's FBX Review tool.)

Is this a bug ?  

 

rac_basic.fbx

Link to comment
Share on other sites

Hi, Deltakosh

Thank you for your reply.

Yes, I can rotate after loding it. But I have a more complex model, and after I rotate every mesh after loading, the meshes of some nodes did not display on the right position or with the correct rotation. (see attached pic)  

I use the following code to rotate it, is it right?

for(var m in meshes){
                meshes[m].rotation.x = Math.PI/2;

}

I have not try to import in blender 3d, and I will try it.

babylon sample.png

Link to comment
Share on other sites

@foura,

Welcome to the forum. When load your file into MotionBuilder, I see the object and orientation below:rak_basic.jpg

If you are using MotionBuilder, the rotation you see is how the file was saved. I would parent the legs and rotate in MB, Maya, or Max - or an application with a Y axis up world orientation. I use the FBX format most of the time, as it is more flexible for objects and animations than Blender (depending on the scene), as well as most all attributes. I would rotate the objects 270 degrees (not 90 degrees) and freeze or bake all transforms (or just rotations) depending on which application you're using. If I knew which application you exported from, this would help answer your question. There are often orientation differences when exporting from various applications. However, the reason you are seeing a different orientation result in babylon is that the application you exported from must have a Z axis up world orientation, where as the FBX format is a Y axis up world orientation - and this is maintained in the FBX file format. Keep in mind that Blender is also Z axis up, but I believe this is corrected for .babylon during the export process. Also your object is not rotated 90 degrees, but you'll find that there is a 270 degree rotation placed on your models. Keep this in mind, as rotating 90 degrees will look correct, but numerically, your objects might have a 360 degree rotation added if you rotate 90 degrees instead of 270 degrees in the opposite direction.

And FYI - I saw upon loading that your scene contains NURBS surfaces, which I would convert to polygons before exporting, as well as your object is incredibly small, which can also cause a vast number of problems, and would be difficult to work with in babylon.js.

DB

Link to comment
Share on other sites

@foura - So if you don't have MotionBuilder or another Autodesk app, I would do what @Deltakosh recomended, and load your file into Blender (free!), rotate either 90 degrees or 270 degrees - it doesn't matter as long as you bake the rotations (very important) after you orient your scene correctly. I haven't seen the FBX converter display incorrectly before, but I usually use MotionBuilder, and do almost everything except modeling in MB.

Good Luck,

DB

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...