Sea/Ocean Shader (Where closer to land is brighter. Away would be darker)

Hi,

I watched this tutorial (made in C4D with Octane Renderer) where the sea is lighter near the land and darker away from the land.

You can see my attempt here:

As you can see it is fairly dark. Is there a way to fix this?

I’m using a glass shader and a volume absorption shader. You can check the file here:
wave_displace_render.rar (1.9 MB)

Thank you for looking at my problem.

I just had a look at the file. I guess, this is happening because your scene is ‘open’ but the world/sky material is quite dark. If you set the background strength to ‘1’ things should look a lot brighter.

1 Like

2 Likes

Thanks! Works as expected.

Why use a color ramp if its Fac is unplugged?? It will just do the same as an Input>RGB node, while using lerp to calculate one color…
It’s misleading!

In this case, putting the color at [0.5] of the color ramp directly in the Absorbtion node’s color, is basically the same.

1 Like

The water looks dark like that because the light is not getting through the glass for reasons:

A- your direct/indirect clamping value is set very low causing the sun to be limited brightness as it passes through
B- it is very difficult for cycles to render light passing through glass shader (it needs many samples to show through)

Best solution is to use transparent shadows for your water shader and turn off refractive caustics

1 Like

You could still apply some fresnel to that transparent shader. I haven’t tested, so I don’t know how inverting the IOR for backfacing faces will work. For glass with thickness, you have to add a power function to camouflage the unnatural double shadow, which isn’t a problem for very thick and curved glass where this would happen anyway. This could further be modulated with a caustics image pattern.

1 Like

Hi Secrop,

its not the same.

You’re effectively halfway between the green and white color. If you colorpick from the gradient it should be the same. A gradient with two slots in linear mode and fac input used is the same as a color mix with fac used. A gradient without fac used is pointless. A color mix without a fac is useful as the color slots can vary for each pixel (using input sockets) where a gradients colors are fixed.

2 Likes

As @CarlG pointed: The result is just the interpolated value at 0.5 (which is the factor you’re using).

Pick the step color[0] and the step color[1], add their components and divide them by two, put the resulting color in the VolumeAbsorption node and you’ll see no difference.

1 Like

Okay okay, you two are right.
My mistake.

1 Like

Thanks all for the additional response.

The suggestions of @Rhys and @CarlG are really interesting. Will be sure to try to them out.
The light path is really foreign to me but I see them a lot. Guess its now time to dive in.