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

Thread: Shadows but not shadows ???

  1. #1
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Shadows but not shadows ???

    Hi !

    I want to add a kind of shadows to an application, if you have ever used RayDream for example you know what I am talking about.

    I have one or more objects and around these objects I have three grid planes (one on each axis) and I want to display the contour (or shadow) of the objects on the grid planes, but with the same size as the original objects so the light source should have parallel rays....

    This if for a 3D modeler, presenting the contour of the objects on the grid planes makes it easier to see how the objects are oriented to each other.

    Does any one have an idea on how to do this or have a pointer to information about this subject ?

    As the grid planes are planar quads and they are always axis aligned it should be possible to optimize this a bit, i think.... maybe....

    Mikael

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,453

    Re: Shadows but not shadows ???

    If it's enough to draw the filled "shadow" just collapse the object by sending zero coordinates for x, then y, then z. You could also apply glScale() calls with zero coordinate per plane and a glTranslate to move it to the plane.
    Disable lighting and normalization and draw in some single color (e.g red, green, blue for x, y, z plane). If there is already a plane, check out glPolygonOffset to remove z-bleeding.

    If you need the real contour as line coordnates it's getting difficult (hull with holes, etc.)
    Probably the RealTimeShadowmap examples in the GLUT distribution give some starting point.

Posting Permissions

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