Issue with Fog and Translucent Material

Hello everyone!

I’m posting here because I’m having an issue I can’t seem to solve on my own.

I’ve got an issue regarding Translucent materials and Exponential Height Fog. The issue is that the rendering of the Translucent material (In this case an ocean material) becomes severely different when viewed from different locations of the map (it also varies on certain angles). I’ve attached a couple of images so you can see the difference:

As you can see, the difference is quite dramatic, and the camera has only moved passed the boathouse on the right hand side of the first image. The camera is also at the same world height location in both images.

I’ve attached an image detailing the settings I have on both my fog and my translucent ocean material.

I’ve tried turning on “Two sided” on the material as well as un-ticked separate translucence but nothing has worked so far. I would appreciate it very much if anyone could shed some light on this issue! Thank you very much!

Hey JHBurton -

There is a current limitation with Translucency and Fog having to do with how the engine handles lighting translucent objects, it is an element of the engine that is still in development. I do want to ask if you also have atmospheric fog in your level, there is actually an issue with conflicts between the two fogs.

Let me know -

Eric Ketchum

Hey Eric,

Thanks for your quick reply. I’m not using atmospheric fog - I couldn’t get the effect I wanted with it and it seems that it isn’t compatible with translucent materials at all so with the ocean shader being such a large part of the level it wasn’t really an option.

Is there any sort of ETA on a fix for the exponential height fog issue?

Thanks,

Hey JHBurton -

Can you try to choose your ocean and set the Translucent Sort Order (under the Rendering section of the mesh details) to 1 from 0? This may fix the issue but either way can you post a screenshot of the results.

Thank You

Eric Ketchum

Hey Eric,

So sorry for the late reply - it totally slipped my mind as I was working on other things. the sort priority of the sea mesh is 0 right now, and changing it doesn’t seem to make any difference - I’ll post a screenshot anyways so you can see.

Again very sorry for the late reply! hopefully we can figure out a fix for this :slight_smile:

Hey -

There are still some limitations to using translucency and fog. However I would suggest looking into the Water Shaders that Alan Willard put out recently (look in the Learn Tab of your Launcher), it offers a unique way of having translucency with a water surface that will still work with an exponential height fog.

Thank You

Eric Ketchum

Translucency is fogged per-vertex, unlike opaque surfaces which are fogged per-pixel. If your water plane is created out of a few huge triangles that will cause big problems. Try tessellating it in a modelling application to see if that improves the fog.

Hey ,

We actually solved this a couple of days ago but you are completely right, my sea plane stopped being tessellated in that area and it caused these issues. Thanks a lot for your response though, hopefully anyone having this issue can just come here for an answer!

Thanks again!

Thanks Eric, I’ll be checking those out, however we fixed the issue by tessellating that area of the sea mesh :). Thanks for your help though!