2
$\begingroup$

I would like to grow objects on a surface. For this I use a node setup, where the size of the instances is controlled by an object. However, the objects become smaller again after the object has passed. I would like the instances to keep their size even if the object is already gone. Thank you!

Screenshot 1 Screenshot 2 Node Setup

$\endgroup$
6
  • $\begingroup$ well, in your "easy" case, why don't you just scale the proximity object? $\endgroup$
    – Chris
    Commented Oct 17, 2022 at 2:21
  • $\begingroup$ ...and by the way: that's exactly the holy grale of geometry nodes: if GN could "remember" the state of the frame before ;) if loops are coming, this should be easy. And animation nodes can do this since years...! $\endgroup$
    – Chris
    Commented Oct 17, 2022 at 2:23
  • $\begingroup$ @Chris I tried so scale the proximity object in various axis but the thing is, the lower objects always move/shrink a bit or are doing weird things but they don‘t stay still. $\endgroup$
    – user123511
    Commented Oct 18, 2022 at 7:10
  • $\begingroup$ It seems when you read the position of the proximity object, you want to clamp the value, so that when the object passes a certain threshold, the value stays on that threshold: typically the threshold is at 0, so the object is above, and the Z difference is positive but gets smaller towards 0, and once it passes 0 it becomes negative - but if it's clamped (max(0, x)) it stays at 0. I imagine quellenform's solution does exactly that, using a map range with "Clamp" enabled. $\endgroup$ Commented Oct 18, 2022 at 11:09
  • $\begingroup$ @quellenform thank you so much for your effort and the great answer! $\endgroup$
    – user123511
    Commented Oct 28, 2022 at 22:12

1 Answer 1

1
$\begingroup$

From your example, I gather that you are concerned with scaling objects in relation to the Z-position of another object.

At least, this is what the images suggest, since the object is larger on the X and Y axes than the terrain.

If I am correct, you could solve this as follows:

  1. Create an Empty.
  2. Take the direction between each point and the Empty as a value to control it
  3. Map this value with Map Range into a range that fits for you and multiply it with another randomly generated value

Of course you can also change this example so that not only the Z-axis is taken into account.

enter image description here


(Blender 3.2+)

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .