Sign in to follow this  
Darkbouncer4689

jointOrientX vs rotateX

Recommended Posts

Hey all,

I'm using collada files and have seen the following come up.

<translate sid="translate">0 6.84326 -0.145007</translate>
<rotate sid="jointOrientZ">0 0 1 90</rotate>
<rotate sid="jointOrientY">0 1 0 84.6854</rotate>
<rotate sid="jointOrientX">1 0 0 90</rotate>
<rotate sid="rotateZ">0 0 1 0</rotate>
<rotate sid="rotateY">0 1 0 -4.56752</rotate>
<rotate sid="rotateX">1 0 0 0</rotate>

I assumed that jointOrient was the same as rotate but now that my model is completely destroyed when rendered I believe this may be wrong. I'm using Collada and I'm not sure if this is a collada only issue, but what is the difference between jointOrient and rotate?

Thanks!

Share this post


Link to post
Share on other sites
Possibly a pre rotate or a post rotate. I recognise the naming style, might be from 3ds? Anyway, check the specific collada exporter documentation for info might be a place to start.

Share this post


Link to post
Share on other sites
The sid names are completely arbitrary -- they could be named "[i]jointFooBaz67[/i]" and "[i]translateScale[/i]", and the model would be unchanged. All you need to do is apply the listed transformations in the specified order, without even looking at the 'sid' field.

Share this post


Link to post
Share on other sites
Thanks guys. Yeah I have a collada book but it fails to specify what jointOrient does.

So if I simply ignore the SID's and perform the rotations in order from top to bottom it should turn out correct?

That's what I did but my model explodes when I perform skinning. I have two of the same file, one in max and one in maya, the one in max simply has a 4x4 matrix instead of the translation/rotations and I get different values when I do the translation/rotations in order.

Share this post


Link to post
Share on other sites
[quote name='Darkbouncer4689' timestamp='1310578670' post='4834915']So if I simply ignore the SID's and perform the rotations in order from top to bottom it should turn out correct?
I have two of the same file, one in max and one in maya, the one in max simply has a 4x4 matrix instead of the translation/rotations and I get different values when I do the translation/rotations in order.
[/quote]That sounds like a decent way to check if you've got the transforms right (assuming the max exporter is correct). Could be that you're interpreting values wrong (column vs row major, etc) or that you're performing the matrix multiplies back-to-front (as they're non-commutative).[quote] my model explodes when I perform skinning.[/quote]this could also be because you've missed some other part of the implementation, such as not concatenating each nodes transform onto it's parent's, or not making use of the inverse bind matrices.

Share this post


Link to post
Share on other sites
[quote name='Darkbouncer4689' timestamp='1310506978' post='4834529']I'm using Collada and I'm not sure if this is a collada only issue, but what is the difference between jointOrient and rotate?
[/quote]

joint orient is a pre rotation.

Final Rotation = pre * rotate

You may also find occasions where a post rotate is also present (aka rotate orient, or rotate axes).

Share this post


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

Sign in to follow this