Calculating Shadow Geometry

Started by
15 comments, last by Brian Lawson 17 years, 10 months ago
Quote:Original post by Ysaneya
You sure this is a shadow map ? It's hard to see, but i don't think there's self-shadowing on the character, which hints that it could be simple projected shadows (and which would also explain why it runs on a GF4 MX).

Y.

That's a good point. I don't know much about projected shadows, however what you can't see in that screenshot is the "swimming" effect which a low res shadow map is famous for. This effect, though almost isn't noticeable because of the blurred nature of the shadow.

This page mentions "shadow buffers" have been used though I have no idea what they are.

Even if it is projected planar shadows, are there techniques for getting soft shadows with them?

If only Splinter Cell could blur the shadow according to distance from caster, I would call it the best shadow ever possible on a Geforce4 MX. [smile]

@acid2: No PCF on a GF4MX [grin]. Also, for the rest of the game the smartest thing would be to use static lightmaps, whose presence are toggled by whether the light is on.
Advertisement
Quote:What technique did Splinter Cell (2003, I thought this was something to keep in mind) use? I think they use a shadowmap, but how do they blur the edges so much and make it seem so soft?

Its kind of hard to see, but I think the grayish pipe on the left wall (in the picture) is not shadowed as it should have been. Then it must be projected shadows not shadow maps.


Quote:I have myself implemented a "dual texture" method which, to be frank, looks terribly aliased and far far inferior to the above screenshot.

I have implemented PCF shadowmaps in my renderer but the drawback is that its only good for spotlights. I'm trying to use cubic shadow maps instead... but now that you mention the dual shadowmaps wont be bad either. So is it simply using two depth-textures back to back the same way as a single shadowmap is done, or is there something else to it ?
-[Anudhyan][Website]
Hi Anudh, whereabouts in Kolkata are you?

Quote:Original post by Anudh
Its kind of hard to see, but I think the grayish pipe on the left wall (in the picture) is not shadowed as it should have been. Then it must be projected shadows not shadow maps.

I think you're correct, but as I said before I don't know how projected shadows work. Are you saying that they are projecting onto 2 planes (wall and floor) and rendering the pipe afterwards?

I'm beginning to take this view as well, since the shadows only show up on floors / walls, not on stairs.
Quote:
I have implemented PCF shadowmaps in my renderer but the drawback is that its only good for spotlights. I'm trying to use cubic shadow maps instead... but now that you mention the dual shadowmaps wont be bad either. So is it simply using two depth-textures back to back the same way as a single shadowmap is done, or is there something else to it ?

Dual texture - that's just 2 textures for the depth comparison. One of them is the depth map and another is a uniform "depth ramp" with values from 0 to 1. The latter is subtracted from the first (texture combiners) so that any un-uniformities in the depth map (shadow casters) show up in the final texture.

You are looking for dual paraboloid shadow mapping I think. While I haven't implemented it, there is a paper by Brabec and many other references on the internet.
Quote:Hi Anudh, whereabouts in Kolkata are you?

I live at Dakshineshwar. (my real name is Anudhyan) :)

Quote:I think you're correct, but as I said before I don't know how projected shadows work. Are you saying that they are projecting onto 2 planes (wall and floor) and rendering the pipe afterwards?

I did projected shadows a long time back. Yes its like projecting the body (whose shadow is to be drawn) onto a plane. I dont think the order of rendering is important, but GL_POLYGON_OFFSET_FILL should be enabled to eliminate z-fighting between the shadow and the plane its cast onto. Its somewhat like this...

	GLfloat shadow_matrix[] =         {	    light_y,         0.0,	0.0,	          0.0,           -light_x,         0.0,      -light_z,         -1.0,	    0.0,	     0.0,	light_y,          0.0,	    0.0,	     0.0,	0.0,              light_y,	};        //Draw a body...        glMultMatrixf(shadow_matrix); //start drawing its shadow	glDisable(GL_LIGHTING);        glColor3f(0,0,0));        //Draw the body again        glEnable(GL_LIGHTING);


Quote:You are looking for dual paraboloid shadow mapping I think. While I haven't implemented it, there is a paper by Brabec and many other references on the internet.

I haven't looked into dual paraboloid shadow mapping, and I've no idea about it, but I want to take advantage of cube maps, those 6 2d textures, for omni-directional shadows.
-[Anudhyan][Website]
speaking of Dual paraboloid shadows, does anyone have a sample implementation? I could never get how to construct the matrices..
Quote:Original post by Matt Aufderheide
speaking of Dual paraboloid shadows, does anyone have a sample implementation? I could never get how to construct the matrices..

As I wrote in the earlier post I haven't implemented them - but there are a couple of links which I had marked down (really the internet is full of articles on dual paraboloid [smile]):

http://developer.nvidia.com/object/dual_paraboloid_env_mapping.html
http://www.gamedev.net/columns/hardcore/dualparaboloid/default.asp

Hope that helped
I implemented the dual parabolic shadow maps before ending up with my current solution. And I have to say that the results were no good -- for reasons already known. i.e. geometric tesselation was too low and in too many situations the shadows were non-uniformly stretched and deformed -- it was beyond unacceptable.

The only way I'd ever see them becoming usable is if you know if _advanced_ that's the technique you're going to commit to and then have every piece of geometry built with enough tesselation to prevent the artifacting.

Unfortunatly, in a real production environment when things often come online towards the end of a project -- having the art department remodel and or go back and more finely tesselate a world's worth of geometry just isn't an option.

This topic is closed to new replies.

Advertisement