Results 1 to 3 of 3

Thread: Best way of dealing with the up axis?

  1. #1
    Junior Member
    Join Date
    Aug 2005
    Location
    Melbourne, Australia
    Posts
    11

    Best way of dealing with the up axis?

    I'm just wondering what is the best way to alter the model data to reflect the value of the up axis tag. The engine I'm using has the Y axis as the up axis, when a DAE's up axis differs from Y what data do I need to process? Is there are simple way to do it (ie a transform at the bottom of the models scene graph) or does one have to alter each data point swapping x, y, and z values. (as I understand it transforms are fairly cheap on todays graphics equipment)

    This has to be dealt with at run time as users are going to be throwing all manner of junk at the importer :P

    Thanks!

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    There are only 3 possible orientations that the importer has to deal with.
    The data should be converted by the importer to the coordinate system used in your tool/engine.
    Exporters do not need to do any changes, provided that they use one of the 3 possible modes in COLLADA.

    Everythink that relies on axis needs to be converted. This includes vertex, normals, transformations (translation and rotations) ... But the conversion is very simple, this is a matter of swapping coordinates, and negating when needed.

    Be aware that <asset> are hierachical, so one COLLADA document can have assets in all 3 possible orientations. Orientations do not accumulate, they are modal.

    I guess what we should do is to provide a conditioner that can do those conversions as a sample in the Refinery distribution...

  3. #3
    Junior Member
    Join Date
    Aug 2005
    Location
    Melbourne, Australia
    Posts
    11
    Thanks remi, an example would be great as I haven't found much on the net about it; but no hurry it isn't hard just wanted to make sure I was going about it the right way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •