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

Thread: Coded infinite shadows, now gluPickMatrix doesnt work!

  1. #1
    Junior Member Regular Contributor
    Join Date
    Oct 2002
    Location
    San Diego, CA, USA
    Posts
    209

    Coded infinite shadows, now gluPickMatrix doesnt work!

    The significant change that I see here is that I am now using an infinite projection matrix. I am wondering, how do I go about fixing this? Im thinking mebbe I should use a standard matrix just for picking. Is there a more valid way around this problem?

  2. #2
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,968

    Re: Coded infinite shadows, now gluPickMatrix doesnt work!

    Unless you are trying to pick the shadow volumes themselves, maybe you should just omit the volumes from the picking pass.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Oct 2002
    Location
    San Diego, CA, USA
    Posts
    209

    Re: Coded infinite shadows, now gluPickMatrix doesnt work!

    That's not the problem, what the problem is is the perspective matrix. I have set up the picking matrix and non-infinite projection matrix. It doesn't match what's visible perfectly, but it does select the appropriate mesh usually. There's a decent amount of inaccuracy the further you get from the center of the view. I can clean up the error by moving the far plane further out, but I don't know how far I want to go.

  4. #4
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,968

    Re: Coded infinite shadows, now gluPickMatrix doesnt work!

    Sorry, I don't understand what you're saying then.

  5. #5
    Junior Member Regular Contributor
    Join Date
    Oct 2002
    Location
    San Diego, CA, USA
    Posts
    209

    Re: Coded infinite shadows, now gluPickMatrix doesnt work!

    Well, I guess I can survive with the picker in its current state. Maybe I can squeeze some more accuracy out of it.

    It turns out when the projection matrix is loaded with an infinite matrix, whenever I tried to pick out something which has been clicked on, it only selects what's in the upper right hand corner of the view.

  6. #6
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,968

    Re: Coded infinite shadows, now gluPickMatrix doesnt work!

    A spatial disparity that increases towards the edge strongly suggests a simple frustum miscalculation. You might want to try drawing with the same matrix you pick with and compare the view with the correctly rendered scene.


    [This message has been edited by dorbie (edited 03-05-2003).]

  7. #7
    Junior Member Regular Contributor
    Join Date
    Oct 2002
    Location
    San Diego, CA, USA
    Posts
    209

    Re: Coded infinite shadows, now gluPickMatrix doesnt work!

    The disparity at this point is slight enough for me to not worry about it.

Posting Permissions

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