Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: make shadows part of of the API

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2000
    Location
    San Francisco, CA, USA
    Posts
    22

    make shadows part of of the API

    make shadows part of of the API

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    503

    Re: make shadows part of of the API

    Kind of vague! Do you mean projective shadows? Stencilled shadow volumes? Shadow maps? There's a lot of different techniques, all with different quirks and tradeoffs.

    I think you're at the wrong level here, TBH. OpenGL is an immediate-mode API; shadowing is a retained-mode feature. Besides, shadows aren't a "solved" problem - there's a lot of activity and research in the area at the moment - so locking the API in to one paticular approach isn't really desirable.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Apr 2000
    Location
    Adelaide, South Australia, Australia
    Posts
    765

    Re: make shadows part of of the API

    agreed; added to this is the fact that shadows are a higher level than an interface to the graphics hardware (which is the design rationale behind opengl)

  4. #4
    Junior Member Regular Contributor fenris's Avatar
    Join Date
    Mar 2000
    Location
    Cincinnati, Ohio USA
    Posts
    129

    Re: make shadows part of of the API

    ahh, but romedial lighting functions are built into OpenGL. Light causes the casting of shadows, thus some means of shadow casting built into OpenGL may be worth looking at? I dunno, but shadows are a very important feature to creating a realistic looking 3D scene, and it is something that can be a pain to do by hand.

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    503

    Re: make shadows part of of the API

    "Romedial"?

    Light is different. The OpenGL illumination model allows the renderer to light a primitive based ONLY on the primitive itself plus the current renderer state. This fits perfectly well in an immediate-mode API. Shadows, OTOH, require the renderer to know about the entire scene in order to shadow a primitive, so it belongs in a retained-mode API.

    Features will certainly appear to support shadowing, or to make it easier. But you aren't going to see glEnable( GL_SHADOW ) anytime soon, nor should you.

  6. #6
    Junior Member Newbie
    Join Date
    Jul 2000
    Posts
    29

    Re: make shadows part of of the API

    Couldn't one make a program then that would take the code as the parameter, figure out all the shadows, add produce the desired output as code which one could then paste into the program code and the end user would have shadows and the program wouldn't take forever to figure out how to shadow the whole scene, it would have the shadow descriptions right there.

  7. #7
    Member Regular Contributor
    Join Date
    Feb 2000
    Location
    milano, italy
    Posts
    282

    Re: make shadows part of of the API

    please, be realtime !!

    just some thoughts:

    why don't find some way to automatically generate shadow volume polygons, on a per-polygon basis...

    to generate a single triangle shadow volume, we have only to do standard 3D frustum calcs.
    THEY add some functionality to select a bunch of gl lights as shadow volume generators, something like
    Code :
    byte  lights[]={0,1,4,6};
    glEnable(GL_SHADOW_VOLUME);
    glShadowFuncbv(GL_SHADOW_VOLUME,GL_LIGHTS,4,lights);
    could be a first step.

    then, the shadow volumes generated need to be optimized by merging them together when necessary...

    Dolo/\/\ightY
    Dolo/\/\ightY

  8. #8
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    503

    Re: make shadows part of of the API

    Dmy, that's retained-mode functionality. No way can you do it in an immediate-mode API without breaking the model in horrible ways.

    Just one example - stencil volume polys are only generated for silhouette edges, not for all polygons. To determine whether a triangle edge is part of the silhouette outline you need to know about the adjacent triangle that shares that edge. OpenGL just doesn't have this information. Sure, you _might_ be using vertex arrays where it wouldn't be too hard to figure out edge sharing, but you might not, and trying to specify the behaviour here would turn into a gigantic rats' nest of what-ifs and special cases.

    Just my 2 verts. I want automatic shadowing too, I just can't see a way to get there at the moment.

  9. #9
    Member Regular Contributor
    Join Date
    Feb 2000
    Location
    milano, italy
    Posts
    282

    Re: make shadows part of of the API

    yes, i know how to, and i agree with all previous points.
    i'm just having fun at thinking ways to let shadows break through the opengl model...

    Dolo/\/\ightY
    Dolo/\/\ightY

  10. #10
    Intern Contributor
    Join Date
    Jul 2000
    Posts
    85

    Re: make shadows part of of the API

    There is no reason why there can't be more direct support for shadows in opengl. PowerVR chips have support for shadow volumes in hardware so there is no reason why it can't be included in the state machine. If openGL stays tied to the way SGI did it 15 years ago it will die.

    There should definitely be support for modifier volumes of some kind in openGL.

Posting Permissions

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