Download

Problem with lava material (causing flickering)

Hi,

I made a little lava material and it looks kind of how I want it, but there is a big problem when rendering it.
The material starts flickering and as soon as the camera is a certain distance away, it disappears completely.
It also seems depending on the viewing angle, because even further away, it satarts to show again as flickering.
If the camera is really up close, the flickering is mostly gone, but not completely.

I made a short video, demonstrating the effect: https://youtu.be/l2CfV7N1dzA

The material setup is as follows:

The function for the lava:

LavaFuncTemp.JPG

0c8d2db14fd99ddad303b3fa402fb2d831a42815.jpeg

4cba1639b29209b9f994728a5df7554f168dc1cf.jpeg

In the material, the function is used straight forward:

120f2760a358bd4219ae37b53da6362c911bcf63.jpeg

Does someone know why this is happening?
Any help is appreciated :slight_smile:

Cheers,
Klaus

If you disconnect World Displacement and offset the flickering stops yes?

Yes, indeed. If the displacement is disconnected, the material looks much more boring, but does not flicker…
As a mesh, I use a cube with a 160x80 quads top face. Could that be the reason?

No worries, it should work fine with displacement.
First try increasing the bounds scale of your cube.
That does the trick most of the time.

For visual help: viewport > Show > Advanced > enable Bounds.

Thanks for the reply :slight_smile:

I fiddled a bit with the bounds settings, but the problem still persists.
Just to test, I useda different mesh (a plane mesh from the engine content) and its giving me much better results.
So I think the mesh is the culprit afterall. The engine content mesh is however a bit low poly, so even with tesselation, the lava lacks somewhat of fidelity.
I think I will play aound with differently detailed meshes to find out whats best.

What else could I try to test??

Hmm pity that didn’t work :frowning: Are you sure you tried high enough settings? No effect at all even when you make it 10? (or type 20 just for fun, though that might cause other issues but just for experiments sake)
What are your tesselation settings in the material details tab? Did you try PN Triangles with adaptive tesselation ON and Crack Free Displacement OFF?
Also plug in a constant (value on 3) in the tesselation multiplier. It probably won’t fix anything but you never know…

Yepp. Tried that. No real difference.
Havent changed the tesselation multiplier yet. Gonna give that a try tonight :slight_smile:

It must be a boundingscale issue. I have no idea what else might cause this. If you’re willing to go to some more effort, try implementing distance based tesselation.
You can then essentially just kill displacement beyond anything but close-ups. If that doesn’t take care of your issue I’ll eat my shoe.