PDA

View Full Version : Sphere textures and rotation.



Rhaegar
03-22-2003, 08:50 PM
I have a sphere that is spinning around the y-axis. However, I when I applied the texture to the sphere the texture wraps around the z-axis. So when it rotates it does not look right (it is supposed to be the planet earth). How can I force the texture to wrap around a different axis?

nexusone
03-23-2003, 03:31 AM
You can just flip or rotate the image in a paint program to adjust position.

Or adjust the point in the texture coords,buy changing the coords.

example if you start at 0,0 as the first one, try starting with 1,1 or 1,0 to rotate it.



Originally posted by Rhaegar:
I have a sphere that is spinning around the y-axis. However, I when I applied the texture to the sphere the texture wraps around the z-axis. So when it rotates it does not look right (it is supposed to be the planet earth). How can I force the texture to wrap around a different axis?

Rhaegar
03-23-2003, 09:32 AM
I don't think either of those will work:

First, I'm using gluSphere so I don't actual set any coordinates. Second my texture is not square but a rectangle which means if I rotate in photoshop and then put it on the sphere the proportions get stretch and it looks wrong. I'm trying to wrap the earth texture around the sphere.

nexusone
03-23-2003, 09:55 AM
I use glusphere also, on it you can not change the texture coords.

But as I suggested you can rotate/strech the image with a paint program that is what I have done in the past with glusphere.

You also can make an offset adjustment on rotation of the object also.

look at my glball demo on my website.
www.angelfire.com/linux/nexusone (http://www.angelfire.com/linux/nexusone)


Originally posted by Rhaegar:
I don't think either of those will work:

First, I'm using gluSphere so I don't actual set any coordinates. Second my texture is not square but a rectangle which means if I rotate in photoshop and then put it on the sphere the proportions get stretch and it looks wrong. I'm trying to wrap the earth texture around the sphere.