Material that acts like world texture

Hello,

I am trying to make a scene where a wall has an “impossible” window, that views something that is not on the other side of the wall. Ray portals and emissive shaders almost achieve what I want, but these techniques are missing the lighting that is emitted by the world texture.

Consider this render of a box with a hole cut in it in an HDR skybox, 128 samples w/ 2 bounce max. The sunlight casts a crisp beam of light on the wall.

When I replace the hole with a ray portal, the world’s lighting is not transmitted through the portal and the results are much different.

How can I create the “impossible” window effect and preserve or recreate the lighting of the world texture?

portal_issues.blend (1008.3 KB)
HDRI https://polyhaven.com/a/table_mountain_2_puresky

What do you want to see through the window? (I take it you want that hdri for the light and to see something else)

You can use the world hdri to light and a portal to show something else like this.

Here I have a portal which views the inside of a black cube with a monkey and point lamp in it.
The light that comes in from the window is the hdri of the world shader.

Here is the file (I changed the world hdri for a sky texture to keep the file size down)

portal_issues2.blend (149.9 KB)

(I used an empty for the position of the portal view)

1 Like