RPG Shadows, CSM, TSM, what else?

Started by
15 comments, last by Kryzon 10 years, 8 months ago

Hi, what shadowing methods are the rave these days?

What Shadowing method would you consider best for DX9 and for DX11 hardware under these conditions:

-Large Area, multiple actors and objects, One Sun Light, First person perspective and Isometric perspective

-Room, multiple actors and objects, Several Lights, First person perspective and Isometric perspective

Cheers!

Advertisement
for outdoor, sun light, PSM shadows are neat.

Variance shadow maps can look quite nice if you tweak the parameters a little and they are very resource friendly. They also allow you to filter the shadow map and blur it to provide nice soft edged shadows at the cost of a single blur.

For DX9 I would go with standard PSSM. For DX11 and more powerful GPUs I would try to use EVSM with SDSM. Of course for local lights (spotlights etc.) use a single cascade.

SDSM - ("Sample Distribution Shadow Maps") is an interesting PSSM extension, which provides optimal shadow map frustum.

EVSM (Chen, Tatarchuk - "Lighting Research at Bungie", SIGGRAPH09). It combines ESM and VSM in order to fix light bleeding issues.

Is it possible to get SDSM using Shader Model 3.0?

Edit:

The TSM paper does a comparison against PSM, and the pictures show TSM is better. Is this correct? Or do all Shadowing papers make other techniques look bad in comparison?

Sorry, I meant PSSM, not PSM. PSM/TSM and similar algorithms have a lot of temporal aliasing when camera moves. IMHO "normal" shadows look much better.

Yes, it's possible to implement SDSM on SM3.0. Just calculate depth range on GPU using pixel shaders and then read it on CPU. For read back use a few textures in round-robin fashion, so GPU won't be stalled by CPU. Results will be lagged by a frame or two, but it should look ok.

Is there a difference between PSSM and CSM? I've toyed with CascadedShadowMaps11.exe in the SDK but I can't really find a good fit.

You can probably use RTW. It's one of the best shadow mapping algorithms.

You can probably use RTW. It's one of the best shadow mapping algorithms.

Wow, that's really incredible. Probably not useful for the OP's isometric scenes, but for first person I can't imagine that there's much out there that works better.

-~-The Cow of Darkness-~-

RTW is definitely an eye opener. Though I am not familiar with how to use a warping map, or even create one. Please correct me if I am wrong on something I am about to say.

From what i've gathered so far, using the forward method, a regular shadow map is colored brighter for regions of interest and darker for uninterested regions. I am not sure if the depth channel is colored or another channel. Then this colored shadow map is collapsed to 1D textures. I think all pixels in the same row is summed up to be one pixel in the 1D map, or the brightest color is picked. Then the same for all the pixels on the same column, which is placed in a second 1D texture. These 1D textures are blurred and then they are used to construct a warping map. How this is done, I don't know. Then this warping map is used to render the shadow map once again, this time with regions of interest magnified. And there is the final shadow map. Use this together with the warping map to transform each rendered pixel in view space to the shadow map and check if the depth is greater or not.

The consuming part is to do CPU analysis on the original shadow map and color it, I think. Then maybe (I am guessing) it is possible to collapse the result using the GPU. By rendering the colored shadow map to a render target with 1px height for the columns, and then again to another render target with 1px width for the rows. Gaussian blur on these 1D render targets might also be done I guess. Now, render the warping map(is this a texture?) by sampling each of the 1D textures once for the corresponding pixel. I'm not sure how to use the warping map to mess around in the vertex and pixel shaders....

Am I wrong?

This topic is closed to new replies.

Advertisement