left handed coordinate system and OBJ files?

Started by
2 comments, last by iedoc 12 years, 5 months ago
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.
Advertisement
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.

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
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.

This topic is closed to new replies.

Advertisement