OBJs exported with Blender are rotated incorrectly in other apps
Closed, InvalidPublic


System Information

Blender Version

Short description of error

I've read other bug reports, I still don't understand what happens to a model's X/Y/Z axis during import/export to OBJ

Exact steps for others to reproduce the error

  1. build a model facing X, with Z up (Blender default)
  2. Export with X the same as viewport and Y as UP (for Maya and Three.js): X forward, Y up
  3. Import into Maya or Three.js
  4. Result: model is facing Y, instead of X, Z is UP correctly
  5. Import back into Blender with same settings (X forward, Y up) and it's facing X (correctly)

I can confirm that exporting with Z forward when X forward in viewport, or X forward when Y forward in viewport yields correct results.

This tells me that there's an extra transform happening during import/export which looks like a bug (we haven't seen such behavior from clients using Maya or 3DS). When we tell our clients to give us models exported as Y is UP and X is forward, we expect them to work, but they require manual transforms, which impacts our business negatively.

I've confirmed that exporting/importing collada doesn't have this issue.

StackOverflow question with images here: http://stackoverflow.com/questions/41640704/three-js-obj-importer-displays-model-facing-the-wrong-way
Files here: https://www.dropbox.com/s/ubcxqp9bc4pnr6e/Models.zip?dl=0

Something tells me there's an extra X/Y flip that happens on import export that I don't see in other tools, like Maya, Max, etc



I don't have this problem.

Exporting from Maya or 3dsmax without touch any parameter and importing in Blender without change any value gives me good result.

@Aaron Carlisle (Blendify) That's exactly why I think there's an issue.

In Blender's OBJ Export, the default output options are:
-Z forward
Y up

If you don't touch the settings, you would expect the model to be facing -Z with Y as up, correct?
In Maya however, it shows up facing X, same as Blender, which means it doesn't respect the Forward option. The Up option is being respected.

Our software uses Z as up, and X forward so we have to tell clients using Blender to export with the following:
X forward
Z up

The models come to us facing Y, because of the above described issue.
The only way to get it facing X, is by exporting with:
Y forward
Z up

Please retest by setting Maya's up Axis to "Y" and changing export settings.

Please, don't use dropbox, attach the files directly in this thread. They can be zipped if necessary. If the files are too big to attach, please simplify them (they should be simple to start with anyways ;) )

Joey Ferwerda (TheOnlyJoey) claimed this task.

This report has passed the limit of inactivity, will be closed as archived.

Didn't realize this was waiting on me. Please keep this open as we have clients being affected by this.

Attaching the Models.zip file here.

Please let me know if you need more info, this issue is easy to reproduce, as advised above. You need Blender and another software (Maya, 3ds, etc). You need to export an OBJ from blender (you can use attached Blend file) and change the Up and Forward directions to a certain value, and see that the resulting models DO NOT face those values in Maya or 3Ds or other software.

I don't understand this:
"Please retest by setting Maya's up Axis to "Y" and changing export settings."
are you changing maya defaults here?

That was a typo, I meant to say, change it to Z as "up", because Maya's default is Y. This is done to mimic our target environment, where Z is up.

If Blender OBJ export settings are left untouched, everything looks right in Maya. However, if we do need to tweak those settings, that's when the settings don't match the result in Maya (or anywhere else but Blender).

This is what leads me to believe either:

  1. To rotation code that corresponds to user selection of "forward" during export is broken
  2. The rotation code is correct, just incorrectly mapped to UI display values

In short, you can easily reproduce by the following steps:

  1. Export OBJ with Z as up and X as forward
  2. Import OBJ into Maya
  3. Notice how it's facing Y, instead of X

Then just change orientation export settings to get expected result, I do not understand what’s is the point of this report? Also, deciding what is front/back axis is always fuzzy, found many descriptions using one version or the inverted one… just use whatever setting that works for you. Our orientation settings are consistent and respect a given logic, which matches Blender's one - there is no guaranty that other applications do not use some other version with some reverted axes.