PDA

View Full Version : How read World Y-Axis from Free Camera


thorsten hartmann
01-07-2011, 06:03 PM
Hi Guys,

i have look 1-2 hour at the manual, but my english is very poor. How can i read the Y-Value of a Free Camera.

thank you guys so much for help.

mfg
hot chip

PiXeL_MoNKeY
01-07-2011, 09:50 PM
Use quatToEuler2 on the rotation.controller.value should return what you want.quatToEuler2 <quat> Returns the same Euler value for the given Quaternion as shown in the Transform Type-In dialog. Available in 3ds Max 2008 and higher. Previously available in the [AVG (http://forums.cgsociety.org/) ] Avguard Extensions.It only works properly when using it on the rotation.controller.value. For example in a test scene I have rotations displayed as X:-28.3988 Y:-4.72909 Z:-33.7424 in the UI.quatToEuler2 $.rotation
(eulerAngles 26.431 -11.7636 32.1679)

quattoeuler2 $.rotation.controller.value
(eulerAngles -28.3988 -4.72909 -33.7424)-Eric

thorsten hartmann
01-07-2011, 11:25 PM
ah cool Eric, and thank you very much. I try that.

mfg
hot chip

Ruramuq
01-08-2011, 12:10 PM
Use quatToEuler2 on the rotation.controller.value should return what you want.It only works properly when using it on the rotation.controller.value.
Right-hand vs left-hand rotation,
Also apparently there is no difference between quatToEuler and quatToEuler2

quatToEuler2 (inverse $.rotation)
quatToEuler2 $.rotation.controller.value
(eulerAngles 44.4497 -27.0388 -29.3219)
(eulerAngles 44.4497 -27.0388 -29.3219)
quatToEuler (inverse $.rotation)
quatToEuler $.rotation.controller.value
(eulerAngles 44.4497 -27.0388 -29.3219)
(eulerAngles 44.4497 -27.0388 -29.3219)

blake_spector
01-08-2011, 06:59 PM
Just for the sake of mentioning, you could also use the ExposeTransformHelper. Might be a lil' too much in this example, but when it gets more complex it really gives easy access to all those values (even has this 'copy to maxscript' button beneath every value).

PiXeL_MoNKeY
01-10-2011, 02:58 PM
Right-hand vs left-hand rotation,
Also apparently there is no difference between quatToEuler and quatToEuler2Thanks for that note on the topic, I guess that is what this Note from the Maxscript Help is referring to:Note: Rotation in the internal transformation matrices is left-handed in contradiction to the 3ds Max user interface and MAXScript. Take care when mixing rotation derived from these matrices and rotation used in rotation-related functions or from rotation properties.-Eric

MikieK
05-10-2011, 09:27 PM
..........

CGTalk Moderation
05-10-2011, 09:27 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.