PDA

View Full Version : Soft shadows



devdept
10-12-2006, 12:09 AM
Hi All,

Anybody know how some application render these nice soft shadows? Is it an OpenGL extension? It looks so fast....

Take a look to the image: http://spec.unipv.it/gpc/images/SWgtx.jpg

Thanks for your help,

Alberto

sqrt[-1]
10-12-2006, 12:35 AM
Looks just like a blured projected texture to me.
- no self shadows.

(eg. render from light view, black into a white texture, blur then project onto the plane)

devdept
10-12-2006, 12:52 AM
Hi sqrt,

Thanks for your help. Do you know where I can find a code sample for it?

Thanks again,

Alberto

sqrt[-1]
10-12-2006, 02:49 AM
Just google for "projected textures" and you should get 100's of demos.
eg. http://www.sulaco.co.za/opengl_project_projected_textures.htm

Then lookup "OpenGL blur filter" for blurring.

Some details here on projected shadows technique:
http://www.cbloom.com/3d/techdocs/shadowmap.txt

devdept
10-12-2006, 03:48 AM
Yes,

Projected textures are quite easy, the rest is someway hard...

Are you sure that there is not something more easily implementable using OpenGL Extensions?

OpenGL exists from almost 20 years and everybody wants shadows. Is it possible that hardware vendors don't provide anything cheap from programmers point of view?

Thanks again,

Alberto

sqrt[-1]
10-12-2006, 05:43 PM
There are shadow map extensions in OpenGL (now in core) but if you think projected texture shadows are hard, shadowmapping is probably above you.

What exactly is hard about projected texture shadows? (you say projected textures are easy, what makes using them for shadows hard?)

devdept
10-12-2006, 09:53 PM
I gave a look to the links you suggested. There are a lot of lines of code to write...

I try to google for Shadow Map Extensions and see if they are some way more compatible with myself...

Thanks again so much,

Alberto

yooyo
10-16-2006, 03:00 AM
@devdept:
Maybe you need simpler interface like:
glApplySoftShadowARB(GLfloat softness);

well.. there is no such interface. But if you read few documents or tutorials about shadows in OpenGL you'll find that it's pretty simple, but it require some additional code for FBO/Pbuffers and little math (nothing advanced.. only matrix composition)

devdept
10-16-2006, 05:16 AM
Hi yooyo,

Yes, you are right ;-)

I already use shadow, projected on one plane and FBO for rendering to a bitmap... I need only a detailed guide to follow...

Thanks again,


Alberto