# Problem with lava material (causing flickering)

**URL:** <https://forums.unrealengine.com/t/problem-with-lava-material-causing-flickering/37168>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [July 31, 2015, 12:18pm UTC](https://forums.unrealengine.com/t/problem-with-lava-material-causing-flickering/37168 "2015-07-31T12:18:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![KVogler](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KVogler](https://forums.unrealengine.com/u/KVogler)\
**Post date:** [July 31, 2015, 12:18pm UTC](https://forums.unrealengine.com/t/problem-with-lava-material-causing-flickering/37168/1 "2015-07-31T12:18:32Z")

</div>

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](https://youtu.be/l2CfV7N1dzA)

The material setup is as follows:

The function for the lava:

 ![LavaFunc.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/b/5bff9e145e31af859d6cede4434fe07cc31d51d9.jpeg)

 ![LavaFuncNoise.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/5/e5d5975e8a104f09d67cdf0fad3e31d37a19ca93.jpeg)

![LavaFuncTemp.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/2/b287bb89e0425658441026fb150e3ca3d8a91e4d.jpeg)

![0c8d2db14fd99ddad303b3fa402fb2d831a42815.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

![4cba1639b29209b9f994728a5df7554f168dc1cf.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

In the material, the function is used straight forward:

![120f2760a358bd4219ae37b53da6362c911bcf63.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

Does someone know why this is happening?  
Any help is appreciated 🙂

Cheers,  
Klaus

---

<div class="post-metadata">

**Author:** ![Chesire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chesire](https://forums.unrealengine.com/u/Chesire)\
**Post date:** [July 31, 2015, 10:08pm UTC](https://forums.unrealengine.com/t/problem-with-lava-material-causing-flickering/37168/2 "2015-07-31T22:08:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![KVogler](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KVogler](https://forums.unrealengine.com/u/KVogler)\
**Post date:** [July 31, 2015, 10:52pm UTC](https://forums.unrealengine.com/t/problem-with-lava-material-causing-flickering/37168/3 "2015-07-31T22:52:35Z")

</div>

> [@](#):
>
> 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?

---

<div class="post-metadata">

**Author:** ![Chesire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chesire](https://forums.unrealengine.com/u/Chesire)\
**Post date:** [July 31, 2015, 11:07pm UTC](https://forums.unrealengine.com/t/problem-with-lava-material-causing-flickering/37168/4 "2015-07-31T23:07:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KVogler](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KVogler](https://forums.unrealengine.com/u/KVogler)\
**Post date:** [August 1, 2015, 1:24pm UTC](https://forums.unrealengine.com/t/problem-with-lava-material-causing-flickering/37168/5 "2015-08-01T13:24:44Z")

</div>

Thanks for the reply 🙂

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??

---

<div class="post-metadata">

**Author:** ![Chesire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chesire](https://forums.unrealengine.com/u/Chesire)\
**Post date:** [August 1, 2015, 4:27pm UTC](https://forums.unrealengine.com/t/problem-with-lava-material-causing-flickering/37168/6 "2015-08-01T16:27:32Z")

</div>

Hmm pity that didn’t work ☹ 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…

---

<div class="post-metadata">

**Author:** ![KVogler](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KVogler](https://forums.unrealengine.com/u/KVogler)\
**Post date:** [August 1, 2015, 4:40pm UTC](https://forums.unrealengine.com/t/problem-with-lava-material-causing-flickering/37168/7 "2015-08-01T16:40:04Z")

</div>

> [@](#):
>
> Did you try PN Triangles with adaptive tesselation ON and Crack Free Displacement OFF?

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

---

<div class="post-metadata">

**Author:** ![Chesire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chesire](https://forums.unrealengine.com/u/Chesire)\
**Post date:** [August 1, 2015, 5:01pm UTC](https://forums.unrealengine.com/t/problem-with-lava-material-causing-flickering/37168/8 "2015-08-01T17:01:04Z")

</div>

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.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...
