foura Posted April 10, 2016 Share Posted April 10, 2016 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 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 10, 2016 Share Posted April 10, 2016 Hello! Did you try to import it in blender 3d? As last resort, you can still rotate it after loading it Quote Link to comment Share on other sites More sharing options...
foura Posted April 11, 2016 Author Share Posted April 11, 2016 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. Quote Link to comment Share on other sites More sharing options...
dbawel Posted April 11, 2016 Share Posted April 11, 2016 @foura, Welcome to the forum. When load your file into MotionBuilder, I see the object and orientation below: 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 Quote Link to comment Share on other sites More sharing options...
foura Posted April 11, 2016 Author Share Posted April 11, 2016 @dbawel, Thank you for your help. The fbx file is exported from REVIT. And here is the view result from FBX Review. Quote Link to comment Share on other sites More sharing options...
dbawel Posted April 11, 2016 Share Posted April 11, 2016 @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 GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.