Thursday, April 5, 2012

Initial Subsurface Scattering

Implemented subsurface scattering based on sample code from Mazapan. The code again is similar to the technique for ambient occlusion. It samples distances along the marching ray. However, since it relies on negative sampled distance, it only works on signed distance fields (for example, it doesn't work with udBox).

Here's an initial result.


2 comments:

  1. Good progress with all your shading so far. How much more shading are you going to do before looking at rendering more complex scenes?

    ReplyDelete
  2. At this point, I'm in the process of fixing up the subsurface scattering, as the results right now don't look quite realistic. Then I have a few corner cases to fix up for when ray marching doesn't intersect anything. After that, I am hoping to move on to implementing a few hard-coded procedural surfaces.

    ReplyDelete