Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


libgdx, 3d models, fbx and coordinate system mess


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 syskrank   Members   -  Reputation: 193

Like
0Likes
Like

Posted 10 August 2014 - 06:06 AM

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?

 



Sponsor:

#2 syskrank   Members   -  Reputation: 193

Like
0Likes
Like

Posted 12 August 2014 - 02:08 PM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS