Results 1 to 7 of 7

Thread: OT : Sphere map...

  1. #1
    Member Contributor
    Join Date
    Jun 2001
    Posts
    74

    OT : Sphere map...

    Afternoon,

    Does anyone know where i can get a sphere map of a horizon please?

    i know it's OT but you were warned before entering the post

    Cheers,

    Allan

  2. #2
    Senior Member Regular Contributor
    Join Date
    Feb 2003
    Location
    Westerville, Oh, USA
    Posts
    201

    Re: OT : Sphere map...

    Not sure what you mean. What are you trying to accomplish?

  3. #3
    Member Contributor
    Join Date
    Jun 2001
    Posts
    74

    Re: OT : Sphere map...

    a texture map of a horizon that's suitable for mapping onto a sphere. My camera will sit inside the sphere with the other geometry.

    when you use a 2^n x 2^m texture map to texture a sphere, the points along the top and bottom (the poles) are compressed and the points along the centre (equator) are stretched.

    i think (i might be wrong) but there is a method to convert the texture so these effects are not so pronounced...

    anyway, decent pics of a horizon would be a good start...


    cheers

  4. #4
    Senior Member Frequent Contributor
    Join Date
    Jan 2003
    Location
    Virginia
    Posts
    586

    Re: OT : Sphere map...

    I think you actually want a cube map. There is a demo on nVidia's web site (bubble.exe??? as well as source and I'm pretty sure it has a cube map)along with a pdf for cube environment mapping. And, for texture coords, I think you need to use glTexGen with GL_SPHERE_MAP to auto calc tex coords for good environment mapping on a sphere.

  5. #5
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: OT : Sphere map...

    Sound like you want a skydome.
    The nicest skyboxes (cubemaps) I've seen are on http://www.planethalflife.com/wadfather/index-old.htm
    Preprocessing these with a small software routine from the 6 cubemap textures to one sphere texture should be simple.

    Pseudo algorithm is this: For each texel in the sphere texture (expressed in polar coordinates) generate the normal vector, the longest component selects the cube face, the two shorter select the cubemap texel.)

    And no, texgen is not involved here.

    [This message has been edited by Relic (edited 05-14-2003).]

  6. #6
    Member Contributor
    Join Date
    Jun 2001
    Posts
    74

    Re: OT : Sphere map...

    ah cheers all - nice one...

    give yourselves a pat on the back.



    Allan

  7. #7
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    292

    Re: OT : Sphere map...

    Well, I wrote I skydome algorithm and it does what you seem to be asking for... http://141.217.130.254/miguel
    That is my temp address.
    I finished something that should get posted sometime today. It is how to integrate a skydome and a skybox and how to emulate moving clouds with them. It is pretty cool.

    -=Miguel=-

Similar Threads

  1. Render a trimmed sphere ? (a quarter of sphere)
    By HaVyThoai in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-07-2007, 12:05 PM
  2. About lod on a sphere
    By romb in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 12-09-2003, 04:14 AM
  3. Sphere-sphere collision detection
    By Billy Lee in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-08-2003, 11:03 AM
  4. Sphere
    By Vlasko in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 09-05-2001, 06:06 AM
  5. Sphere
    By abhiboy007 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-11-2001, 01:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean