Geometry Node: How can I remove instances that collide with meshes?


I’m trying to create a vegetation node. My goal is to have multiple types of plants, rocks, and stuff. Then control the ratio between these different objects, and finally, they shouldn’t intersect with each other (this doesn’t have to be perfect).

I don’t know how to do it, google hasn’t been much help, and the Blender documentation is dog water. I’m really hoping that someone here could point me in the right direction, any help would be much appreciated.

Solutions I know of:

  1. Create one FAT collection with all the objects inside and then set an appropriate “Distance Min” (This I viable, IF I can control the ratio)
  2. Create multiple geometry nodes and draw out different weight paint groups (This defeats the whole purpose of it being time efficient"
1 Like

Hello and welcome on the forum !

Short answer : it’s complicated and there is different ways to do so.

You can distribute points with poisson disk and there is a minimum distance, but it’s fixed.
So to have different distance min ( per plant specie) you need to do it in several steps.
You start with the bigger ones and add smaller ones in the remaining space. You can look for Circle packing which is very similar.
Loops ( when they’ll be available in blender) will help a lot in that process.

Another approach is to create all the possible solutions : instances as many points as you can, and then remove some of them based on some conditions.
It’s a bit similar to the first approach, but the first is adding progressively, while the second is more about removing progressively.

Try to build a simple test scene and someone might pick the challenge to translate that into nodes.

2 Likes

Thank you
Circle Packing is very interesting. I remember I once made a circle-packing animation a few semesters ago. Once I get more adept at using Geometry Node, I will see if I can use that instead.

I just learned there is a Realize Instances node, with that I can spit out the geometry of the stones, and then use a weight proximity modifier to change/subtract weight in the vertex group.

you can already do some with experimental simulation branch but caching is problem I guess ( but it will come soon) tutorial about it :

1 Like

Goddang, Geonode is pretty awesome.

Thank you

1 Like

Be careful with realize instances- it will dramatically increase your vertex count and RAM usage

1 Like

True, thanks for the reminder. I might do a small switcheroo between proxies. Kinda like a LOD system used in video games. Then use a simple image plane for those far away.

1 Like