Jump to content

Find object level transformations


Recommended Posts

It's one of the areas of Houdini where I'm not super confident.

I'm trying to fetch object level transformations of a camera into a null in an asset.

The idea being you hook up a camera and get the transformations from it so it can translate a ready made lightrig.

I was trying to use the optransform function but didnt have much luck.

Can anyone help me out?

01.JPG

02.JPG

Link to comment
Share on other sites

A simple test setup with a box, tube and 2 nulls inside a subnet.

If I just connect one of the nulls to a subnet input, it will become the input objects child and inherit the parent transform.
You can also fetch the transform manually with an expression. I used the NULL_PARENTED  object and opinputpath to fetch the second input object and get the tx channel.

Here's the expression to do that:

ch(opinputpath("../NULL_PARENTED", 0)/tx)

subnet_null_with_expression.png

subnet_parented_null.png

obj_level.png

fetch_transform.hiplc

Edited by berglte
uploaded the sample scene
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...