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

Thread: Sphere mapping

  1. #1
    Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Augsburg, Germany
    Posts
    415

    Sphere mapping

    Is there a difference between the sphere mapping in Microsofts software implementation and the sphere mapping in NVIDIAs drivers? I see different reflections (rotated 90 degrees) in this implementations.

    Are there additional parameters to adjust it or do I have to adjust the normal vectors manually in the different implementations?

    Anybody has similar experiences with other graphic accelerators?

    Thanks.

  2. #2
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    23

    Re: Sphere mapping

    Yup I've got a similar prob. Doing some sphere mapping and on a TNT2 its beautiful. But on a pc with nothing that uses the basic MS drivers its as if the map is stretched vertically not horizontally?

    Still looks ok but not as it should.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2001
    Location
    Queens, NY, USA
    Posts
    9

    Re: Sphere mapping

    On the subject of sphere mapping. I was wondering if anyone else wanted to enact sphere mapping in such a way that the reflection texture coordinates are calculated based on a reflection coming from a source other than the camera itself as OpenGL does when it generates texture coordinates. I would like to do this as I am experimenting with having the camera chase an object. It orients itself directly behind the object (a hover car.) I would like it so that when I turn the car the reflection map changes along with the car's rotation as it appears when I rotate the car and the camera is in a fixed location.

    Right now the map stays exactly the same since the camera aligns itself perfectly behind the car (it moves slightly, but not enough to get the effect I want.)

    I know what the sphere mapping formula is and I believe I can probably calculate the texture coordinates myself, but I figure if I let OpenGL do it, it may be faster.

    Has anyone else messed with this? Could the GL_TEXTURE_MATRIX have something to with it?

    Daniel Piron

  4. #4
    Junior Member Regular Contributor
    Join Date
    Feb 2001
    Location
    Gothenburg, Sweden
    Posts
    124

    Re: Sphere mapping

    If you multiply the texture matrix with the camera transform (or the inverse, I can't figure it out right now), it might do the trick.

    (otoh, it might not..
    --
    /Marcus

Posting Permissions

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