Using panopicture in a material/shader for creating a correct view out of a window


I tried to create the following:

I created an office suite with a line of window with two corneres (picture below).
Now I wan’t to achieve that, when you are looking outside through the window, that you have the correct view to the places outside. At this moment I’m using pano spheres, but this is not a good solution, because I wan’t that, when you are looking through a nother window, that you have the correct view again.

My first thought was, to use panoramic sphere pictures. But I have no clue how to undistort the texture in the material, like a pano sphere would do it. I tried at first with a TriplanarCameraVector but this was a complete failure.

Then I tried with a normal photo (plane) and use bump offset, but this will give me ugly tiling. (The street and other stuff you can’t get in the lense with one shot)

Then I tried to use the worldnormal in combination with the cameravector, to achieve that, when I’m looking to the north, the photo taken from the north is showing only on this window. Also I can’t achieve that…

I’m a bit frustrated…
In my rage I destroyed every complex material notes… :confused:

maybe you have an idea or a tip what I’m missing or what I can do to achieve that.

Sorry for my bad english and I hope you can help me with this problem.

Video with Bumpoffset

Video with TriplanarCameraVector

Sure! :slight_smile:
Every window got now it’s own view. The only thing I’m missing, what i would have with a Pano sphere, is that in a Pano Sphere I would have a little offset in the translation. Atm the point where I’m looking on, is always in the middle. Of cours, because I’m projecting the texture straight out of the middle from my camera. But can I give the camera vector a little offset, so when I’m moveing to the right, the texture is moving a bit to the left? Or other described: The texture is not moving the same amount of translation value then the camera. Camere (player) is moving 1m the texture is moving 9.5m. (With a little offset)

Then it would be more then perfect!!! :smiley: