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 6 of 6

Thread: Casting shadows from wireframe object

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2009
    Location
    USA
    Posts
    14

    Casting shadows from wireframe object

    Hi,

    Is there anyway to cast shadows from wireframe entities (such as glutWireSphere or simply GL_LINES )on a non planer objects?

    I am sure there must few smart guys out there who have already figured it out. Thanks in advance!!

    -Prasad

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Casting shadows from wireframe object

    Pretty sure it works out of the box with shadowmap.

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2009
    Location
    USA
    Posts
    14

    Re: Casting shadows from wireframe object



    cool..thanx ZbuffeR!! Do have any example code or can u please direct me to more elaborate articles on it?

    Best,
    -Prasad

  4. #4
    Member Regular Contributor remdul's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands
    Posts
    335

    Re: Casting shadows from wireframe object

    If self-shadowing is not an issue, I suggest you render this to multi-sampled FBO, or more efficiently, to a normal 8-bit texture/FBO with line anti-aliasing.

  5. #5
    Junior Member Newbie
    Join Date
    Jun 2009
    Location
    USA
    Posts
    14

    Re: Casting shadows from wireframe object

    Actually self shadowing is one of the most important aspect of it

    I am using shadow volume technique to cast shadows from polygons. Now I also want line entities in my model to cast shadows.

    It seems like a very basic problem. there has to be something to deal with it.

    -Prasad

  6. #6
    Advanced Member Frequent Contributor _NK47's Avatar
    Join Date
    Mar 2008
    Posts
    574

    Re: Casting shadows from wireframe object

    just switching to wireframe mode and rendering shadow volumes won't work i afraid. if a line would consist of two triangles you could extrude them like you do with shadow volumes. basically a quad of two triangles forming a line is then a shadow volume mesh. seems like this is a horrible approach, shadowmaps are way better here.

Posting Permissions

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