$$\mathbf{\text{Method 1}}\text{: On XY Rectangle}$$
$ $
Advantages:
- True pseudorandom position for every height cycle.
- Point count is definable.
Disadvantages
- Can only emit points from a defined Rectangle on the XY plane.
With Size X and Size Y provided, it's possible to generate a random vector with limits equal to:
$$\text{Min}=\left (-\frac{\text{SizeX}}{2}, -\frac{\text{SizeY}}{2}, 0 \right), \text{Max}=\left (\frac{\text{SizeX}}{2}, \frac{\text{SizeY}}{2}, 0 \right)$$
That's what's used to generate the horizontal position for a point.
First, a Mesh Line with a custom number of points is generated, then we generate a random value for the starting height limited to the maximum height, this value is then added with the scene time and wrapped with the maximum height.
Now we need to get a random position on the rectangle, one that changes every time the height is resetted. For that, we divide the initial height added with the scene time by the maximum height, the result is then floored which results in a value equal to the index of the height wrapping cycle. We can use this value as seed to generate the horizontal positions of the current cycle.
All methods in Blend file:
$ $
$$\mathbf{\text{Method 2}}\text{: On Surface}$$
$ $
Note: here points follows surface normal, if that's not desired just use combine xyz instead of multiplying height by normal.
Advantages:
- Emits points from surfaces.
- Can be easily modified to support minimum distance between points.
Disadvantages
- Point count is not definable.
- Point horizontal position is limited to the positions of all generated points, which causes a lot of points to be on the same line.
With this method, for every height cycle of a point, we use as horizontal position the position of a random point of the distributed points.
We use the same way as the previous method to get the height cycle index, value that now is used as seed to generate a random index limited to the point count, the result is used to get the horizontal position of another distributed point.
All methods in Blend file:
$ $
$$\mathbf{\text{Method 3}}\text{: On Surface, More Random}$$
$ $
Note: here points follows surface normal, if that's not desired just use combine xyz instead of multiplying height by normal.
Advantages:
- Emits points from surfaces.
- Point count is definable.
- Perceptually random position for every height cycle (depends on supplier density).
- Can be easily modified to support minimum distance between points.
Disadvantages
- Slower when enormous density is needed for the supplier point cloud (Increasing quality of random position per height cycle).
This is very similar to the second method, but now it generates a fixed number of points using a Mesh Line, distributes a lot of points on the base besh, and then for every height cycle of a point in the line, it picks the position of a random point of the distributed points.
All methods in Blend file: