OT : Sphere map...


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



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

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…


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.

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).]

ah cheers all - nice one…

give yourselves a pat on the back.


Well, I wrote I skydome algorithm and it does what you seem to be asking for…
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.