|Monte Carlo subsurface scattering.|
I implemented the Henyey-Greenstein phase function for anisotropic scattering. I added volumetric texture support via ray marching. For now, I assume the scattering coefficient doesn't vary significantly by wavelength or in space, so I can trace all wavelengths together, and, in the case of volumetric textures, ray march to find the absorption after finding the next intersection or scattering point.
Monte Carlo subsurface scattering is very realistic and physically-based, which is why I like it. Monte Carlo subsurface scattering is very slow compared to approximation algorithms, but unlike most approximation algorithms it has no memory overhead and doesn't require a pre-pass. That said, it's actually not as slow as I expected, and could be fairly practical for rendering materials that aren't highly scattering.
I'll be able to extend this system to implement single scattering to go along with my diffusion-based multiple scattering. And I'll be able to use it as a reference, for visual validation of approximation algorithms.
All the images here were rendered in 720p resolution. Click them to view them at full size.
|High scattering coefficient. Moderately forward scattering. Procedural volumetric texture. Because of the high scattering coefficient, most of the light doesn't get very far past the surface, and the look approaches that of a diffuse BRDF.|
|Scattering coefficient set to 1/64 of that in the first blue bunny image, and other parameters held constant. The trends observed in the previous image continue.|