# Lightmap Density Viewmode crash

**URL:** <https://forums.unrealengine.com/t/lightmap-density-viewmode-crash/475738>\
**Category:** Rendering\
**Tags:** Lightmass, lightmass-crash, unreal-engine, question\
**Created:** [December 12, 2020, 7:50pm UTC](https://forums.unrealengine.com/t/lightmap-density-viewmode-crash/475738 "2020-12-12T19:50:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![22TurnipsInHeat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@22TurnipsInHeat](https://forums.unrealengine.com/u/22TurnipsInHeat)\
**Post date:** [December 12, 2020, 7:50pm UTC](https://forums.unrealengine.com/t/lightmap-density-viewmode-crash/475738/1 "2020-12-12T19:50:12Z")

</div>

I have a landscape that was imported from a height map. the landscape material has;

Base colour

Secular

Roughness

Ambient occlusion

World displacement (tesselation)

the landscape has a couple of mannequin static meshes, but other than that its barren. light build ran fine.

When i try to change my view mode to “Lightmap Density” it freezes for a sec and then crashes with an error. the “Light Complexity” view mode seems to work fine though.

The error is :

> Fatal error:  
> [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/RHI/Private/PipelineStateCache.cpp]
> 
> [Line: 139] Shader compilation
> 
> failures are Fatal.
> 
> 0x00007ffabfdb3b29
> 
> KERNELBASE.dll!UnknownFunction
> 
> 0x00007ffa8b5ac386
> 
> UE4Editor-Core.dll!UnknownFunction
> 
> 0x00007ffa8b5afae8
> 
> UE4Editor-Core.dll!UnknownFunction
> 
> 0x00007ffa8b2bdd5d
> 
> UE4Editor-Core.dll!UnknownFunction
> 
> 0x00007ffa8a37056c
> 
> UE4Editor-RHI.dll!UnknownFunction
> 
> 0x00007ffa8a388d83
> 
> UE4Editor-RHI.dll!UnknownFunction
> 
> 0x00007ffa8b06df29
> 
> UE4Editor-Core.dll!UnknownFunction
> 
> 0x00007ffa8b06f190
> 
> UE4Editor-Core.dll!UnknownFunction
> 
> 0x00007ffa8b0764c5
> 
> UE4Editor-Core.dll!UnknownFunction
> 
> 0x00007ffa8b5c7cdb
> 
> UE4Editor-Core.dll!UnknownFunction
> 
> 0x00007ffa8b5c0970
> 
> UE4Editor-Core.dll!UnknownFunction
> 
> 0x00007ffac0c77c24
> 
> KERNEL32.DLL!UnknownFunction
> 
> 0x00007ffac22ecea1
> 
> ntdll.dll!UnknownFunction
> 
> Crash in runnable thread
> 
> TaskGraphThreadHP 4

---

<div class="post-metadata">

**Author:** ![BooleanOnce](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BooleanOnce](https://forums.unrealengine.com/u/BooleanOnce)\
**Post date:** [March 11, 2021, 11:50pm UTC](https://forums.unrealengine.com/t/lightmap-density-viewmode-crash/475738/2 "2021-03-11T23:50:44Z")

</div>

Hello, did you find a fix for this issue?

I have a similar issue. I have a scene with one static mesh in it. If I apply a certain material to my mesh, and lightmap preview is on, Unreal crashes. Unreal will not crash if the static mesh is hidden, and Unreal will not crash in other preview modes, like the default Lit view mode.

I am not sure which part of my material is causing the issue. Here are some of the things the material has:

- StaticSwitch expressions **(EDIT: Does not cause a crash)**
- It uses material attributes; to combine two “MakeMaterialAttributes” nodes
- Absolute World Position node
- Camera Position node
- VertexNormalWS **(EDIT: Does not cause a crash)**
- Tessellation **(EDIT: Does not cause a crash)**

I may be do debugging later to find which of these exactly causes the crash.

---

<div class="post-metadata">

**Author:** ![BooleanOnce](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BooleanOnce](https://forums.unrealengine.com/u/BooleanOnce)\
**Post date:** [March 12, 2021, 8:36pm UTC](https://forums.unrealengine.com/t/lightmap-density-viewmode-crash/475738/3 "2021-03-12T20:36:18Z")

</div>

I found what’s causing the crash on my end. The “WorldAlignedTexture” material function. I’d have to break it down further to find what exactly is causing the issue, but that’s the root of the problem.

---

<div class="post-metadata">

**Author:** ![22TurnipsInHeat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@22TurnipsInHeat](https://forums.unrealengine.com/u/22TurnipsInHeat)\
**Post date:** [March 13, 2021, 1:05am UTC](https://forums.unrealengine.com/t/lightmap-density-viewmode-crash/475738/4 "2021-03-13T01:05:44Z")

</div>

i was not able to solve this, for me turning tessellation off for the landscape material fixed it. i do have WorldAlignedTexture function in my landscape material, and last i checked it seems to work fine IF tessellation is off while still using WorldAlignedTexture

---

<div class="post-metadata">

**Author:** ![A\_Vie\_Guy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A\_Vie\_Guy](https://forums.unrealengine.com/u/A_Vie_Guy)\
**Post date:** [May 12, 2021, 6:33pm UTC](https://forums.unrealengine.com/t/lightmap-density-viewmode-crash/475738/5 "2021-05-12T18:33:48Z")

</div>

I have this problem as well and found some ways to test for it. First, hide everything in your scene with the visibility icon in the world outliner tab. Then switch to lightmap density viewmode. If it crashes here you might have something wrong with your ue4 install. But for me, as I turned on the visibility to each object in the scene, it would always crash on the same object. Upon closer inspection it was the material that was crashing the viewmode. The material had flat tesselation (Crack free) turned on. Once I turned it off, I would turn on the visibility of the object in lightmap density viewmode and it would work fine. Note that it may not be tesselation causing the problem in your material (it was for my case). But it most likely is the materials fault for the crash. To test that just apply a default material and turn on the visibility of the object to test for the crash. If it doesn’t crash with the default material it is definitely the materials fault for the crash.

---

<div class="post-metadata">

**Author:** ![J0hn-C0nn0r](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@J0hn-C0nn0r](https://forums.unrealengine.com/u/J0hn-C0nn0r)\
**Post date:** [June 14, 2021, 11:40pm UTC](https://forums.unrealengine.com/t/lightmap-density-viewmode-crash/475738/6 "2021-06-14T23:40:14Z")

</div>

Thanks man, that fixed my problem as well. Exact same issue. Any idea what causes it?
