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

Thread: Shadow volume generation

  1. #1
    Intern Contributor
    Join Date
    Jan 2004
    Posts
    78

    Shadow volume generation

    I am currently working on shadow volumes,but I have encountered the following problem:
    One of the first steps of this technique is to determine the silhouette,based on the position of the light and the geometry of the model.All the docs I've read state that the model must be "closed" in order to get things right.But consider this example:

    . -->LIGHT

    OOO
    OOOOO
    OOOOO
    OOO
    OOO
    OOOOOOOOOO
    OOOOOOOOOO
    OOOOOOOO

    What is the silhouette here?The object is closed but obviously there are two silhouettes,one "small" and one "big".Also,the part of the object that cast the "big" shadow volume is shadowed by the "small".Am I getting something wrong or should I cast two shadow volumes for one object?

    [This message has been edited by mikeman (edited 02-17-2004).]

    [This message has been edited by mikeman (edited 02-17-2004).]

    [This message has been edited by mikeman (edited 02-17-2004).]

    [This message has been edited by mikeman (edited 02-17-2004).]

  2. #2
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: Shadow volume generation

    The silhouette is both. You can have multiple silhouettes.

    Tried this?

    Practical and Robust Shadow Volumes http://developer.nvidia.com/object/r...w_volumes.html
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  3. #3
    Intern Contributor
    Join Date
    Jan 2004
    Posts
    78

    Re: Shadow volume generation

    Thanks!

Posting Permissions

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