How to rotate the view of glass?

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?

untitled.blend (980.7 KB)

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

Search for ray ports

Lens thickness and stuff doesn’t matter to me. Unless it helps me get the 180 rotated view.

Can you explain what you want it to do?

I guess the TS wants a spoon-like reflection (upside down).

Play with the lens shape and its material IOR value. Also, the location of the lens, objects viewed, and a viewer point of view influence the result.

The shape should be something like this:

Here are basic settings and result:

4 Likes

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:

5 Likes

Damn I thought this would look simpler (didn’t try). At least this has to converge much faster than a refraction bsdf

1 Like

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).

3 Likes

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).

some math explained

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).

3 Likes

You’re not alone… It’s blowing my mind :exploding_head:

3 Likes

Ok got it. Thanks a bunch, it makes sense now

And also try sphere raytraced transmission