Hello everyone!
I was wandering through the documentation trying to find the set of functions to build an xform matrix for points if the inputs I have are an @orient quaternion, vector for translation and a vector for scale (other than a pile of setcomponent()) but I am not really finding it. Do you have any clue? I am sure there is a straight forward way I am missing.
Thanks!
xform from orient, P and scale (vex)
488 5 0- Cicuta
- Member
- 55 posts
- Joined: Nov. 2019
- Offline
- alexwheezy
- Member
- 201 posts
- Joined: Jan. 2013
- Offline
You might be looking for this:
https://www.sidefx.com/docs/houdini/vex/functions/instance.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/vex/functions/instance.html [www.sidefx.com]
- Cicuta
- Member
- 55 posts
- Joined: Nov. 2019
- Offline
- Cicuta
- Member
- 55 posts
- Joined: Nov. 2019
- Offline
- tamte
- Member
- 8555 posts
- Joined: July 2007
- Offline
Cicutabetter than what?
Alternatively given a rotation matrix3 a vector3 scale and a vector3 P, what is the better way of combining all that into a single 4x4 matrix xform? (as the instance() func would)
Thanks!
you can still use instance function()
matrix xform = instance( P, {0,0,1}, scale, quaternion(rotation), {0,1,0});
or you can also do it this way for example:
matrix xform = matrix3( rotation ); scale( xform, scale ); translate( xform, P );
or this way:
vector euler = cracktransform( 0, 0, 1, {0,0,0}, matrix3(rotation) ); matrix xform = maketransform(0, 0, P, euler, scale);
and probably many others, but I haven't measured which one is the fastest
Edited by tamte - March 22, 2024 11:27:00
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Cicuta
- Member
- 55 posts
- Joined: Nov. 2019
- Offline
-
- Quick Links