Mastering GLSL in TouchDesigner, Lesson 9: Fractals
In this lesson of Mastering GLSL in TouchDesigner, we explore fractals, their mathematical foundations, and how to implement them in shaders. Fractals exhibit self-similarity at different scales, appearing in nature, financial markets, and computer graphics. Weโll introduce complex numbers, explain their role in fractal generation, and dive into Mandelbrot and Julia sets, demonstrating how recursion and iteration create infinitely detailed structures.
๐ Key Topics Covered:
โ
What is a fractal, and how does it exhibit infinite complexity?
โ
Understanding self-similarity, fractional dimension, and recursion
โ
Real-world examples of fractals (coastlines, snowflakes, stock markets)
โ
Complex numbers in GLSL and how to perform arithmetic operations
โ
Implementing Mandelbrot and Julia sets in shaders
โ
Using distance metrics and coloring techniques to visualize fractals
๐จ Exercises & Challenges:
๐ ๏ธ Apply a cosine color palette to the Mandelbrot set
๐ ๏ธ Implement a smooth, animated Julia set shader
๐ ๏ธ Use domain manipulation, noise textures, or custom palettes to enhance your fractals
๐ ๏ธ Experiment with different rendering techniques to create something unique
๐ Further Learning & References:
๐ Inigo Quilez – Distance Fractals
๐ Fractals & Rendering Techniques
๐ Mandelbrot Set Smoothing
๐ [Antifragile by Nassim Taleb]
Find me online:
๐น Project Files & Patreon: https://www.patreon.com/water__shed
๐น Portfolio: https://www.lakeheckaman.com
๐น Instagram: https://instagram.com/lake_heckaman
00:00 – Start
00:01 – Intro – Fractals in GLSL Shaders in TouchDesigner
03:09 – What is a fractal?
05:50 – Complex Numbers Crash Course
10:30 – Working with complex numbers in GLSL
13:09 – Defining a fractal in GLSL
17:48 – Simple Mandelbrot shader example
20:51 – Marker 7
23:06 – Write mandelbrot fractal shader from scratch
27:58 – Continuous iteration count (smoothing) implementation in GLSL
32:23 – Implementing infinite zoom
36:34 – Raymarched 3D Fractal Example
38:27 – Supersampling
42:17 – Exercises