Smooth transition from air to underwater in Blender(work in progress). I’ll do a thread because not often I see it done right in CG.
#b3d
I teach things like these in art college. I guide my students through the analytical process of dissecting the effects of physical lighting and materials.

So there are several concepts you have to understand that will let you create the water transition effect convincing. Image
First concept - we have to imagine that our Blender camera is actually a real camera. Camera has a sensor, lens assembly and most importantly - a waterproof housing.
(Image source - Outex) Image
In praxis, we can simplify the shape of the housing as a sphere around the centre (sensor) of the Blender camera. Image
Second concept - There are terms like ‘surface tension’ and ‘cohesion’, but for sake of simplicity, let’s just assume that water is ‘sticky’. It sticks to itself and tends to form a spherical shape. So at its borders, water will bend light like a lens. (Image source Getty Images) Image
So in Praxis we just don’t let water at it’s edges look flat. How I did it in the video example above? I made a new geometry just for the air/water transition. A thin cylinder slice worked well. Then using ‘shrinkwrap’ modifier, projected it to the water surface.
For ‘rounding the edges’ part, I blended real normals with up vector and ‘virtually’ bent it.
Third and last concept - understanding indices of refraction (IOR) between different mediums. It is probably most complex between the three, but rather important for proper ‘water look’.

Refractive Index between lens and water is different than that of lens and air. Image
Pro advice: search for real life references. In this case “split level photography” returned stuff I was looking for.
Don’t look for references in games or how others (like me) are ‘faking’ it 😅. Image
It looks like this in wireframe. The edge ‘fin’ cylinder is vertex parented to the Camera, so it does not rotate with it. The fin has two ‘shrinkwrap’ modifiers influencing upper and lower edges separately. That way I can control the thickness. ImageImage
Hole in the water surface is shader based, calculated based of distance from Camera object. ImageImage
Combining the hole and the ‘fin’, it looks like this. Image
Even though the water surface and edge ‘fin’ are two separate objects, we can make it look like one with normal ‘bending’. I included water surface shader node tree (2nd image) and edge ‘fin’ node tree (3rd).
Note: I disabled transparency for clarity. ImageImageImage
I guess I have covered the basics regarding the transition. Seeing that the thread has gained some popularity, I will do the same for other water rendering topics.
Next thread will be about the water surface, where IOR will play significant role.

And to conclude the topic and open the discussion. Have you seen the water surface transition used in any games?
I know @Unigine does it like this (screenshot from water tech video) Image

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Mārtiņš Upītis

Mārtiņš Upītis Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @_martinsh

12 Sep
Now, let me tell you one of the secrets for a fine looking water surface. And it has nothing to do with the water itself! It’s the environment.
From visual aspect, water is a reflection and refraction of surrounding objects, so a good looking sky is where you should start. #b3d
(This is my attempt for clickbaity advertisement)
So you want skies like image above? Buy ‘Physical Starlight and Atmosphere’ addon for Blender and support two brothers, entrepreneurs @_karlisup and me. We call ourselves @PhysicalAddons.
more info:
blendermarket.com/products/physi…
This is going to be another rant about water rendering.
Topic - water surface shading.
Not about geometry and not underwater ‘volume’. Just the thin border separating the two worlds.
Read 12 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(