GlennimusPrime Posted February 9, 2023 Share Posted February 9, 2023 (edited) I have a very basic scene with a master control null, one camera and I'm also using the qLib camera frustrum node. The master control null just has one operator path string where I can input the camera. 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: 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 February 10, 2023 by GlennimusPrime Quote Link to comment Share on other sites More sharing options...
mrCatfish Posted February 10, 2023 Share Posted February 10, 2023 (edited) 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: Edited February 10, 2023 by mrCatfish 1 Quote Link to comment Share on other sites More sharing options...
GlennimusPrime Posted February 10, 2023 Author Share Posted February 10, 2023 Working, thank you! It seems the first input is for transforming the frustrum, but I'm unsure why you'd use this as it travels with the camera anyway. Cheers, - Glenn Quote Link to comment Share on other sites More sharing options...
mrCatfish Posted February 11, 2023 Share Posted February 11, 2023 Well, if you do it my way, you don't need the null... you just plug in the camara. However, I suggested you switch the transform to camera space as the world space transforms will now be taken care of by the parent relationship. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.