Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 9 of 9

Thread: Soft shadows

  1. #1
    Advanced Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    656

    Soft shadows

    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

  2. #2
    Senior Member OpenGL Pro sqrt[-1]'s Avatar
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    1,006

    Re: Soft shadows

    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)

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    656

    Re: Soft shadows

    Hi sqrt,

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

    Thanks again,

    Alberto

  4. #4
    Senior Member OpenGL Pro sqrt[-1]'s Avatar
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    1,006

    Re: Soft shadows

    Just google for "projected textures" and you should get 100's of demos.
    eg. http://www.sulaco.co.za/opengl_proje...d_textures.htm

    Then lookup "OpenGL blur filter" for blurring.

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

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    656

    Re: Soft shadows

    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

  6. #6
    Senior Member OpenGL Pro sqrt[-1]'s Avatar
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    1,006

    Re: Soft shadows

    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?)

  7. #7
    Advanced Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    656

    Re: Soft shadows

    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

  8. #8
    Advanced Member Frequent Contributor yooyo's Avatar
    Join Date
    Apr 2003
    Location
    Belgrade, Serbia
    Posts
    883

    Re: Soft shadows

    @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)

  9. #9
    Advanced Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    656

    Re: Soft shadows

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •