# Geometry Nodes - Scale each instance over the time it appears

I'm making a system that generates rain splashes using Geometry nodes. I have the splashes randomly appearing just fine, but I'd like to be able to have the splashes scale from small to large as they appear, rather than just appearing at a random scale.

Here's my current node setup. Nothing extremely complicated. Points are instanced on a plane, and the seed changes over time (Every 5 frames if I'm understanding things correctly).

What I'd like is to scale the instances up (let's say from 0 to 1.0), in those 5 frames that the instance is visible. So that the splash looks like it's growing from a collision with the ground, instead of appearing out of nowhere.

I think in hindsight, this might not be the optimal setup for scaling each instance up as they appear, since it's likely that the way I have things setup (by animating the seed), every instance will scale at the same time over those 5 frames instead of at different times. Since the seed value changes every instance at the same time, instead of adding/subtracting points like a particle system.

Geo Nodes are kind of new to me, so if there's a better node setup of doing what I'm trying to do, I'd be happy to hear it. I realize that using a particle system would make this a cakewalk (in fact, I already have a system doing exactly what I'm describing), but I'd like to explore and learn GN a bit. Thanks!

Edit Here's what I'm trying to accomplish. This is a particle system, with a blend texture influencing the scale of the particles over time. Like I said though, I'd like to do it with nodes.

• Do you only want a way to scale the instances every cycle? or do you also want to have the cycles to be different for each instance (variable length or offset)? Commented Oct 21, 2023 at 21:38
• @Hulifier Ideally, I'd want each instance point to scale randomly, individually at different rates. Well, "different rates" might not be the right term, since they'd all scale at the same speed, but at any given time they'd be at different "states" of expanding. So for a single frame, some might be starting to expand, some are in the middle, and some are finishing. I'm not sure if my setup is really the best way to do that, but it's all I could come up with to get a bunch of random points dancing around similar to how I thought it should look. Commented Oct 22, 2023 at 21:00

You need to add the following nodes to your node set up (marked in red):

Modulo increases from 0 to the selected step (5) minus 1 (ie. 4), then resets to 0 and repeats the process on each consecutive frame. Adding 1 to the result gives you a sequence from 1 to 5 which you then divide by 5 to map the scale from 0.2 to 1. If you need to remap it exactly from 0 to 1 then use additional Map Range node, but then you will have frames with 0 scale splashes.

Regarding the edited question:

If you want a little bit more realistic splash animation you should use the Simulation nodes. Here is an example node set up that you can incorporate:

The duration of the animation is controlled by the Lifespan (Integer) node - in frames, the particle size can be fine tuned by a scale factor (and/or Float Curve) with the last Multiply (Math) node and should look something like this:

• Yep, that did it. I'm guessing if I want them to scale at different rates (so they're not all scaling at the exact same time), I can just add a random value after the integer, right? Or would I have to do some fancy selection stuff to grab a certain percentage of them for the given seed and scale them? Commented Oct 22, 2023 at 20:55
• Hi AxiomDes, you should use the Simulation nodes in this case. Please check the edited answer above. Commented Oct 22, 2023 at 22:18
• AHHHHH, I had forgotten completely about those, since I figured they were for actual sims and the like. This is exactly what I was trying to do. Thanks! Commented Oct 22, 2023 at 22:23
• You are very welcome, AxiomDes. Cheers! Commented Oct 22, 2023 at 22:30

$$\text{If someone needs a way without Simulation Zones}$$

Result:

$$\hspace{15pt}$$First we need a way to get the index of a point's cycle at a moment in time, to do that we can divide current time by cycle duration and get the floor value of that:

$${\large\lfloor\frac{t}{c}\rfloor}\\\text{where:}\\[5pt]t=\text{time}\\c=\text{cycle duration}$$

$$\hspace{15pt}$$To get the progress of the current cycle:

$${\large\frac{t}{c}-\lfloor\frac{t}{c}\rfloor}$$

$$\hspace{15pt}$$knowing that, we can visualize it in some points:

$$\hspace{15pt}$$But we need a random offset for each point, for that we can generate a random value for each and add to time before calculating:

$${\large\lfloor\frac{t + o}{c}\rfloor}\\\text{where:}\\[5pt]o=\text{offset}$$

Now we need to get a random position for each cycle, if you plan to spawn the points on a simple rectangular area, just use the Random Value node, but if you need to spawn on a mesh surface, you can first distribute a lot of points on the mesh, and then generate points that will sample a position from a random in the distributed ones.

Here the node group "Cache Geometry" isn't necessary, it just avoid calculating the supplier points every frame by using a Simulation Zone.