- Home /
Rotating texture uv on sphere
Hi.
I encounter some issues trying to rotate a texture on a sphere (both with a unity default sphere or with a 3dsmax geosphere). There are always texture-distortion and sometimes the texture is no longer visible.
I've try two ways to rotate the texture of a mesh with the same result (it works perfectly on a plane but not with a sphere) : - changing directly the uv list in a script - apply a rotation matrix to the shader
I guess it's because of the uv-mapping on the sphere and the fact that the rotation center can be hard to interprete on the texture. I tried some solution with a 3d-artist but without any solution. Any hint ?
A little explanation of the purpose of the app for those interested :
The sphere is the earth and texture represent continents. The purpose of the app is to move continents around an axis (Euler axis). The intersection of this axis with this earth is called the Euler pole and can be either on a continent (then the continent will rotate on itself with a invariant point) ot not (and then it's like a translation of the offset combined with a rotation). We use texture rotation (and not mesh transform rotation) because we need to make the texture diseappear when two continents collide (thus avoiding z-fighting)
Here some images :
Thanks!
Images mapped to Unity's sphere must be specially processed. If you Google 'Spherical Panorama' and view the images, you will find many examples. They are characterized by a double loop at the top and usually have an aspect ratio of 2:1. Here is one example from my personal experiments:
Given the distortion necessary to map the image to the sphere, you cannot arbitrarily map part of an image to another part of the sphere.