Skip to content
This repository has been archived by the owner on Aug 22, 2018. It is now read-only.

Imported models have wrong rotation #22

Closed
kininarimasu opened this issue Sep 21, 2014 · 3 comments
Closed

Imported models have wrong rotation #22

kininarimasu opened this issue Sep 21, 2014 · 3 comments
Assignees
Milestone

Comments

@kininarimasu
Copy link

I imported the model from blender. In Paradox Studio it looks inverted, and in the game it looks rotated 90 degrees to the left.

image

@jwollen
Copy link

jwollen commented Sep 22, 2014

I looked into this a bit, too. There seem to be a few things going on. Sadly, the disassembly of the importers is not really human readable, so I can't investigate much further.

These are my observations so far. Tested with a trivial untransformed mesh, exported from blender, as well as the models from the samples. Results can be confirmed using AssimpView.

  1. Assimp importer
    1. There is some mirroring introduced (most likely along the z-axis). This sounds like LH coordinates are treaded as RH. (Possibly a wrong importer option?)
    2. The root node transform seems to be ignored. Assimp bakes the transformation from authoring-space to it's internal space into this node. This is easily tested by changing the <up_axis> of a DAE file, which has no effect.
    3. The model orientation should probably default to [Y-up, (-Z)-front], as this is what Assimp outputs by convention. Setting these axes (and assuming 1. and 2. were fixed) would lead to a correct preview.
  2. Fbx importer
    1. The model orientation should probably default to [Y-up, (-Z)-front], as this is what should have been baked into top-level objects. This also seems to yield a correct preview. I'm unsure about the treatment of the coordinate frame stored in fbx-metadata though.
  3. In both cases the design-time-orientation seems to not be respected at run-time at all. It falls back to the orientation achieved in the preivew using [Z-up, Y-front];

@xen2
Copy link
Contributor

xen2 commented Sep 22, 2014

Thanks for the bug reports, we'll look into that!

It's true that we mostly focused on FBX, and DAE is lagging behind.
It will definitely need some more love, we will focus on that.

And you are right, up axis as specified in editor is only used for preview.
Your game up axis and your asset up axis are supposed to match.
We could consider rearranging options and adding one to also do this rotation when building asset.

@jwollen
Copy link

jwollen commented Sep 22, 2014

It's true that we mostly focused on FBX, and DAE is lagging behind.

That's reasonable. Fbx exporters are mostly superior anyway.

Your game up axis and your asset up axis are supposed to match.
We could consider rearranging options and adding one to also do this rotation when building asset.

I'd actually rather not have that option, as it promotes bad asset exporting workflow.

@xen2 xen2 self-assigned this Sep 27, 2014
@xen2 xen2 added this to the beta01 milestone Oct 10, 2014
@xen2 xen2 assigned Twelvy and unassigned xen2 Oct 10, 2014
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants