How do I texture a org.lwjgl.util.glu.Sphere?

Started by doctorpunk, June 16, 2011, 10:05:57

Previous topic - Next topic

doctorpunk

Hi guys.

I just discovered the very easy Sphere object which works great. When I set the flag for generating texture coordinates it appears to warp my 256 x 256 brick texture around it all strangely. I'm wondering what is the best way to texture these spheres and what do the texture files end up looking like?

Thankyou very much for the help I do appreciate it.

Fool Running

Usually a sphere has texture coordinates such that a texture of the world would look correct (like a globe). This means that the texture will look correct near the equator and squeezed near the north and south poles. It's like trying to take a piece of paper and wrapping a ball with it.

If you need some other behavior, I'm afraid you'll have to generate a sphere yourself.

Hope that helps. ;D
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

doctorpunk

Thankyou.

When I was messing around with the textured sphere I found 2 things. 1. the texture seemed to 'follow' me around. secondly when i looked at the sphere at the angle that was directly facing its 'slices' it appeared like it was all sliced up and 'glitched' for lack of a better word.

The end point i suppose i'd like to reach is making something that looks like a respectable planet.