Search - User list
Full Version: Delete points that are too close to each other
Root » Houdini Indie and Apprentice » Delete points that are too close to each other
Cola8
Hello, I am making a hurricane sim and currently have the point simulation done.

My hurricane is probably going to be not out of air but out of objects. So I need to remove points that are too close to each other so the objects wouldn't intersect with each other.

Does anyone know a vex code or node structure that could remove points close to each other.

Also how would you approach this problem, would you use copy to points for the objects or like a rbd sim?

Here is an image of my current hurricane.
tamte
Easiest is to sim the amount of points you need as rbd or as grains so that they keep the distances

Even if its a second sim just advected by velocities of your original sim


Since if you want to reduce the points post sim you will have many challenges, like making sure the reduced points are consistent across the whole frame range and that they dont come close to each other on any of them, unless consistency doesnt matter to you and you just want it for a still in which case you can use Fuse SOP
animatrix_
Hi,

You can do this using VEX:

int pts [ ] = pcfind ( 0, "P", @P, ch("radius"), chi("maxpts") );
removevalue ( pts, @ptnum );
foreach ( int pt; pts )
    removepoint ( 0, pt );



You can use packed geometry instances using Copy to Points and then run an RBD simulation on it.
Cola8
Okay, so it indeed doesn't work as I expected with just deleting points that are close to each other because it causes a lot of new problems, it just doesn't work. Thank you for your code @animatrix_.

What about the point advect solution. I have a made the simulation with just a solver node and attribute vop, I didn't use dop network. So now I don't know how to really implement the rigid body simulation or make a second sim on top to advect the points.

Maybe you can elaborate more? @tamte

Also I'll attach the hip file maybe it will be easier to understand my problem this way.
Image Not Found
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB