libgdx, 3d models, fbx and coordinate system mess

Started by
0 comments, last by syskrank 9 years, 8 months ago

Hello everyone.

I hope someone could help me, because I'm completely stuck.

So here's the plot:

I'm using libgdx and it's 3d rendering capabilities ( but custom GLSL shaders ) along with Blender to create 3d content. The thing that pisses me off completely is when I'm exporting model from Blender to FBX format and then using fbx-conv utility to transfer everything to G3DB, I'm getting the same freaking model orientation in the output, e.g. all my models appears to be turned 90 degrees around Ox, despite my attempts to set another 'up' or 'forward' axes when I'm exporting from Blender.

Libgdx documentation says that I should use 'Z up' setting most of the time, but this isn't working for me at all - all models are dropped to their left side on the ground.

Blender version - 2.70a;

FBX framework - 2014 version from Autodesk, as it's recommended by fbx-conv documentation;

fbx-conv - lasted snapshot from their repository, compiled against FBX framework;

Halp!

Thanks in advance.

P.S.

Maybe libgdx supports some other 3d formats with skeletal animation?

Advertisement

So, I've managed to find a solution to this wrong FBX model orientation problem.

It's completely a hack, but there's no better solution since fbx-conv, or Blender exported have bugs inside their code.

The solution is: create own Transform class, incorporate it inside GameEntity class and every time you update graphics component's transform, set it's orientation with constant delta offset rotation around X axis by -90 degrees.

Will see in future how this affects skeletons and animations but it SHOULD be Ok.

This topic is closed to new replies.

Advertisement