Hey guys,
I'm looking to output my camera from houdini to nuke - not an issue in itself, but i need the camera to have its transforms accessible
The setup i have is as follows:
Bring in two tracks and cameras from PFtrack into seperate subnetworks
Transform the subnetworks to reposition everything
Blend node to go between these two tracks (keyframed sequence blend)
And finally my new camera parented at the end - meaning camera itself has no transforms
So i'm basically looking to take the transformation coming from the blend node, and reference that onto the final camera - rather than just parent. Seems like it would be simple if i only new the right button to press… !
Thanks,
~ Craig
Extract Transforms from objects parent
4960 5 2- mrtonks
- Member
- 54 posts
- Joined: 8月 2010
- Offline
- tamte
- Member
- 8766 posts
- Joined: 7月 2007
- Offline
you can either use Object CHOP to get camera's trasnsforms in world space then export them to unparented camera
or you can use origin() expression to extract world space transforms and put directly to unparented camera parameters
there is also Fetch Obj, but then you need to parent camera to it so it may not be what you need
or you can use origin() expression to extract world space transforms and put directly to unparented camera parameters
there is also Fetch Obj, but then you need to parent camera to it so it may not be what you need
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- mrtonks
- Member
- 54 posts
- Joined: 8月 2010
- Offline
- old_school
- スタッフ
- 2540 posts
- Joined: 7月 2005
- Offline
vtorigin(obj1, obj2) is the function you want. It returns a vector so you can follow it with square brackets to index in to the three vector components.
If you leave obj1 path blank, then the world space positoin of obj2 is returned which is what you want:
tx parm: vtorigin(“”, “/obj/my_cam”)
ty parm: vtorigin(“”, “/obj/my_cam”)
tz parm: vtorigin(“”, “/obj/my_cam”)
Use vrorigin(obj1, obj2) for rotates in the same way.
To get the entire transform matrix, look to the origin() function as mentioned above. This will give you translates, rotates and scales in one go. Hopefully you aren't scaling your camera…
If you leave obj1 path blank, then the world space positoin of obj2 is returned which is what you want:
tx parm: vtorigin(“”, “/obj/my_cam”)
ty parm: vtorigin(“”, “/obj/my_cam”)
tz parm: vtorigin(“”, “/obj/my_cam”)
Use vrorigin(obj1, obj2) for rotates in the same way.
To get the entire transform matrix, look to the origin() function as mentioned above. This will give you translates, rotates and scales in one go. Hopefully you aren't scaling your camera…
There's at least one school like the old school!
- mrtonks
- Member
- 54 posts
- Joined: 8月 2010
- Offline
- Dan de Carvalho
- Member
- 2 posts
- Joined: 3月 2016
- Offline
For clarification, if anyone doesn't understand what indexing is:
tx parm: vtorigin(“”,“/obj/mycam”)…'then 0 in square brackets'
ty parm: vtorigin(“”,“/obj/mycam”)…'then 1 in square brackets'
tz parm: vtorigin(“”,“/obj/mycam”)…'then 2 in square brackets'
rx parm: vrorigin(“”,“/obj/mycam”)…'then 0 in square brackets'
ry parm: vrorigin(“”,“/obj/mycam”)…'then 1 in square brackets'
rz parm: vrorigin(“”,“/obj/mycam”)…'then 2 in square brackets'
Side note: don't copy and paste code from a browser as the quotation marks can sometimes not be translated over correctly which will give you errors even though the code snipet may ‘look’ the same.
tx parm: vtorigin(“”,“/obj/mycam”)…'then 0 in square brackets'
ty parm: vtorigin(“”,“/obj/mycam”)…'then 1 in square brackets'
tz parm: vtorigin(“”,“/obj/mycam”)…'then 2 in square brackets'
rx parm: vrorigin(“”,“/obj/mycam”)…'then 0 in square brackets'
ry parm: vrorigin(“”,“/obj/mycam”)…'then 1 in square brackets'
rz parm: vrorigin(“”,“/obj/mycam”)…'then 2 in square brackets'
Side note: don't copy and paste code from a browser as the quotation marks can sometimes not be translated over correctly which will give you errors even though the code snipet may ‘look’ the same.
Edited by Dan de Carvalho - 2018年8月7日 04:15:50
-
- Quick Links