Jump to content

Use Camera Path Expression In Parameter Channel [SOLVED]


Recommended Posts

I have a very basic scene with a master control null, one camera and I'm also using the qLib camera frustrum node.
image.png.26a437ef8ff9bf320192c081dfa04772.png

 

The master control null just has one operator path string where I can input the camera.
image.png.519d238f565c46d49ef59a092522b30a.png

On the qLib camera frustrum node, it's easy to link the camera to the path on the master control null, but how can I link the near / far attributes, without directly pointing to the actual camera, like I've done here:
image.png.e69d0b17f26c29ed46d3b31ea0135e93.png

I can't work out how to include the `chsop("../CONTROL/cam")` part of the expression into the near / far fields.

My overall aim is for someone to be able to just input a camera into the master control null (no matter what the camera is named) and have the camera frustrum update to the correct camera, as well as the near / far clipping planes.

.hip file attached.
 

link_camera_expression.hiplc

Edited by GlennimusPrime
Link to comment
Share on other sites

  • GlennimusPrime changed the title to Use Camera Path Expression In Parameter Channel
ch(chs("camera")+"/near")
ch(chs("camera")+"/far")

... should do the trick.  

A more elegant way of doing what you are doing might be to plug the cam into the node.  I don't have the node definition though, so not sure if this will work with the transforms and all... but maybe changing "space" to "camera space" and this will work:

image.png.24f8c0471026dd58fe1eb07e11c7b0f8.png

Edited by mrCatfish
  • Thanks 1
Link to comment
Share on other sites

  • GlennimusPrime changed the title to Use Camera Path Expression In Parameter Channel [SOLVED]

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...