Jump to content

Why does Blender always export my Collada dae as x transferred to z and visa versa


Recommended Posts

This is the norm in the world of 3D-apps, 3DCrafter and Sketchup also use a different order of the axes. I think the origin is in maths where typically the X axis is viewed as running left to right along the paper, and so Applications using the maths basis will view the Z axis is going into the paper. Others will view the Y axis as going into the paper and the Z axis as going up the paper.

Link to post
Share on other sites
Posted (edited)

My blender shows correct axis why when it gets into LSL is z swapped for x?:
ab960bdffcdb092a0878692d445cad12.png
The strange thing is its only reported in scripting that  is wrong  any ideas please? As you saw prof the axis are correct on object. Why does scripting make a mess of them? It happens to all my imports so there must be something. 

Edited by VirtualKitten
Link to post
Share on other sites
Posted (edited)

What part of your script is telling you Z is swapped for X? Are you perhaps asking for the orientation of one particular attachment relative to its bone instead of the world orientation? Z = UP is the one world direction that is consistent between Blender and SL.

Also, make sure you are using the correct sim coordinates and orientation, especially the angles. These are the angles you will get if you call llGetRot() (and convert from quaternions to Euler form and then convert the Z spin from radians to degrees) to determine which way your avatar is facing.

SLcoords.png

Edited by Quarrel Kukulcan
Link to post
Share on other sites
Posted (edited)
On 5/4/2021 at 8:34 PM, VirtualKitten said:

Why does Blender always export my Collada dae as x transferred to z and visa versaes blender always export my x axis as z axis in Collada Export ?

There are two schools when it comes to 3D orientation:

  • World space: +X is forward, +Y is left, +Z is up (architectural POV, the world is mostly flat, Z only matters if there is some height).
  • Screen space: +X is right, +Y grows up, +Z is forward (screen POV, we don't change X and Y we just add Z).

Neither is inherently wrong, they simply conceptualize 3D space from a different starting point.

Edited by Kyrah Abattoir
Fixed slight mistake
Link to post
Share on other sites
Posted (edited)

I think its the scripts giving back this as the model is ok . I have found a Collada  output. This normally defaults to y instead of x for some reason :i need x forward faxing for animesh. the forward axis gets set to y why ?

9c9468ee6e9b525bba000f2bf8c85ded.png

Edited by VirtualKitten
Link to post
Share on other sites
On 5/6/2021 at 11:44 AM, VirtualKitten said:

I think its the scripts giving back this as the model is ok . I have found a Collada  output. This normally defaults to y instead of x for some reason :i need x forward faxing for animesh. the forward axis gets set to y why ?

9c9468ee6e9b525bba000f2bf8c85ded.png

The apply checkbox is not checked, so the transforms aren't being applied upon export and most likely would come back into the 3d app with rotations

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...