Normally I would say you can use the world_matrix knob of the TransformGeo
to get the concatenated position (using cels 3, 7 and 11) but it depends on
whether the geometry itself already has a baked in offset or not - meaning
is it reading in at the origin or not.

If it's not animated and you need that offset value in world space, you
could easily snap an Axis to a vertex of the geometry that you want to be
the Camera focal point, then parent another Axis that represents the
TransformGeo and read off the concatenated transform from the child Axis
world_matrix knob. You would then use the expression Olivier posted to get
the distance.


On 17 September 2013 19:41, Gustaf Nilsson <[email protected]> wrote:

> Yes, but that is not possible when you have a transformgeo-node connected
> to the geometry as there is no way (?) of getting its world coordinates.
>
>
> On Tue, Sep 17, 2013 at 6:56 PM, Olivier Lavenant <
> [email protected]> wrote:
>
>> You can use the expression : sqrt[(Xa-Xb)²+(Ya-Yb)²+(Za-Zb)²]
>>
>>
>> 2013/9/17 Gustaf Nilsson <[email protected]>
>>
>>>  heya
>>>
>>> Is it possible to get the distance between the camera and an object in
>>> 3d space that has an arbitrary number of transforms below it?
>>>
>>> Thanks
>>>
>>> --
>>> ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
>>>
>>> _______________________________________________
>>> Nuke-users mailing list
>>> [email protected], http://forums.thefoundry.co.uk/
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>>
>>
>>
>> _______________________________________________
>> Nuke-users mailing list
>> [email protected], http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>
>
>
>
> --
> ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
>
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to