View Full Version : Soft shadows: the revenge..

11-26-2002, 10:10 AM
I'm almost done with my soft shadows demo. Finished implementing the vertex shaders stuff today, so all's remaining is a FPS counter and a loading screen.

Have a look at these 2 DIVX videos:

Comments welcome http://www.opengl.org/discussion_boards/ubb/smile.gif


11-26-2002, 11:05 AM

Again and again, your soft shadows are not "soft shadows". I've looked at your picture, and your shadows should be defined as "blured shadows". You seems not really know what are true soft shadows.



11-26-2002, 11:29 AM
What is the definition of a 'soft shadow'? I would think that a burred-shadow would be an even shadow across the surface and a soft-shadow would be even across the surface, but faded on the edges.


11-26-2002, 11:55 AM
I would think that a burred-shadow would be an even shadow across the surface and a soft-shadow would be even across the surface, but faded on the edges.

Imagining what these 2 descriptions look like, and I get the same image. A blurred shadow only looks blurred at its edges where it fades out. So it basically looks like an even shadow with faded edges..

Whats the difference?

A true shadow would fade in relation to the occluder and light source tho, and be sharp at close distances, with soft edges at long distance.

11-26-2002, 12:01 PM
If the blur amount depends on the distance from the shadow caster, what's wrong with that?

11-26-2002, 12:14 PM
in this demo, the blur amount depends on the distance to the light, not the occluder and the light.. its quite a complex factor, but can get faked more or less precious. here its quite.. uhm.. unprecious.. give them an an r300 and he'll do it the way it has to be done http://www.opengl.org/discussion_boards/ubb/biggrin.gif

11-26-2002, 12:40 PM
Tough audience here http://www.opengl.org/discussion_boards/ubb/wink.gif. Looks nice, Ysaneya.

-- Zeno

11-26-2002, 01:11 PM
yes, it looks nice. but the divx are so blurry.. or is that part of the shadow? http://www.opengl.org/discussion_boards/ubb/biggrin.gif couldn't resist http://www.opengl.org/discussion_boards/ubb/biggrin.gif

no, its cute..

11-26-2002, 01:11 PM
I like it too,

I think that it is important how it looks, and not how realistic it is.
Maybe you should post a video with normal stencil-shadows so that everybody sees what a difference it makes to have shadows-with-soft-edges. They make an image much more pleasent, cause it looks more natural.

If i remeber correctly from the thread some time ago, the feature you need the radeon8500 for, is the 3D Texture capability, or where there any fragment operations that could not be done on Geforce2/Radeon7000 Level Hardware?


11-26-2002, 03:34 PM
Well I remember him saying he uses render-to-3d-texture, so I guess any card that has 3d texture support (like the NV20 and beyond) should be able to do this, I guess I'm not sure. I don't use 3d textures anyway. http://www.opengl.org/discussion_boards/ubb/biggrin.gif


11-26-2002, 11:16 PM
Hehe, Divx are blurry, but they compress well.. given the original resolution, i didn't have much choice :)

Well, it's true that you can call them "blur" shadows, but as long as they do not look sharp like with stencil shadows, i call them "soft". Maybe i shouldn't, i don't know.

I can definately post a video with stencil shadows instead. Will try later today.

The features needed for that effect are:
- 3D textures support (render to 3d textures is actually done via glCopyTexSubImage3D)
- pixel shaders for the sharpness lookup (i guess this can be faked in many pass on a Geforce 3+).
I'm also using vertex and pixel shaders for various effects (dot3 bump-mapping, specular and gloss maps), but they are not required. Just some eye-candy for the demo.


11-26-2002, 11:25 PM
Yes, it's a blurred shadow, because in the real soft shadows, the lit->unlit transition is taking care of the occluder distance to the surface and the light radius.

This effect is very good for scene where shadows haven't to be sharp : but is it possible to have the same scene with one, two or three high intensity lights without ambient lighting to see the real quality of the shadows ?

Thanks a lot,


11-27-2002, 12:04 AM
Originally posted by Ysaneya:
Comments welcome http://www.opengl.org/discussion_boards/ubb/smile.gif

Very nice. I agree with you - soft is the opposite of hard. Hard shadows are nasty and you have to build you whole lighting environment around them (look at DIII) Your shadows are not hard == soft http://www.opengl.org/discussion_boards/ubb/wink.gif

I think the distiction is between shadows with true umbra/penumbra regions VS hard shadows with anti-aliased edges. What you (and I) have is something in between.

I like the idea of passing an occluder distance along with each shadow volume vertex. This could be used in a NV30 frag shader to increase the multi-sample radius... must try that tonight.

Matt Halpin
11-27-2002, 05:44 AM
Nice movies http://www.opengl.org/discussion_boards/ubb/smile.gif

What exactly do you need the 3d textures for though?