Mapping texture to a sphere

Started by
5 comments, last by immuner 17 years, 10 months ago
What is the best way to map a texture or a heightmap (2D i guess) onto a sphere? Or is it better to go for 3D?
Keyboard not found. Press F1 to Continue.
Advertisement
I haven't managed to map the texture to a sphere properly (no strecthing, etc.).
My texture is 2:1 ratio and i have used any technique that could come to my head. Any way to extract phi and theta from the cartesian coordinates of the sphere? Or is there any other simpler way?
Keyboard not found. Press F1 to Continue.
A Cubed Sphere works well for me. [grin]
Developer Journal: The Life of Corman
im using a cube as well but im generating the 2:1 texture within the app. How should i map it to my cube - sphere?
Keyboard not found. Press F1 to Continue.
When I get some time here soon I will write more and make some graphics that I hope will help.
Developer Journal: The Life of Corman
Why don't you get some 3D modeling software like maya or max and create the mesh and the texture there? I use maya and i can directly draw to texture there so when i export it i get the correct UV's.

XorMultiPleXus
Thank you for your answers. Finally, i solved the problem with mapping. I just had to find out abetter way of mapping the uv coordinates to the sphere. Im using a dynamically generated sphere so doin it on 3d modelling software wont help. Anyways, the problem now is an annoying seam where the texture starts again and it seems i need to duplicate those vertices.
After that, i just need to think of some cool effects to add.

P.S. I am using an indexarray to draw my mesh. Will that cause any problem if i want to use shaders? Any website with some cool shader effets?
Keyboard not found. Press F1 to Continue.

This topic is closed to new replies.

Advertisement