Is this possible

By the way i have noticed the same effect in the new game Dying Light while watching a stream

DL.jpg

Oh boy… stuff hurts my brainz

The alpha blend tends to work good enough at an angle, but straight on you might need something more indeed. That dying light example is an interesting approach. A bit dark, but that wouldn’t be a big in your case as your scene is quite dark anyway. I couldn’t resist to prototype it a bit, here’s a material function to create such a mask that you could use in the glass material of your helmet to create a similar effect:

Very interesting solution, for some reason i haven’t thought about drawing the effect on the glass material instead, i wouldn’t have known how to make the plane displacement match anyways, let me give your technique a try

Thanks!

No problem, that Dying Light screenshot seemed to add the mask in screen space, but as you need to have the helmet in front it seemed logical to add it to your world behind the glass instead. You could add another sphere just outside of the helmet to handle the mask, but that would result in two, almost screen filing, translucent objects instead of just one for the glass. So integrating it directly in the glass shader should save some performance.

The technique works but i’m having a really hard time matching the water contact effect to the spherical mask, it is now obvious that the helmet’s shape isn’t the same as the water spherical mask because of the contact effect being applied to the helmet and not following exactly where the water is being cut off

I’m also having a hard time matching the displacement of the water plane, when applied to the contact effect the scale is really off

But i see how the technique could easily work in a no suit situation !

Another observation,

The helmet glass material is a bit too translucent for the effect, but could be applied to a second mesh with a masked water contact effect only, as you suggested

The mesh could also be spherical and match the spherical water mask, there would be a lot of trial and error involved in order to make everything match perfectly

Looking back at the Dying Light screenshot you can also notice that they made the pure black area a little thicker. In my quick prototype mask the water has to line up perfectly as there is only a thin black line. Dyling Light might even have a flat water plane based on that shot, as long as the waves of the mask do not exceed the pure black area of the mask no one would notice. Simply offset the two gradients in the material function to get a similar effect.

Additionally you could also combine mask with the alpha blended edge on the water surface to help hide the transition behind the mask.

Thanks Arnage,

I’ll play around with what you suggest and report back in a bit

After watching more of the Dying Light game the water definitely seems to be flat, they are faking the displaced look with a wavy border, it should work pretty well but i would lose the waves against the walls

Again, i’ll report back in a bit when i have something good going on

I still haven’t found a way to make work, getting the mesh to match the mask is a bit tricky, also it is obvious that the flat water plane isn’t following the wavy border, having an alpha blend would have helped but the water plane needs to be fully opaque behind the water border or it would just look strange when viewed from above or below in the suit (being able to see through water between the border and the fading in water)

If only there was a way to draw a thick border directly on the water mesh where the mask ends

Unfortunately I can not help you, but I can remember bug in Assassins Creed black flack :smiley:
Maybe gives you some ideas.

That glitch is pretty funny, i thought about using displacement around the mask to create some sort of thickness but i don’t think it would look smooth, might have to give it a try

Arnage’s method seems to be the best approach so far but getting the wavy border to match my suit’s helmet and the water plane is challenging

If all else fails i might have to skip that cool effect, it really is slowing down my progress

I managed to get it working and i’m pleased with the results

I used a spherical mesh around my helmet and used its location for my spherical mask, then adjusted the sphere’s radius until it matched the mask perfectly

I changed my high poly displaced water box surface for a simple flat plane, the animated border is enough to make the water look wavy and thick

http://i.cubeupload.com/4hTeyb.gif

Wow KhenaB … that looks super cool. Good job. 8-}

I’m back with another challenge

Right now i’m using an Exponential Height Fog for my underwater visibility, it works well but it is missing an important element

I’m trying to simulate a depth effect, where the light diminishes in the abyss

I want the fog to appear darker at the bottom, a simple gradient

Is possible with the Exponential Height Fog ?

Thanks

I don’t think you can do that with exponential height without manually editing the code behind it.

You could try something similar to the post process material I posted in thread.

That should allow you to easily tweak the brightness based on depth. However, like mentioned there, to make it physically accurate you’ll want to calculate the color along the ray not just the end. Didn’t really matter there, but probably matters for you.

Thanks Arnage,

I remember having played around with post process materials in my early attempts at making an underwater fog, i’m going to give the thread a look and report back if i manage to come up with something

I’m not able to get good results, i should really take the time to learn how to use the material expressions, i have an idea of what i want but don’t know how to get there, math is my weakness

As you mentioned, “only the geometry location defines the fog color” is definitely why i don’t get the desired effect, " It would be more correct to consider the colors along a ray from the camera to the geometry" is what is missing and it really won’t work without effect, any suggestions on where to start?

0b61d0a0dfa970875ac6d5be7503a2f02cf32807.jpeg

Thanks

I have managed to re-create something similar to my height fog (still without a gradient), but the PostProcessInput0 node seem to give me more accurate colors than SceneColor

However with PostProcessInput0 i get bright outlines around meshes when using Fringe, is a known?