texturing a sphere...

Started by
5 comments, last by Marty666 19 years, 7 months ago
Hi all. I'm trying to texture a sphere. I don't really know where to start, since i want no borders, tiling a sphere is dificult. 3D textures would use too mutch memory. How do i do this fast and cheap? Thanks, Marty
_____ /____ /|| | || MtY | ||_____|/Marty
Advertisement
is it for a sky dome etc?
"I am a donut! Ask not how many tris/batch, but rather how many batches/frame!" -- Matthias Wloka & Richard Huddy, (GDC, DirectX 9 Performance)

http://www.silvermace.com/ -- My personal website
I'd suggest using a geosphere, since you don't get artifacts at the poles then. Otherwise just generate a set of polar coordinates (you can tile them very simple).
I allready have the sphere. It's supposed to be a planet. It's got the vertexes messed up in the process of creating the sphere to have some sort of height map on it. The sphere was made by tesselating an octahedron and adding noise after eacht tesselation step. The noise gets less every step, so the more detail on the sphere, the smaller the noise. A bit like perlin noise. The problem is that I need to map it correctly. I found some articles about changing your texture to a spheremap and about the calculation of the uv coordinates from two angles and a radius. I would prefer to do this all on hardware. It must be possible with opengl, right?
Any info please,

Thanx!
_____ /____ /|| | || MtY | ||_____|/Marty
glTexGen anything? It has a spheremap function. What exactly does it do for me?

thanx,
Marty
_____ /____ /|| | || MtY | ||_____|/Marty
there are many ways to texture a sphere eg
http://astronomy.swin.edu.au/~pbourke/opengl/sphere/
note that its impossible to find a perfect solution for this problem
thanks
_____ /____ /|| | || MtY | ||_____|/Marty

This topic is closed to new replies.

Advertisement