Jump to content
  • Advertisement
Sign in to follow this  
immuner

Mapping texture to a sphere

This topic is 4389 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
When I get some time here soon I will write more and make some graphics that I hope will help.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!