Just sharing an interesting effect I worked on.
A set of procedural lightnings I made for Sila Sveta. The task was create a background made of lightnings that appear on the background and continue to increase in frequencecy and power.
The logic is:
- Draw future lightnings manually, just simple placeholder curves
- Grow the side curves from the main curves procedurally
- Add necessary timing and colors
I started from a point cloud representing future connections:
But realized that if would be easier to just draw initial branches manually with a curve node.
Initially I didn’t want to use any simulation, but quickly realized that this type of effect will have to use simulation for tracking timing of the effect and using simulation often comes with advantage of being able to have acess to the values from the past and anchoring them consequently.
A fairly simple technique I use often for curves is to have UVs on them and rest position ready right away with a simple VEX code:
v@uv.x = i@primID_l0 * .3;
//v@uv.y = @ptnum/float(@numpt-1);
v@uv.y = @curveu * primintrinsic(0, "measuredperimeter", 0);
So it creates something like that from curves: Left original and right a UV space
The main challenge I would say was to grow the effect from point A to B. As the real lightning does but for many! And lightnings have an effect of having a constant noise at the moment of activation on them. So them curve should somehow keep the seed noise value for every blink.
Here you can see the main branches activating randomly as well as the noise switch every X time
And the whole thing) looks like neuron cells!
And the whole thing