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.


left handed coordinate system and OBJ files?


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
3 replies to this topic

#1 Blessman11   Members   -  Reputation: 110

Like
0Likes
Like

Posted 09 November 2011 - 09:51 AM

hi

Does an obj file format like the one in 3D max, support a right handed coordinate system only via export? I've been worriying about this since it would mean that I would have to plan for a way to convert such coordinates in order to import them to my left-handed coordinate system.

Sponsor:

#2 FLeBlanc   Crossbones+   -  Reputation: 3117

Like
1Likes
Like

Posted 09 November 2011 - 10:05 AM

Handedness is not an attribute of the .OBJ file format, it is purely a function of the exporter and importer. An .OBJ file only handles data. I'm only familiar with the Blender exporter for .OBJ, but it allows you to specify the axes upon export, converting from Blender's coordinate system to the coordinate system specified by your choice of Forward and Up axes. So I'd imagine that if the free and open source software does it, then the commercial one probably does as well.

#3 Blessman11   Members   -  Reputation: 110

Like
0Likes
Like

Posted 09 November 2011 - 11:48 AM

Handedness is not an attribute of the .OBJ file format, it is purely a function of the exporter and importer. An .OBJ file only handles data. I'm only familiar with the Blender exporter for .OBJ, but it allows you to specify the axes upon export, converting from Blender's coordinate system to the coordinate system specified by your choice of Forward and Up axes. So I'd imagine that if the free and open source software does it, then the commercial one probably does as well.


thanks

#4 iedoc   Members   -  Reputation: 1056

Like
0Likes
Like

Posted 09 November 2011 - 10:22 PM

but just so you know, it is very easy to convert a model from a right handed coordinate system to left hand.

1. Invert the z-axis by multiplying it with -1.0f (vertex position, normal, etc.)

2. invert the v axis of texture coordinates by subtracting it from one (eg. texcoord.v = 1 - texcoord.v)

In my functions, just in case I have a boolean parameter that is true if it a right handed model, and false if it is not. if it is a right handed model, then the conversion is done while loading the model, otherwise, the conversion is not done.
Braynzar Soft - DirectX Lessons & Game Programming Resources!




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