How to project a regular image onto a subset portion of an environment background?

I’ve been searching for a method to do this for a while now.

Suppose I have a background texture, sky, distant mountains, etc that I want to use in my scene. It is not equirectangular.

I could just place this texture on an image plane in my scene, but then a small amount of camera panning reveals that it is a flat plane, as it won’t distort correctly.

What I’d like to do is project this image texture onto the 360° environment background in the world shader, without stretching it across the entire imaginary sphere of the environment background.

As an illustration:

If you imagine that this UV sphere represents the “sphere” of an environment background, this is what I’d like to do in the world shader:

If we view that sphere from inside, it does work as a proof of concept! I’d just like to be able to do this to the environment world background, and not have to deal with a giant mesh sphere around my scene:

Many thanks all!

Hi perrykroll,
i think you want to use the longitute and latitude as the UV coordinates? Like so:


Edit:
Or do you mean that the outside of the image should be clipped? If so, set the Extension of the Image Texture Node to Clip:
image

3 Likes

Hi - so I am hilariously and rudely late here (IRL got in the way), but just wanted to thank you for the solution. It’s perfect, and I am using it right now. Major kudos!

1 Like