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

Gregory Ecker gregory.ecker at gmail.com
Mon Dec 11 12:02:33 EST 2017


 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
>


More information about the Sidefx-houdini-list mailing list