Scale orientation from Transformation Matrix

Started by
1 comment, last by Buckshag 17 years, 9 months ago
I am writting VRML like exporter for 3dsmax. Transformation in VRML is defined as: P' = T × C × R × SR × S × -SR × -C × P where: C-center SR-scaleOrientation S-scale T-translation R-rotation There is no problem in extracting Translation and Rotation, but how do i get scaleOrientation? Thanks
Bulma
Advertisement
I would assume the scale orientation is a rotation and the scaling is strictly along the axes, i.e. x, y, z and perhaps w scaling.
Keys to success: Ability, ambition and opportunity.
You have two options:

1.) Use the 3D Studio Max decomp_affine(...) function to decompose the matrix into the elements you need. This includes the scale orientation, which is stored in the affineParts.u member if I remember correctly from the top of my head.

2.) Use Ken Schoemake's code from Graphics Gems which basically does the same thing as the decomp_affine, which uses polar decomposition of the matrix.


I used both, but ended up having to use the 3DSMax native decomp_affine later on as I had some issues with animating / interpolating the scale orientation when using the results of Ken's code.

So just check out the decomp_affine function in Max. It will give you exactly what you need :)

- John

This topic is closed to new replies.

Advertisement