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

Thread: EMBM in OpenGL

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2003
    Posts
    8

    EMBM in OpenGL

    I've been interested lately in environment mapped bump mapping. I can't seem to wrap my head around the technique however.

    In Real-Time Rendering (Moeller & Haines) EMBM is described somewhat like this. A certain pixel is read from texture Coords u,v from a given bumpmap. This results in a new 2 dimensional vector that is transformed by a matrix and used to access a third environment map texture.

    What I'm not understanding is how this is enough to generate any kind of effect. Because texture coordinates are provided on a per-vertex basis no real warboling (new word?) will occur within a given triangle. Rather, only at the verts themselves.

    I'm obviously missing something here. Can someone please help?
    If brute force doesn't solve your problem..........you're not using enough!

  2. #2
    Junior Member Regular Contributor
    Join Date
    Nov 2002
    Location
    Los Angeles, CA
    Posts
    208

    Re: EMBM in OpenGL

    Texture coordinates are interpolated across a triangle, and a texture lookup is done for each fragment of the triangle using the interpolated coordinates.

  3. #3
    Junior Member Newbie
    Join Date
    May 2003
    Location
    Edmonton, Alberta, Canada
    Posts
    3

    Re: EMBM in OpenGL

    With EMBM, the texture coordinates are interpolated across a given triangle and used as a lookup into a 3-dimensional normal map (a 2-D bump map must be first converted to a 3-D normal map) to obtain the normal for that pixel. This new normal, in conjunction with the vector from the eye to the pixel, is used to calculate a reflection vector which is in turn used as a lookup into the envmap.

  4. #4
    Junior Member Newbie
    Join Date
    Jun 2003
    Posts
    8

    Re: EMBM in OpenGL

    >>Texture coordinates are interpolated across a triangle, and a texture lookup is done for each fragment of the triangle using the interpolated coordinates.

    >>With EMBM, the texture coordinates are interpolated across a given triangle and used as a lookup

    Ohhh. I see how its done.

    That makes a lot more sense. I'm still not used to thinking about things at the fragment level. Is it possible to implement this without pixel shader hardware?
    If brute force doesn't solve your problem..........you're not using enough!

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Dec 2002
    Location
    Espoo, Finland
    Posts
    599

    Re: EMBM in OpenGL

    Not all hardware can perturb texture coordinates the way that's required for EMBM. If you want to use bump mapping on older hadrware it's better to use dot3 bump mapping.

    -Ilkka

Posting Permissions

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