Total Internal Reflection

I’m creating an underwater scene. I wanted to create the circle of light above the camera at the water surface, caused by refraction at the water surface. I have read that BI can handle total internal reflection (but not cycles). However, I haven’t been able to get either to work, although Lux Render worked as it should.

Am I doing something wrong?

Sorry, not exactly a master when it comes to BI, but I just wanted to chime in to say that Cycles seems to have no problems with Snell’s window

Thanks @IkariShinji, Looks great, especially when it wasn’t supposed to.

I’ve tried again but I still can’t get it to work. I did get an effect similar to yours by faking it with the env map. Could you post your .blend please?

Sure, here you are. Had to replace the commercial HDRI with a free one, though.

Thank you @IkariShinji.
The “sea bed” has no effect and can be deleted. The snell effect seems to be generated by the “Enhance HDR” node, rather than being done natively. I don’t understand why it works. Even sin instead of cosine works and it works with just a plane for the water instead of a cube. The IOR needs to be fairly big but I’m not sure where this takes effect.

I’ve also found that adding waves has no effect on the output. It is only effected by texture changes.

I’d love to know more.

If you replace the enhance HDR node with a background shader node it works fine… The enhance hdr node just does brightness / contrast operations on the environment texture.

The effect also works with a plane instead of a cube

uploaded a modified version here where its a plane & standard background shader & no seabed –

Thanks @doublebishop . Unfortunately it doesn’t work with waves either. I’m using two ocean modifiers to cycle waves continuously, without breaks.

Snells Window used with the ocean modifier –

Exactly, the “Enhance HDR” node group just does what it says: It increases the contrast of the environment HDRI to e. g. get sharper shadows from sunlit environment scenes. And it also allows to easily use a low-res HDRI for the lighting and a high-res LDRI for reflections and camera (or to just have different brightness values for lighting, camera and reflections with the same environment texture). But that node group has nothing to do with the Snell’s window effect.

Top: Just HDRI connected to backgroud node, strength 6
Bottom: Same HDRI, but with Enhance HDR node group, strength 3

I have this node group in my startup scene - sorry for the confusion!

And I wouldn’t say that the seabed mesh has no effect - it significantly darkens the areas outside of the “window”, which I find nice.

The water mesh is a cube in order to have the option to add “volume” shaders later, as I can’t really imagine an underwater scene without. But of course, do this in your scene as you wish.

Anyway, I hope you can sort this out!

Thanks guys. I think that gives me plenty to work with.

I should have posted this as something I’m trying to head towards: