I have glass material that I want to show the rotated view of the objects behind it. I am not too sure about ray portals, but I think thats the way to go? I even tried using the normal of glass bsdf to no avail. How do go about this?
If you want to get the same result as the lens, make it like an actual lens.
There is no optical phenomenon in the plane.
I’m not sure about the issue of simply flipping.
I’m not sure about this
That approach seems interesting but its allot of testing to get the exact reversed image right(without the distortions)? Rayportal should be able to do something I feel like.
The only problem with using the RayPortal is that you need to really understand the math beneath it in order to tweak/control the desired result, but it’s doable:
It’s actually a simple task…
The nodes on the upper left, just transform the UV coordinates into Local coordinates (by multiplying the U and V by Tangent and Bitangent).
Then we rotate that, and translate to the object position. This will give us the point where the new ray should start.
For the direction, I just used the negative of the normal, with the local coordinates scaled and added, so the rays can diverge (as a perspective view does).
Specifically, I am not getting why you add together tangent and bitangent… or why you then add that sum to the normal in order to get the ray direction… hmmmm… my brain…
The Tangent and Bitangent are used as a new coordinate system. These vectors are in world space and they are orthogonal to each other (and also normalized).
If we then multiply the U coordinate by the Tangent, and the V coordinate by the Bitangent and we add them, we get the transformed UV in World space. (it’s actually a 2D vector multiplication by a 2x2 Matrix).
And for the normal, as the transformed UVs are centered at the middle of the plane, they could also be used to make the direction spread as further from the center (but using 3d vectors instead of 2d).