Giter Site home page Giter Site logo

Comments (3)

jwollen avatar jwollen commented on August 16, 2024

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];

from xenko.

xen2 avatar xen2 commented on August 16, 2024

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.

from xenko.

jwollen avatar jwollen commented on August 16, 2024

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.

from xenko.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.