Jump to content
  • Advertisement
Sign in to follow this  
Beren77

Map texture "manually" to a sphere

This topic is 2590 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

Hi,

I am writing a 2D game. Well. Mostly. All of the graphics are 2D, but I'd like to have a "ball" to roll around. Now, so far, I am content with SOL's solution in the SOL tutorials (projecting polar coordinates to the 2D surface). But I'd rather like to apply a texture to the ball.
So, the easy question is: How can I map a texture to a "circle" (well, a sphere, alright, but so far, I did not compute any normal vectors -- how could I achieve this? Do I need normal vectors for this?).

Where can I find a good example of sphere-texture-mapping? I googled, of course, but maybe I am looking for the wrong keys, because I _can_ find how to map a texture to "vertices" -- which, so far I don't have...

Am I talking gibberish again or can you actually follow my weird thoughts?! :)

Just ask for specifics, and I'll try to clarify; if you have a solution to my problem (or know where I have to look), I'd be thankful if you could help me!
Thanks!
Beren

Share this post


Link to post
Share on other sites
Advertisement
If I understand you correctly, I think what you're after is a map projection. There are a number of different projection algorithms out there, the linked article should be enough to get you started :-)

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!