[Sidefx-houdini-list] finding nearest and furthest distances

John Hughes john.hughes at corefa.com
Mon Sep 26 10:09:06 EDT 2005


To get the closest point is easy because there are built-in functions
to find them.  You could write a small script that ran the nearpoint
or pointdist functions on each object in the scene using the camera's
origin as the reference point.

To get the maximum distance you could try taking a bounding box
of each object and measuring from the camera's origin to each
corner of the box using the distance function to find the largest value.

Jon Campbell wrote:

> Hi All-
>
> Trying to learn VOPs a bit better. So I am trying to calculate the 
> distance from the camera to the nearest and furthest objects in my 
> scene. So far I have been succesful by using a rayhit and using an 
> object scope to manually enter in the nearest and furthest objects.
>
> However, instead of using object scopes, now what I want to figure out 
> is how I can tell houdini to automatically find the nearest and 
> furthest objects from the camera. Any ideas?
>
> -Jon
>
>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>
>

-- 
John Hughes
C.O.R.E. Feature Animation




More information about the Sidefx-houdini-list mailing list