Hello,
I build a simple formula to get the distance between points, or objects:
sqrt(pow(obj1/TX-obj2/TX,2)+pow(obj1/TY-obj2/TY,2)+pow(obj1/TZ-obj2/TZ,2)),
but I don´t how get the distance of two or more objects from other object, like particles to surfaces, with this formula.
Any ideas? thanks so much
get distance of points
3331 2 1- SELDON
- Member
- 18 posts
- Joined: May 2006
- Offline
- tallkien
- Member
- 225 posts
- Joined: July 2005
- Offline
- tamte
- Member
- 8594 posts
- Joined: July 2007
- Offline
ray SOP is good, but you must know exact directions in which you want to measure (defined by point normal)
you can also use Intersect VOP for the same thing (may be faster since VOPs are multithreaded, do not know about ray SOP)
if you want to measure minimum distance from point to surface
use pointdist() expression function (search the docs for usage)
if you use it in attribcreate SOP and vary the point with $PT, you will get all closest distances to given surface. This may be a lot slower since it is an expression
i really miss something like this in VOPs
ps: you can use distance() function instead of your initial expression
you can also use Intersect VOP for the same thing (may be faster since VOPs are multithreaded, do not know about ray SOP)
if you want to measure minimum distance from point to surface
use pointdist() expression function (search the docs for usage)
if you use it in attribcreate SOP and vary the point with $PT, you will get all closest distances to given surface. This may be a lot slower since it is an expression
i really miss something like this in VOPs
ps: you can use distance() function instead of your initial expression
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Quick Links