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

Olivier Jeannel facialdeluxe at gmail.com
Tue Dec 12 04:25:51 EST 2017


Edward, I'm not super sure how to use the vtorigin. I'm suppose to retrieve
the camera position and then calculate the distance from the null, no ?
Gregory, I have no knowledge of python.


2017-12-11 18:02 GMT+01:00 Gregory Ecker <gregory.ecker at gmail.com>:

>  you could also do something in python like:
>
> trn = objnode.worldTransform().explode()
> x = trn['translate'].x()
>
> etc.
>
> where 'objnode' is a hou.node() of your 'null_focus)
>
>
> On Mon, Dec 11, 2017 at 7:54 AM, Edward Lam <edward at sidefx.com> wrote:
>
> > Use something like:
> >  vtorigin("", "../null_focus")[0]
> >  vtorigin("", "../null_focus")[1]
> >  vtorigin("", "../null_focus")[2]
> >
> > -Edward
> >
> >
> > 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_c
> >> am/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
> >>
> >>
> > _______________________________________________
> > Sidefx-houdini-list mailing list
> > Sidefx-houdini-list at sidefx.com
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> >
> _______________________________________________
> 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