Hi All-
Is it possible to make a transform SOP “look at” another object at the SOP level? Easy to do with a geo @ the OBJ level, but I need it at the SOP level.
Any ideas?
-jon
"look at" at the SOP level?
11296 8 3- vrljc
- Member
- 63 posts
- Joined: July 2005
- Offline
- edward
- Member
- 7871 posts
- Joined: July 2005
- Offline
Append a default Transform SOP. In the RX, RY, RZ parameters put in the following expressions:
explodematrix(dihedral(vector3(0,0,-1),vtorigin(“..”,“lookat_path”)), “SRT”, “XYZ”, “RX”)
explodematrix(dihedral(vector3(0,0,-1),vtorigin(“..”,“lookat_path”)), “SRT”, “XYZ”, “RY”)
explodematrix(dihedral(vector3(0,0,-1),vtorigin(“..”,“lookat_path”)), “SRT”, “XYZ”, “RZ”)
Substitute lookat_path with the path to the object you want to look at. You can substitute vector3(0,0,-1) with the axis that you want to align with. I picked the negative Z axis here because that's what the object-level does. Notice that “SRT” is the transform order which should match the transform order of your Transform SOP. Ditto for “XYZ” as the rotation order.
explodematrix(dihedral(vector3(0,0,-1),vtorigin(“..”,“lookat_path”)), “SRT”, “XYZ”, “RX”)
explodematrix(dihedral(vector3(0,0,-1),vtorigin(“..”,“lookat_path”)), “SRT”, “XYZ”, “RY”)
explodematrix(dihedral(vector3(0,0,-1),vtorigin(“..”,“lookat_path”)), “SRT”, “XYZ”, “RZ”)
Substitute lookat_path with the path to the object you want to look at. You can substitute vector3(0,0,-1) with the axis that you want to align with. I picked the negative Z axis here because that's what the object-level does. Notice that “SRT” is the transform order which should match the transform order of your Transform SOP. Ditto for “XYZ” as the rotation order.
- anon_user_40689665
- Member
- 648 posts
- Joined: July 2005
- Offline
- AndrewVK
- Member
- 136 posts
- Joined: July 2005
- Offline
- syntheticperson
- Member
- 170 posts
- Joined: July 2010
- Offline
- tamte
- Member
- 8785 posts
- Joined: July 2007
- Offline
cpb
is there an equivalent of the dihedral
function in vops?…
well, there is directly Look At VOP which will compute rotation matrix from given direction and up vector
be aware of Align VOP and dihedral functions for this as they don't care about up vector and therefore you may be experiencing flipping
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- graham
- Member
- 1922 posts
- Joined: Nov. 2006
- Offline
- syntheticperson
- Member
- 170 posts
- Joined: July 2010
- Offline
- graham
- Member
- 1922 posts
- Joined: Nov. 2006
- Offline
-
- Quick Links