Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

iNsAn1tY

New shadowing techniques...

This topic is 5208 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

OK, so I''ve implemented stencil shadowing before, but I want something better now. What are the latest updates on shadowing techniques? I know all about shadow-mapping, and penumbra wedges, but I''d like to know about some of the cutting-edge techniques for creating real-time soft shadows, including those methods which use vertex and fragment programs. Can someone point me in the direction of some tutorials, or give me a quick rundown of what I should be looking for? Thanks in advance...
Windows 95 - 32 bit extensions and a graphical shell for a 16 bit patch
to an 8 bit operating system originally coded for a 4 bit microprocessor,
written by a 2 bit company that can''t stand 1 bit of competition.

Share this post


Link to post
Share on other sites
Advertisement
Moved to graphics forum.

----------------------------------------
"Before criticizing someone, walk a mile in their shoes.
Then, when you do criticize them, you will be a mile away and have their shoes." -- Deep Thoughts
"If you have any trouble sounding condescending, find a Unix user to show you how it''s done." - Scott Adams
FaceHat Software -- Wear the hat.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Advanced shadowing, ie. algorithms that support good self shadowing, no work from the CPU, etc ?

Stencil shadows and shadow maps. That''s about it. There have been some extensions to both recently (GPU volume extrusion for stencil shadows, and PSM, TSM, etc, for shadow maps), but all in all, it''s still the same.

Share this post


Link to post
Share on other sites
So the soft shadowing in Max Payne 2, and the soft shadows in Half-Life 2 and the Unreal 3 test are all just optimized and enhanced versions of either stencil shadows or shadow-mapping? I suppose that shadow-mapping, being geometry indepedent, is now completely taking over from stencil shadows, as polygon counts get higher?

[edited by - iNsAn1tY on April 16, 2004 11:32:46 AM]

Share this post


Link to post
Share on other sites
I noticed that the sample Cg shaders section of NVIDIA had info on stencil shadow volumes in the Vertex Shader section and soft stencil shadows and hardware shadow maps in the pixel shaders section. Don''t know if it''s new, but might be worth a look..

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by iNsAn1tY
So the soft shadowing in Max Payne 2, and the soft shadows in Half-Life 2 and the Unreal 3 test are all just optimized and enhanced versions of either stencil shadows or shadow-mapping?


Don''t know about Max Payne 2, but about the other two, they are a combination of shadow maps (I think) and standard lightmapping. There might also bit a little good old projection shadows involved, which might still be a good choice for dynamic entities.

quote:

I suppose that shadow-mapping, being geometry indepedent, is now completely taking over from stencil shadows, as polygon counts get higher?


Yes. The inherent problems of shadow mapping (mostly precision issues) are starting to be addressed with the said extensions, and more research is underway. Stencil shadows are nice in theory, but they take an insane amount of fillrate, tremendeously increase the number of faces to render, and fail on certain types of geometry.

Share this post


Link to post
Share on other sites
I've done a bit of work with shadows recently, so I'll kick in my views:

I can't speak for HL2 or Unreal3, but in Max Payne 2, they're actually projected shadows.

If you notice while playing the game, Max's shadow projects onto the world, but not other people or objects. Instead of actually rendering a shadow map, they rendered the object from the POV of the light (basically the same as a shadow map only they don't reoord depth), and then blur that just a tiny bit (I'm not sure if they run it through a blur pass or if the bilinear filtering takes care of it - I'm guessing the latter). Thus, a soft-looking shadow on the environment, but no self-shadowing.

Advances? There was a thread a while back about large-environment shadow mapping, which tried to come up with a 5-map (max) method of rendering shadows for a large outdoor scene, but the method fell flat in practice (The size of texels along one direction of the shadow map remained constant with distance, which is what's expected, but the texels on the other direction grew exponentially with distance, giving really bad resolution far from the screen).

Here is the thread if you're interested.

Perspective Shadow Maps have their advantages, but I believe there are too many disadvantages to them. They have a few good cases where the resolution is near-perfect, but there are a lot of bad cases. And they're really, really bad cases. Also, it may be the hardest shadow algorithm to implement. It's complex, and there are parts of it that seem rather glossed-over by the paper.

Trapezoidal Shadow Maps seem pretty good, though I haven't tried to implement them yet. The nice thing about TSMs is that the worst case (which, like PSMs is when you're looking directly into or directly away from the light) is no worse than a normal shadow map. So, while it's arguable for PSMs, the average case is definitely better than normal shadow mapping (as it never gets worse). Also, it seems to be a very easy-to-implement method, especially using vertex shaders (which most, if not all, shadow-map capable hardware supports).

I also saw a paper (though I've forgotten where) on soft-edged stencil shadows using "Penumbra Wedges." This technique looks very promising, but it currently does not run well enough to work in realtime (though it does work at interactive rates). There's still ongoing research into this. I'm looking forward to when it's useable!

Hope that helps

EDIT: Wow...three replies while I typed this! The smoothies link looks neat...I'll have to check it out!

[edited by - Drilian on April 16, 2004 11:52:27 AM]

Share this post


Link to post
Share on other sites
Actually you should read the PSM chapter in GPU Gems, it really addresses most of the PSM issues. PSMs are actually quite usable and not too difficult to implement now.

Share this post


Link to post
Share on other sites
1-Max payne2 : The shadows of max payne 2 are projected shadows using D3DXMatrixShadow or any similar fuction.sampling is done to the shadow depending on the of the the distance from the light source. This shadow can only be projected on palns, not on characters or any other things in the world.
2-Unreal3 : They are using spherical harmonics lighting which support soft shadows and dynamic lights, but it does not support dynamic geometry.I don''t know how they are generating the shadows for characters.
3-Half life2 : for static geometry they are using radiosity and normal maps.The radiosity of course handels the shadowing.
for dynamic geometry, I don''t know what shadowing technique they are using.
I think that for dynamic geometry, only old sahdowing techniques are used.
Another thing that I want to add, the shadow volume is not affected very much with the poly count if the shadow volume was generated in a vertex shader.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!