How do I get UVs to texture cube sphere?

Started by
-1 comments, last by Temeezer 9 years, 8 months ago

Hello,

I am trying to put textures on my cube which I have turned into a sphere, but alas the only thing I have gotten is a headache (I can't math).

Cube sphere code: http://pastebin.com/B6ijfdbf

I am fairly sure that I could apply my textures to the sphere following this tutorial: http://www.opengl-tutorial.org/beginners-tutorials/tutorial-5-a-textured-cube/ but I have absolutely no idea how to get those UV coords.

It could be that this: http://iquilezles.org/www/articles/patchedsphere/patchedsphere.htm explains it, but as I said, can't math.

I have searched all around the google and gamedev for a solution a long time and its starting to wear me thin, so I hope that someone can help me with this.

- Temeez

This topic is closed to new replies.

Advertisement