CHOP affecting object space

   3576   1   0
User Avatar
Member
3 posts
Joined: 7月 2008
Offline
I am just started out learning Houdini and I feel completely lost. Anyhow, I am trying to do something which seems to me should be pretty simple…I want to have CHOP move a camera around.

The problem I can't figure out is how to get the camera to move/rotate in its local space rather than in world space. Right now, when I export the channel to the tx parameter (for example) of the camera, the camera moves along the world axis rather than moving the camera relative to the way its facing, which is what I want. I am sure I could write some sort of script to do this using matrix multiplication, but it seems like there must be an easier way that I am just missing. Any help would be very much appreciated.
User Avatar
Member
1145 posts
Joined: 7月 2005
Offline
I'm sure there is a direct way of doing this but I can't think of it at the moment, so to get around my little memory problem I've cheated. Which is always fun in Houdini

The camera is oriented much like a bone, in that it is looking down its local z axis.
So in the example attached, I've made a bone the child of the camera. That orients the bone properly with the camera. I then made a relative reference from the bone tz to the camera tz, but make sure to clear the transforms of the camera first so that all values are zero (in agreement with the bone).

I used a null as my channel control, the fetched the null's tx into chops and exported that to the bones tz.

Attachments:
along_z.hip (71.4 KB)

“gravity is not a force, it is a boundary layer”
“everything is coincident”
“Love; the state of suspended anticipation.”
  • Quick Links