Imperfect Shadow Map For Global Illlumination

Dai, Zeng

Imperfect shadow map (ISM)Ritschel et al. [2008] is a great idea to generate multiple shadow map in a single pass. It fully utilizes the virtues of point cloud since it’s very fast to render (rasterize) many points in a single pass and for many rendering tasks in global illumination like indirect lighting, we don’t need accurate occlusion query or precise model representation like triangle mesh.

2012-07-21: Meet Notorious Spike Artifacts

Also VPL techniques suffers from the “spike” artifact (e.g. the bright blotch on the curtain, all images above have already been clamped somehow):


PIC PIC PIC

Figure 1: The image on the left shows the “spike” artifact without clamping for each VPL; the image in the center shows tweaked clamp parameter for that view even though bright blotch are still noticeable when moving the main light source; the image on the right shows the same clamp parameter as center image yet with visibility test for each VPL.


Click to get ISM demo & source.

Moreover, inadequate VPLs will have the noticeable boundary problem:


PIC PIC

Figure 2: The image on the left consider no visibility yet plausible for 8x8 VPLs; the right one, however, produce shadow map boundary line for each VPL.


This is partially solved by applying VSM in our demo:


PIC

Figure 3: We change imperfect shadow map to imperfect variance shadow map. The boundary problem’s gone and shadow become softer.


To solve the noise due to light movement and better sample the VPLs, ISM author also have a follow-up work Ritschel et al. [2011] to eliminate artifact that shadow map exists.

2012-07-15: Sampling Methods and Sponza

Now we add color to this cornell box and see what looks like:


PIC PIC

Figure 4: Left image is using 8x8 uniform VPLs and right image uses 16x16.


Then we add VPLs presentation to the demo and then compare 4 types of “easy and fast” sampling techniques as following.


PIC PIC PIC PIC

Figure 5: Sampling of RSM. Purple point is the sample location. From left to right, the first image on the left is uniform grid sampling I used before; the second image is normal random uniform sampling; the third image is halton sampling; and the last one is importance sampling from SII paper Dachsbacher and Stamminger [2006]


Below is their corresponding results (plus VPLs represented as translucent 3d arrow) due to different sampling techniques.


PIC PIC PIC PIC

Figure 6: Images show scene rendered with different sampling techniques as above. There’s not much difference for temporal noise, even though importance sampling indeed samples better with a little bit extra code. Also notice that the artifact that arrows are off plane is due to interpolation of the RSM.


We also change the scene to more complex one like a slightly modified Sponza.


PIC PIC PIC

Figure 7: Images show Sponza rendering with the same techniques as above.


We found the imperfect shadow map can produce plausible AO-like shadow in certain corner because the imprecise pull/push phase, however it cannot take care of the geometries that need finer detail, e.g. incorrect shadow of polar.


PIC

Figure 8: Image shows artifacts that curtain cannot cast shadows and polar’s shadow makes polar look like flying above ground.


2012-06-02: Pull/Push and Imperfectness

The more pull/push level goes, the more darker shadow becomes and sometimes pull/push might “over fill hole”. The necessary pull/push levels depend on the points of one instance of the scene and resolution of each VPL’s shadow map. If we have more points like 5000 for each instance of the scene, we’ll have a much better results for ISM without pull/push and pull/push’s effort to improve the quality of the ISM is limited. The ghost edge effect for the ISM as shown below will also be reduced.

Next step we test ISM in RSM for indirect one bounce lighting. We chose spot light and 5000 points for point cloud sampling. For VPL sampling, right now we apply just uniform sampling from RSM.

If we don’t consider the VPLs lighting intensity, which means VPLs to each direction has the same intensity. The line artifact will appear, and I guess it might also happen when BRDF is sharp.


PIC

Figure 9: Line artifact due to uniform light intensity of VPL to each direction.


With no pull/push process, the VPL visibility test will generate dark spot and also light leak.


PIC PIC

Figure 10: Light leak artifact due to no pull/push.


Now, using pull/push, it has better result. However, it still suffer from spatial noises due to movement of light. If you move the light in the scene, you could see horrible noise like hand-drawing cartoon!


PIC PIC

Figure 11: An image generated using RSM with ISM as visibility test. Left image uses 8x8 VPLs and right image use 16x16 Images.


So we guess it might be due to VPL sampling.

2012-05-26: Hello, ISM!

My first implementation is using ISM for area lighting in cornell box. I first created multiple instances (16x16 instances for example) of the point cloud of the cornell box scene, then used vertex shader to split these instance into the same render target thus forming an ISM. The area light is sampled uniformly as virtual point lights (VPLs, e.g. 16x16 for 16x16 instances). So we could generate direct illumination of the area light like this 12. Without explicit indication, we only test our result on my laptop for simple scene.


PIC

Figure 12: A nice image after we tweak the parameters a little bit, with 500 points for each cornell box scence, 16x16 VPLs, 1024x1024 ISM.


For pull and push phase, I didn’t follow the pull push paper Marroquim et al. [2007] to consider edges since we only need to sample position for depth map and actually, precision is not a primary goal in our focus when considering indirect light and soft shadows. Pull and push did fixed the hole in a cheap way!


PIC PIC PIC PIC PIC PIC PIC PIC PIC

Figure 13: Three ISMs. The left image is ISM without pull/push; the middle image is ISM with pull and push that goes only 2 levels; and the right image is ISM with pull and push that goes 3 levels. All of them are in the same setting as Fig.1


The multiple texture indexing (e.g. 16x16 times’ texture2D for 16x16 VPLs) is really costy. Multiple instances of the point cloud is not an performance issue. How can we reduce the texture index times in the pixel shader? Can we group them into a hierarchical tree?


PIC PIC

Figure 14: Compare ISM with 500 points with pull push level at 3 and 5000 points with pull push level at only 2. Please ignoring the FPS, since I take the new image from a desktop computer.


References

   C Dachsbacher and M Stamminger. Splatting indirect illumination. page 100. ACM, 2006.

   R. Marroquim, M. Kraus, and P.R. Cavalcanti. Efficient point-based rendering using image reconstruction. In PBG07: Proceedings of the Eurographics Symposium on Point-Based Graphics, pages 101–108, 2007.

   T. Ritschel, T. Grosch, M.H. Kim, H.P. Seidel, C. Dachsbacher, and J. Kautz. Imperfect shadow maps for efficient computation of indirect illumination. ACM Trans. Graph, 27(5):129, 2008.

   T. Ritschel, E. Eisemann, I. Ha, J.D.K. Kim, and H.P. Seidel. Making imperfect shadow maps view-adaptive: High-quality global illumination in large dynamic scenes. In Computer Graphics Forum. Wiley Online Library, 2011.