While watching CrossMind Studio’s Youtube tutorial: " 09-Geometry Proximity-Geometry Nodes( Fields) For Beginners / Blender 3.0" the instructor asked viewers to offer other ideas in the comments for how to influence the direction of the grass heads. I posted my idea in the comments, but as you can imagine, it’s not easy to describe a complex geometry nodes setup through YouTube comments. I’ll edit my comment so that people know what to google and where to find this post.
Here’s how I described the setup in my YouTube comment:
I used the inverse square law to calculate the “offset” in the “set position” node. This method also affects the vertical offset, so you can remove any other calculations relating to that. First, you need to subtract the grass head position from the closest position on the icosphere. Then, run the result through a vector math node on the “Normalize” setting. This removes the magnitude and just leaves the direction of influence. Then, multiply that normalized vector by the inverse square of the distance (1/distance^2) to get the offset. You can then scale the result by a constant to get the desired amount of influence. Plug the result into the “offset” socket of the set position node and you’re done!
Here’s how that looks:
Here’s inside my “Inverse Square” node group:
Here is my .blend
file (ignore the ugly materials)
GeoNodes9Part2.blend (1.5 MB)