Possible to make a model see-through to create a window to an invisible skybox/plane?

I’m looking for a work-around in a 3D character model, but I don’t know if it’s possible (or if there’s a better method):

I would like:
The face to act as a static window to a sky background that doesn’t change view when the head is moving,
faces the camera
and doesn’t look weird when looked at from the side (f.e. only the eye floating in midair without a background).

Here is a file with how far I got to solve it, but I don’t know how to go on:
Test Export.blend (1.9 MB)

Is this possible? And if not, does anyone know a good alternative?

You might be looking for something like this:

Note, that’s an “environment texture” node, not an image texture node.

I tried both seperatly.
It gets close to what I need, following the camera at all time.

But in your given method (#1) the texture makes a weird twist and the scale also changes depending on the the camera.


And in my other attempt (#2), the texture looks normal and keeps its scale even when moving the camera, but I can’t figure out how to transform it correctly so that it fits the box.

Any ideas?

You need to use a properly designed image for it-- an equirectangular map. What you’re seeing in your picture is the north pole, if your image was a equirectangular map of the earth. (You can rotate this, by rotating the vector with a mapping node, before using it as a lookup on your texture.)

You can scale texture coordinates using a mapping node, but the problem is that if you use camera coordinates, it’s not going to fit your box depending on your view. Think about a real window: when you orbit it, more stuff comes into view. So your picture has to be bigger than you can see out of it at any one time.

Thank you. I found out quite a bit more.

The big issue that is still leaving me clueless is how I can make the background/object appear only visible through/on the triangle, like a greenscreen effect. I just need to know a projection/greenscreen/some other method that I can’t figure out.

Think I should make a new post and remove this one?

No, I think you should make an equirectangular image and use the technique I demonstrated above. You can find equirectangular images in your Blender directories, or at https://hdrihaven.com/ . Try that out, see if it’s what you want. You should be able to get some info on rendering to an equirectangular image with a quick google search.

What @bandages showed you, works just as you are describing what you want…
I was working on this also and came up with the same basic node group with only some minor changes…

I only added in the Mapping as well as the Background nodes…for a bit more control…the Mapping is used because I copied the node to the back face and rotated 180 degrees so that the object will pan the background as it moves across the screen R > L showing the view it is walking towards on the revealed face…
IE: each face shows the view it is facing…
Not so much a green screen but a portal … I could for instance add a different HDRI for the world and make this a portal :wink:

I’m trying to understand. I really am. But I’m new at this and can’t really follow it well.
I’m in need of more details. At this point I question if I even explained clearly enough what the desired effect must accomplish and if this will do just that.

Can you share the file? Maybe that will clear it up.

Portal.blend (723.7 KB)

You will need to add your own HDRI in the World settings…

Exactly, I had the same result as in the file.
The issue is that the background stays the same when the camera zooms in and out.

Do you mean you want the Background image to scale with the object as you zoom in and out rather than the object strictly acting as a window into an infinitely far away background?

I’m not sure I understand exactly what you’re looking for, but I experimented a bit:

The setup in the big frame allows you to adjust how the background hdri that is visible through the portal scales, when zooming in and out. To do that you can adjust the two values in the math node marked with the blue frame:

  • Setting the Multiplier to 1 and Addend to 0 means it will behave similar to the setup by @RSEhlers.
  • Setting the Multiplier to 0 and the Addend to 1 will make the background visible through the portal basically scale with the portal (meaning: Even though you’re getting closer to the object your field of view through the window doesn’t change)
  • Setting both values to something between 1 and 0 might get you a nice compromise, where it doesn’t feel like the background is infinitely far away - and therefore ‘static’ against the camera - while also not being completely attached to the portal object.

Here is the .blend file in case this is in any way useful to you:
sky-portal.blend (2.5 MB)

1 Like