2022-08-13 Procedural Nodes: Jellyfish
Episode 13 of Sam Bowman’s Procedural Nodes series: https://youtu.be/8e-sdpvktWc
This one was substantially different from the previous ones, though there were echoes. More math here, and in particular math that Sam didn’t entirely understand, so he couldn’t explain it (he got the setup from node wizard Simon Thommes). I am never happy with that sort of thing because it means that while I might be able to use the same nodes as a chunk in another texture, it’ll be like following a recipe without knowing why you add baking powder, but I won’t be able to debug it if it doesn’t work as expected (why did that cookie not rise).
Here’s the whole shader as an overview (I know this is much too small for anyone to read it, sorry, but I’ll be zooming in on the important bits, and at least you can follow the node previews):
The section on the left is just for perturbing the final texture; we’ve used roughly the same strategy in previous exercises – a noise texture whose influence is regulated by a mixRGB node’s factor. The more of those bits you add to the left, the more finely grained the perturbations are, you’re perturbing the noise that perturbs the noise that perturbs the noise…
The chunk in the middle is the work horse here, it creates the radial symmetry:
I really worked on figuring out the math: The Arctan2 node gives us the angle between the positive x-axis of a plane and the point (x,y) on it, which is positive for counter-clockwise angles (y > 0), and negative for clockwise angles (y < 0). The Map Range remaps the angle from -pi to pi to 0 to 1, the Multiply determines the number of sections, and the Fraction makes those happen.
Then, to get each segment to be mirrored, he offsets the value by 0.5, makes it absolute, and lastly resets the centre of the mirror to be 0. :whew:
I was wondering whether one might not replace the first 3 nodes with a Gradient texture (Radial progression), and indeed one can, which is bound to be faster, but it’s less flexible. I was feeling pretty good about that; I can debug it!
The final part is how to create shapes:
RGB Curves are awesome for that. I can easily see how I could make a myriad of different procedural flowers, leaves, not to mention abstract designs.
Render:
Music: Vertical Horizon (palate cleanse from the general malaise of the 2000s)