Hello,
the documentation about this node does not clarify too much (for me at least). Could somebody clarify a little bit about what applications is it useful for? Some test files to practice? When do you use it?
Thanks in advance.
Look At VOP node
3491 11 2 Dav_Rod
 Member
 40 posts
 Joined: March 2018
 Offline
 Dav_Rod
 Member
 40 posts
 Joined: March 2018
 Offline
Okay, at the end I could create a Rotation matrix for that small primitive.
So, now if I multiply the created matrix by the z_axis (0,0,1) I will get my local_z_axis.
I would like to visually check that out…
So following my intuition I tryed to do:
(RotM) x (0,0,1)=?
But I can not do that with the multiply node. I can only do:
(0,0,1)x (RotM)
and the result that I get is (z_localaxis)
Can somebody help me to understand this? Am I missing something about how Houdini represents vectors maybe? (rows, colms?)
Can somebody link some documentation about this?
Thanks in advance.
So, now if I multiply the created matrix by the z_axis (0,0,1) I will get my local_z_axis.
I would like to visually check that out…
So following my intuition I tryed to do:
(RotM) x (0,0,1)=?
But I can not do that with the multiply node. I can only do:
(0,0,1)x (RotM)
and the result that I get is (z_localaxis)
Can somebody help me to understand this? Am I missing something about how Houdini represents vectors maybe? (rows, colms?)
Can somebody link some documentation about this?
Thanks in advance.
Edited by Dav_Rod  May 20, 2018 17:55:06
 zengchen
 Member
 77 posts
 Joined: Feb. 2017
 Offline
Look at function:
http://www.sidefx.com/docs/houdini/vex/functions/lookat.html [www.sidefx.com]
the target's new zaxis = normalize(vector from  vector to)
(I do not know why it is (from  to) but not (to  from)…)
if you use vector up, the target's new xaxis = normalize(cross(vector up, vector new zaxis))
Cross product function:
http://www.sidefx.com/docs/houdini/vex/functions/cross.html [www.sidefx.com]
look at function is similar to the first maketransform function:
>>> matrix3 maketransform(vector zaxis, vector yaxis)
http://www.sidefx.com/docs/houdini/vex/functions/maketransform.html [www.sidefx.com]
http://www.sidefx.com/docs/houdini/vex/functions/lookat.html [www.sidefx.com]
the target's new zaxis = normalize(vector from  vector to)
(I do not know why it is (from  to) but not (to  from)…)
if you use vector up, the target's new xaxis = normalize(cross(vector up, vector new zaxis))
Cross product function:
http://www.sidefx.com/docs/houdini/vex/functions/cross.html [www.sidefx.com]
look at function is similar to the first maketransform function:
>>> matrix3 maketransform(vector zaxis, vector yaxis)
http://www.sidefx.com/docs/houdini/vex/functions/maketransform.html [www.sidefx.com]
Edited by zengchen  May 21, 2018 03:14:41
 Dav_Rod
 Member
 40 posts
 Joined: March 2018
 Offline
Thanks a lot for the info and specially for the file zengcheng 01. It was really useful work with it in the Vex form.
But my initial questions are still open:
1st: The rotation defined in the theory works like this:
(RotMatrix)x(Vector) as we can see in any Algebra book.
But in the vex from the example it is done the opposite way:
v@P = @P * rotation; And as you can see in my initial post, also in the VOPs I have to do (Vector) * (RotMat). I could not do (RotMat)*(Vector)
2nd: In the vex code in the example the from and to vectors are defined in the opposite way as it should be.
I could not find any other post talking about it.
Can somebody help to understand this?
Thanks in advance.
But my initial questions are still open:
1st: The rotation defined in the theory works like this:
(RotMatrix)x(Vector) as we can see in any Algebra book.
But in the vex from the example it is done the opposite way:
v@P = @P * rotation; And as you can see in my initial post, also in the VOPs I have to do (Vector) * (RotMat). I could not do (RotMat)*(Vector)
2nd: In the vex code in the example the from and to vectors are defined in the opposite way as it should be.
I could not find any other post talking about it.
Can somebody help to understand this?
Thanks in advance.
Edited by Dav_Rod  May 21, 2018 10:58:04
 zengchen
 Member
 77 posts
 Joined: Feb. 2017
 Offline
Dav_Rod
Thanks a lot for the info and specially for the file zengcheng 01. It was really useful work with it in the Vex form.
But my initial questions are still open:
1st: The rotation defined in the theory works like this:
(RotMatrix)x(Vector) as we can see in any Algebra book.
for the first question:
the vector in Houdini has three columns but not three rows…
Edited by zengchen  May 21, 2018 11:31:31
 jsmack
 Member
 7547 posts
 Joined: Sept. 2011
 Offline
Houdini matrices will be represented transposed from how they are in math text books. Houdini uses Rowmajor matrices, which are multiplied in reverse order from column major.
https://en.wikipedia.org/wiki/Row_and_columnmajor_order [en.wikipedia.org]
https://en.wikipedia.org/wiki/Row_and_columnmajor_order [en.wikipedia.org]
 zengchen
 Member
 77 posts
 Joined: Feb. 2017
 Offline
 Dav_Rod
 Member
 40 posts
 Joined: March 2018
 Offline
jsmack
Houdini matrices will be represented transposed from how they are in math text books. Houdini uses Rowmajor matrices, which are multiplied in reverse order from column major.
https://en.wikipedia.org/wiki/Row_and_columnmajor_order [en.wikipedia.org]
ouuuuuukay now everything fits better.
But still seems that the definition in the documentation (tofrom) should be (from to)?
Thanks for all replies and links.
Helps a lot
 amm
 Member
 98 posts
 Joined: Aug. 2014
 Offline
Dav_Rod
Hello,
the documentation about this node does not clarify too much (for me at least). Could somebody clarify a little bit about what applications is it useful for? Some test files to practice? When do you use it?
Thanks in advance.
When it comes to practice, it does the same as Aim/Direction constraint in DCC apps, perhaps this is one of most important constraints for rigging, also is a sort of complement to IK chain. Both are able to create rotation from input positions.
One a bit unusual thing is ‘from’. By leaving ‘from’ to zero and feeding two nonparallel vectors into ‘to’ and up vector it does exactly the same as Aim/Direction constraint.
If you just want a test file, I could offer this thing [vimeo.com]  probably is a way over complicated as example, anyway I'd believe it's full of ‘practical solutions’, typical for rigging and building the deformations.
 tamte
 Member
 8318 posts
 Joined: July 2007
 Offline
Dav_Rod
…
But still seems that the definition in the documentation (tofrom) should be (from to)?
…
lookat is quite old node/function and it seems to be based on the idea around camera look at constraint
since camera xaxis points right yaxis up, then in right handed coordinate system zaxis points back
so the forward camera direction is negative z (so z)
therefore Lookat VOP builds matrix that points z in the direction from>to and aligns y using up vector just so that the camera is looking from “from” to “to” location rather than arbitrary positive z pointing that way
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
 zengchen
 Member
 77 posts
 Joined: Feb. 2017
 Offline
tamte
lookat is quite old node/function and it seems to be based on the idea around camera look at constraint
since camera xaxis points right yaxis up, then in right handed coordinate system zaxis points back
so the forward camera direction is negative z (so z)
i am suddenly enlightened…thanks a lot
 Dav_Rod
 Member
 40 posts
 Joined: March 2018
 Offline

 Quick Links