Can somebody explain how to implement volume rendering and scattering? I've been told that this is the easiest and most effective method to render things like smoke, milk and fog.
Scratchapixel has a great article about it here but the lesson on implementation is unavailable.
I understand what Ray Marching is because of this answer from a while back but similiar to my previous problem I have no idea how to implement it.
To make it clear and narrow this question down so it is easier to answer here are my main problems:
- Can someone provide some pseudo code or code of a basic Volume Rendering and Ray Marching loop with Absorption & Scattering coefficients, Phase Function and a Density function?
- How is Ray Marching used alongside Path Tracing?
- Is this the best way to render sub surface scattering?