New in Geometry Nodes achieving proximity effect

Hi. I am wrapping up a project where we 3D-printed green energy assets for an exhibition. I thought It would be “nice to have” a simple animation showcasing the models simultaneously for SoMe.

Then I thought it could be cool to have an empty that works as a driver to showcase, with a 3D rotation, the asset close to that empty while the surrounding assets repeal. I thought diving into Geometry Nodes could also be a pleasant task since I saw many tutorials on YouTube showcasing proximity fx in Geonodes.
After watching some of those tutorials, I noticed they are based on an instance-to-point node.

How should I approach the task if my models are placed not randomly on a point grid but positioned manually without a procedural workflow?

I want them where they are, but I would like to add a rotation effect to the idle animation, in which they all rotate on their respective Z axes.

Thank you

Repeal? What?

If you just want to rotate a collection then that is trivial:

If you want to rotate only objects close to the empty then you can use Distance and Map Range

But it is hard to understand what you want.

Hope that helps.

2 Likes

I meant that the empty makes the focused object and repeals the surrounding ones.

Oh, you mean “repel”… as in “a force away from”. “Repeal” is a legal term meaning that a proposal is ignored. Sorry, English is not my native language so I’m easier to confuse.

Yes, there are many ways you can do that. You can use a Simulation Zone, Translate Instance, Transform or a Set Position node for that. So basically the 2nd example above with some extra math nodes to do the drop-off.

E.g this is a simple example which repels points inside the non-zero parts of the Float Curve:

There a lots an lots of ways you can do it. Experiment and have fun!

4 Likes

Thanks so much for sharing the node setup. I must be honest; I do not understand the fundamentals of why each node delivers the outcome, but I guess It is a matter of starting with GN until the knowledge becomes intuitive.

It becomes easier with practice, but this setup it’s a simple procedure.

There are two parts in the node setup:

  • The last part (all green nodes), creates a grid of points, and set it’s positions. For each point, the position offset is then calculated in the first part.
  • The first part, is split in three small functions:
    • it first calculates a vector pointing from the Empty’s location (the ObjectInfo) to the position of the point being calculated.
    • then the vector is splitted into a direction (the Normalize), and a size function (MapRange, Curve, Multiply) based on the initial length of that vector.
    • then it scales the direction with the result from the size function, which is defined as a new offset for that point.
2 Likes

Thank you for the explanation. I think I understood most of it; just trying to replicate your setup with my collection instead of “points”. I get an “effect”, but it seems components are panning altogether. I imagine the effect is either too strong or the curve float isn’t incorrect.

Edit:

I am trying a different setup I found in YT:

It is doing something, but the repelling effect works in one direction, as a linear gradient, but I would like to work on Y Z space, so If my empty is close to one of my assets, the surrounding will repel from the centre of my empty outwards.

And not all in the same direction as below:

It’s all a matter how your size function is set.
A simple fix would be just to change the ‘From …’ values from the MapRange node (perhaps 7.4 is a bit too much for your scene, try lowering that value down).

But you could also have a different size function… All the function does is to define how much the geometry will offset, based of the distance of it from your Empty. (a function with distance as input, and offset magnitude as output)

It’s also easy to do… after the last VectorMath.Scale, add another one, and multiply the offset by [0.0, 1.0, 1.0] (YZ).

4 Likes

Also noticed your Map range doesn’t have the output swapped… The “To” should be 1 to 0, not 0 to 1 if you want to copy what I did.

3 Likes