Learn how to build a custom volumetric lighting system in TouchDesigner from Lucas Morgan, the creator of GeoPix.
One important technical rule about compositing and lighting math in GLSL is that the calculations must be done in linear space. This is a non intuitive thing to those who are not traditionally lighting or visual programmers, or who are not trained in computer animation related fields.
The conversation about gamma, monitors, human sight, and industry best practices is a deep and long one that I won't got too deep into here, but I have written a few pieces for the TouchDesigner community specifically to try and bring some attention to these important workflows when photo realism is a goal.
Raymarching is at the core of volumetric rendering and many other GLSL effects. A bit further into the course, I began outlining the basics of Raymarching in a 2D visual interactive example, then next we dove into the code. I use Nvidia Nsight Graphics to reverse engineer some shaders in order to create our own, that meshes elegantly into TouchDesigner's lighting model.
The obvious use case for volumetrics are to simulate a beam a light, such as a theatrical light, or a spot light, etc. However there are actually many more uses for volumetrics, that tend to be more subtle, but very powerful when it comes to selling a scene's believability and realism.
Underwater scenes can be simulated with volumetrics, haze, and overcast days. Even the most subtle of volume can tie elements of a scene together nicely, selling depth and scale much more believably.
You can of course do abstract and whacky stuff too! Sometimes those are the most fun of all.