Texture mapping of an eye on a sphere

Hi everyone, I am an artist based in Berlin, I am trying to develop a project and I would like to create eyes but I already found a problem starting with the sphera texture, unfortunately I couldn’t find any tutorials or solutions that would work for me.
I have a problem with the sphere texture, I am trying to map an eye onto a sphere but when I use SOP Texture and set it to XYZ Normalized, the texture appears both front and back and the result is an eye with two pupils. while when I use spherical Polar the textur is distorted and has a strange seam.


Hi @Reichhardt81,

using a square texture for a sphere will have this effect. Think about it in a way that you are taking a square stretchy cloth and try to wrap a basketball with it. it will not really fit. Perhaps if it fits from the top of the ball to the bottom, it will not fully wrap around and the corners will somehow be folded in as there is extra material.

For wrapping a sphere often equirectangular textures are used where you can see stretching in the top and bottom part - the areas that will be pulled back together on the poles of the sphere (just like your regular map of the world where the arctic and antarctica are massively oversized but shrink back together when mapped onto a world) Usually the aspect ratio of these textures will be 2:1. (Also compare this article on wikipedia: List of map projections - Wikipedia)

Now in your case, you could use the Texture Type “Equidistant Azimuth (Fish Eye 180)” which is drapping the square texture onto the sphere. This will be correct without any major distortions for half of the sphere geometry - not sure if that is enough. The only other way would be to find a proper equirectangular texture or 360 fish eye texture.

The Texture SOP btw also offers various controls to scale and offset the texture coordinates. In your first case, increasing the first scale parameter to 2 will at least get rid of the distortion.

Hope this helps a bit
cheers
Markus

2 Likes

Thank you very much for the explanation, it solved the problem right away, in the back of the eye you can see the problems of the seam, but now I will try to generate a rectangular texture with the right distortion so that it fits the sphere. In any case the advice has improved my project significantly.
thank you very much