Cafe Connection - Velocity by collision force and avoid intersection in Geometry Nodes
A procedural collision system example in GeoNodes, utilizing the "Index of Nearest" node to create a system, which reacts and moves by an animated effector object, while avoiding intersection.
Video demo here.
The file is providing a practical example of such system, kept as simple as possible. Only some nodes are contracted to Node Groups, to keep the node tree readable and easy to analyse and reuse.
HOW DOES IT WORK ?
Essentially, we check the "vector" (direction and distance) to the effector object from each point. Then we move the points in that direction, while simultaneously checking for its nearest neighbor and adjust its velocity (direction and magnitude of movement) accordingly.
The file is optimized for and rendered in Eevee (Render Viewport Animation). Of course, you can set up any renderer you wish.
----------------------------------------------------------------------
NOTE
-(Since it is a concept demonstration, it is kept as simple as possible.) The GeoNodes trees are kept clean, the nodes mostly are not contracted into node groups for easier readability and have detailed explanations. You can embellish, refine as you wish.
-(The file is working with Simulation Zones in Blender 3.6X and above)
-In 4.X and above the Collision Node group can be contracted into one nice "Repeat Zone". (Included soon, when it is officially available)
- OBVIOUSLY coffee wouldnt have this many bubbles. It is simply a demonstration of the nature of the setup
---------------------------------------------------------------------------------------------
Question, Discussions -
The blend file with explanations