Efficient and Precise way to group points Inside Geo?
487 7 0-
- olivierth
- Member
- 1255 posts
- Joined: April 2017
- Offline
Hi!
I have 2 spheres coliding. I want to group all points from my scatter inside of those spheres. When I use the Group sop (set to Keep in Bounding Regions), it doesnt group points in the colision area.
I ended up using a boolean to combine the spheres and also split all edges to move each points appart by 0.0001 (helps a lot). But I still get some points not getting grouped inside the sphere.
Any other method to do this perfectly everytime?
I have 2 spheres coliding. I want to group all points from my scatter inside of those spheres. When I use the Group sop (set to Keep in Bounding Regions), it doesnt group points in the colision area.
I ended up using a boolean to combine the spheres and also split all edges to move each points appart by 0.0001 (helps a lot). But I still get some points not getting grouped inside the sphere.
Any other method to do this perfectly everytime?
-Olivier
-
- olivierth
- Member
- 1255 posts
- Joined: April 2017
- Offline
Found a method. Same as before but with some extra steps before grouping the points.
I do an extra boolean on the side in the Shatter mode. On the shattered one, I only keep the inside polygons. I group it in a "inside" prim group before re-merging with the Unioned spheres. When I use the xyzdist, I check if I hit the "inside" primitive. If so, The points are grouped.
I do an extra boolean on the side in the Shatter mode. On the shattered one, I only keep the inside polygons. I group it in a "inside" prim group before re-merging with the Unioned spheres. When I use the xyzdist, I check if I hit the "inside" primitive. If so, The points are grouped.
-Olivier
-
- FedorK_FX
- Member
- 42 posts
- Joined: Jan. 2016
- Offline
-
- olivierth
- Member
- 1255 posts
- Joined: April 2017
- Offline
-
- Mike_A
- Member
- 432 posts
- Joined: Aug. 2018
- Offline
If your collision objects are spheres, and there are just two of them, then perhaps another approach is to 'extract centroid' from each sphere and plug then centroid points into the second (1) a third (2) inputs of a wrangle to check the point distance from each sphere's centre, and put them in a group:
(Assuming a sphere radius of 0.5 in this example)
(Assuming a sphere radius of 0.5 in this example)
float dist1 = length(point(1, "P", 0) - @P); float dist2 = length(point(2, "P", 0) - @P); if (dist1 < 0.5 && dist2 < 0.5) { setpointgroup(0, "inside", @ptnum, 1, "set"); }
Edited by Mike_A - Oct. 14, 2026 17:33:17
-
- tamte
- Member
- 9738 posts
- Joined: July 2007
- Online
it's not clear to me whether you want to group all the points within any of the spheres, or just within the intersection of all spheres etc
but regardless, for arbitrary geo you can use windingnumber() VEX function to check whether the point is within the geo and how deep in case the geo contains intersections

for just spheres I agree that it's better to either use points with pscale or sphere primitives and iterate over them in for loop in VEX
or depending on number of points and colliders you can also use pcfindradius() if things get heavy,
but regardless, for arbitrary geo you can use windingnumber() VEX function to check whether the point is within the geo and how deep in case the geo contains intersections
for just spheres I agree that it's better to either use points with pscale or sphere primitives and iterate over them in for loop in VEX
or depending on number of points and colliders you can also use pcfindradius() if things get heavy,
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- Mike_A
- Member
- 432 posts
- Joined: Aug. 2018
- Offline
-
- Konstantin Magnus
- Member
- 745 posts
- Joined: Sept. 2013
- Online
A very precise way of grouping points inside sphere intersections might also be using implicit spheres.
The implicit surface operation-node comes with all sorts of boolean operations to choose from.
The implicit surface operation-node comes with all sorts of boolean operations to choose from.
Edited by Konstantin Magnus - Oct. 15, 2026 12:12:37
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
-
- Quick Links



