Soft Shadows with OpenGL

Sage
Posts: 1,403
Joined: 2005.07
Post: #1
What sorts of ways can soft shadowing be done with gl?
Ill only be rendering somthing like one character perscene, and a pretty low polygon model for the background so it doesnt have to be really fast, but I want this to run at a reasonable speed on a standard computer.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 529
Joined: 2003.03
Post: #2

"Yes, well, that's the sort of blinkered, Philistine pig-ignorance I've come to expect from you non-creative garbage."
Quote this message in a reply
Moderator
Posts: 102
Joined: 2003.07
Post: #3
Not sure if this is what you're looking for... but it might help.
http://www.gamedev.net/reference/article...le2032.asp

-CarbonX
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #4
This has to be 3D sadly, which means its really really hard.

From a pdf document on linked to from that site (http://www.stereopsis.com/shadow/tr138.pdf) There's this:
tr138.pdf Wrote:The results were quite good. Regeneration of 256x256 shadow textures for a single receiver and several hundred occluders with 64 light samples happens at 30 Hz on an Intel Pentium Pro at 200 MHz. This was an unexpected improvement over the earlier Reality Engine implementation, which achieves much lower speeds (5 Hz) using the hardware accumulation buffer.

What im doing here is putting 3D model onto a prerendered background, and using a low poly model of the scene for clipping the character(s) when they walk behind objects and shadow calculations.
So in that way, There will be a low polygon model, that is only drawn to the depth buffer and the things getting drawn on screen will be an animated character and some objects as well probably.

With that respect and

• 128x128 might look just as good in this case
• Probably less than several hundred occluders
• Less than 64 light samples
• Faster than 200 MHz

I can probably get faster than 30 Hz?
Does that seem likley, before I spend days tearing my hair (and everyone elses) out?

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #5
There's an article about *proper* soft shadows in the 2nd edition -- I think -- of NVIDIA's GPU programming book. The shadows are as far as I can tell perfect.

That said, I think it's DirectX, but HLSL and GLSL aren't that different and it could probably be ported.

One thing I should mention -- the article linked above by LSL uses the accumulation buffer which, I think, is not harware accelerated on OS X. You might be able to get around that by some trickery, like rendering each pass into a PBuffer or FBO and blending it against the previous one.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Window drop shadows NelsonMandella 9 5,450 Mar 21, 2010 02:34 PM
Last Post: NelsonMandella
  Making 2D Stencil Shadows Soft metacollin 16 15,016 Jul 22, 2009 01:59 PM
Last Post: NelsonMandella
  softening 2d shadows NelsonMandella 5 4,548 May 19, 2009 04:19 AM
Last Post: Najdorf
  Real-Time Soft Shadows MarkJ 6 5,105 Feb 17, 2007 03:10 PM
Last Post: MarkJ
  Rendering 2D Shadows for Convex Shapes Nick 16 9,640 Nov 28, 2006 11:50 AM
Last Post: memon