View Full Version : OT : Sphere map...
05-12-2003, 03:36 AM
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 http://www.opengl.org/discussion_boards/ubb/wink.gif
05-12-2003, 09:13 AM
Not sure what you mean. What are you trying to accomplish?
05-12-2003, 11:07 PM
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...
05-13-2003, 02:34 PM
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.
05-14-2003, 01:11 AM
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).]
05-14-2003, 02:51 AM
ah cheers all - nice one...
give yourselves a pat on the back.
05-14-2003, 05:34 AM
Well, I wrote I skydome algorithm and it does what you seem to be asking for... http://126.96.36.199/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.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.