[Sidefx-houdini-list] Houdini |world position in expression

Edward Lam edward at sidefx.com
Mon Dec 11 07:54:28 EST 2017

Use something like:
  vtorigin("", "../null_focus")[0]
  vtorigin("", "../null_focus")[1]
  vtorigin("", "../null_focus")[2]


On 12/11/2017 7:35 AM, Olivier Jeannel wrote:
> Hi,
> For a Camera that renders with DOF, I'm using an expression in the "Focus
> Distance" field of the camera object.
> distance(ch("../null_focus/tx"),ch("../null_focus/ty"),ch("../null_focus/tz"),ch("../Real_DOF_cam/tx"),ch("../Real_DOF_cam/ty"),ch("../Real_DOF_cam/tz"))
> Where "null_focus" is where the camera ...focusing.
> "Real_DOF_cam" is my camera name.
> Everything works well until I parent the camera to a null.
> As soon as I parent the camera and move the null, the results of the DOF
> are completly false.
> I'm wondering what expression I should use to calculate the Focus Distance
> based on the camera world position (as it seems to calculate it in
> local/parented atm).
> Thank you !
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list

More information about the Sidefx-houdini-list mailing list