Jump to content

Copy Sop + Look at


Recommended Posts

Hey guys,

I have a bunch of planes on a copy sop and I need all of them to be always "looking at" the camera.

I found this topic at sidefx' forum showing how to make it at sop level (I know, at obj level it's quite easy ;)), but I couldn't make it work. This is what they did there:
 

Quote

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.


I actually don't know what to put at the "lookat_path". How can I put a path to another object, like a camera, in there?

Thank's
Alvaro
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...