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: Correct curvature.

  1. #1
    Intern Newbie
    Join Date
    Jan 2001
    Location
    Canberra, ACT, Australia
    Posts
    40

    Correct curvature.

    Hey guys,

    I'm at work, so I can't verifiy this right now. So bare with me.

    Am I right in thinking that if I render a triangle in OGL all it segments (ie: lines between a, b and c) will be straight (screenspace)? No matter what the FOV?

    I ask this because I remember reading somewhere that OGL (and DX for that matter) on perform transformations on the vertex level. Hence my conclusion.

    So I am further assuming that if one wanted to perform fish-eye lens type effects, one would have to either:
    - Tesselate their geometry.
    - Render with an actual ray-tracer.

    What do you think?

  2. #2
    Junior Member Regular Contributor
    Join Date
    May 2003
    Location
    New York
    Posts
    206

    Re: Correct curvature.

    Originally posted by MojoMagic:
    Hey guys,

    I'm at work, so I can't verifiy this right now. So bare with me.

    What do you think?
    Okay, keep your clothes on.

    Tessellation is one approach. Ray-tracing isn't necessary. You can render a 1st pass to textures and map that onto a deformed mesh for various lens effects.

    Avi

  3. #3
    Member Regular Contributor
    Join Date
    Jun 2000
    Location
    Cambridge, England
    Posts
    270

    Re: Correct curvature.

    You won't get a fish-eye effect if you set the FOV really wide, because OpenGL doesn't do true perpective, just an approximation.
    Maybe you could make a vertex program to transform vertices correctly, but the rendering to texture method that Avi suggests is probably your best bet.

    [This message has been edited by Don't Disturb (edited 11-21-2003).]

Posting Permissions

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