Underwater rendering

Just following up here. I dusted off my old college physics book and it makes a lot of sense to me now why the rounded shape creates Snell’s window as such. With the sun, the incident ray angle is of course the same (thus the directionality) but the angle of refraction and incidence is constantly changing as the surface normals are curving which leads to this cool effect. As a result the direction of the refracted ray is changing as well, which is why it leads to such darkness around the edges. At least, that is how I understand it currently.

I don’t know why I had such a hard time grasping that yesterday, but it all makes sense to me now. It really must be based off of the fact that a real world lense has curvature to it, and this is probably the most poignant case of the main difference between a cg camera and a real one that I’ve encountered in a while.

Thanks all for bearing with me. I’m super happy to have learned that two unrelated shapes with the same material can cause fog inbetween them. Already thinking of neat ways to use this.

Hi deflaminis, here’s a curveball

If I delete the bubble surrounding my camera, I still get the Snell’s window effect.
This leads me to believe that the bubble isn’t responsible for the effect, it’s only used to ensure the correct fog colour and strength for the material applied to it (and also the waters surface). This also seems to be in-line with Vlado’s suggestion earlier on in this thread

I could be wrong although I literally have nothing but a HDR, vrayplane and camera in my scene and I am seeing the same result as I would with the bubble in there

There is also a disadvantage to using the bubble which I have noticed in that only your refraction element will contain any information, basically nullifying the composite

This might be fixed by using the affect all channels in the refraction of the water and bubble material though again I could be wrong

This is correct; it is not the bubble that creates the Snell’s window; the bubble just helps V-Ray figure out the correct shader parameters (ior and fog).

Best regards,
Vlado

Thanks for the confirmation Vlado

Ant

Well, darn. :confused:

I wonder what causes the window then. I get how it works now, but I just don’t get *why*. Not important for rendering I guess, but curious.

When I delete the bubble in Vlado’s scene (and remove fog), the effect breaks and seems to invert and head to white. Is that working as intended? Is it the fog that creates the window in the first place?

I realize this is all academic as long as the effect works, but I like to know for sure what is happening.

So you guys are obviously right, the window is still there but I didn’t expect it to get brighter. The definition on Wiki says “The area outside Snell’s window will either be completely dark or show a reflection of underwater objects.” So I sort of expected the darkness to be a function of a changing surface normal and IOR as opposed to natural fog in water.

So maybe that lack of any fog on the material (from removing the bubble) causes it to go white and be “wrong”? I apologize for all the questions here fellas, just trying to sort this all out mentally. (Ha!)

Thanks,
AJ

EDIT: Maybe it’s white because it *is* reflecting the sky… just underwater as there is no ground plane. I think I have it all sorted out now. I apologize to all the people who have been following this and are face-palming at how long it took me to figure it out.

no facepalm mate! this has been a very interesting read, learning things not strictly work related is really refreshing. if people weren’t curious where would we be?

I second that entirely kimgar, questions lead to answers which lead to progress

I’ve learned some interesting things from this thread myself so kudos to Deflaminis for starting it! :wink:

This is correct, yes.

Best regards,
Vlado

Thank you all for being so supportive. I means a lot to me, and thank you Vlado for your time. Hope you all have a great weekend!

AJ

been reading this thread with interest as im working on an underwater scene and having trouble getting it to actually look like its underwater rather than a ‘blue day’
its for print and animation and im trying to do as much in render as I can get away with for sake of ease

the set up is a vray fog, single plane water, sky and a few spots for the volume and caustics

here is a link to my test animation in shallower water…

vray caustics / environ fog

https://dl.dropbox.com/u/9641128/NS14\_water\_test.mp4

however im having all kinds of problems once i try to get something pleasing on a deeper more complex scene - the caustics don’t reach as well with deeper water and the fog is difficult to set up with such deep water (goes very dark. i guess ill do the caustics separately but id like to do the fog in render

does anyone have any more tips for deep water rendering? i find it hard to balance the fog the exposure and the lights (dome (ambient) spot (caustics) spot (noise projectors for rays)
not having much luck with underwater particles either!

really interesting thread. Bubble around the camera is a nice simple solution.
Am about to start work on a project that is a lot of underwater shots. Vray fog will be used along with vlscatter. From a comping point of view I find that vray fog is very limited in that you cant use it with light select.

This is the best way I have found to do it, however there is one flaw in vlados scene. As the plane and bubble require the same material to work, you cannot use a bump.
This creates the swirly effect as the bubble, which is supposed to be the transition from water to camera lens, has bump on it as well. Creating a second ripple in the refractions right infront of the camera.
See the images. Snell_Bump has the bump on the material as per vlados setup. Snell_Displace, just has vray displacement on the sea surface.

Just a quick side note, you can also control this by using a vraymultitexture to set the bump and reflections differently for the bubble and the sea surface.


Or you can use displacement on the water surface.

Best regards,
Vlado

Been reading this thread and trying to get the effect to work with Maya, but without much luck… is there any chance we could have the sample scene for Maya? I know it’s a long time since this thread was active, but I couldn’t find anything similar on the Maya forum. Thx!

I believe there is another discussion on the same topic but for Maya.
I’ll try to find it and will post the link here.

Wasn’t able to find it although I am sure that I have posted a scene for Maya somewhere.
Here is the same scene from this thread converted to Maya one:

screenshot: http://ftp.chaosgroup.com/support/screenshots/maya\_2016-03-29\_16-38-30.png
scene: http://ftp.chaosgroup.com/support/scenes/maya\_underwater.mb

That’s awesome, thanks very much for the reply! :smile: