3

My question is about loading .fbx models in my application which uses openGL 3.3, FreeImage and FBX SDK 2014.2

I'm using 3ds max 2014 which is z-up oriented. However openGL is Y up oriented. So, when I try to load a model, it is rotated!

I tried several methods. 3ds max fbx plugin has fbx exporter. I selected both Y and Z as up- axis under Axis Conversion-> Up Axis, but no effect. The model is still rotated.

Then I tried ConvertScene() function, but still no effect. Then I found out that CobvertScene() doesn't convert the axis system of the node.

Is there any effective way to load .fbx models correctly in openGL? How to change the up_Axis of the model when loading it in openGL?

genpfault
  • 51,148
  • 11
  • 85
  • 139
mirushaki
  • 897
  • 1
  • 10
  • 13

1 Answers1

2

Axis conversion is handled by FbxAxisSystem, like so:

FbxAxisSystem directXAxisSys(FbxAxisSystem::EUpVector::eYAxis,
    FbxAxisSystem::EFrontVector::eParityEven,
    FbxAxisSystem::eRightHanded);
directXAxisSys.ConvertScene(scene);

By default it overwrites the scene you feed it, but there's an overloaded ConvertScene() function if you don't want that functionality.

If you have another system you want to convert to, check the defaults in FbxAxisSystem, they're declared as static constants.

Dragoon
  • 21
  • 2