# UE4 crashes adding Scene Capture 2D / Render Target to Scene with Niagara Emitters(Rural Australia)

**URL:** <https://forums.unrealengine.com/t/ue4-crashes-adding-scene-capture-2d-render-target-to-scene-with-niagara-emitters-rural-australia/484173>\
**Category:** Rendering\
**Tags:** scenecapture2d, ue4-crash, unreal-engine, Clouds, render-target, question\
**Created:** [June 1, 2021, 2:10am UTC](https://forums.unrealengine.com/t/ue4-crashes-adding-scene-capture-2d-render-target-to-scene-with-niagara-emitters-rural-australia/484173 "2021-06-01T02:10:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![OzMomotaro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OzMomotaro](https://forums.unrealengine.com/u/OzMomotaro)\
**Post date:** [June 1, 2021, 1:58am UTC](https://forums.unrealengine.com/t/ue4-crashes-adding-scene-capture-2d-render-target-to-scene-with-niagara-emitters-rural-australia/484173/1 "2021-06-01T01:58:44Z")

</div>

Not that this is a solution - but at least a workaround is that I simply hid the niagara actors from the Scene Capture 2D actor, and it worked fine (no crashing at all).

---

<div class="post-metadata">

**Author:** ![OzMomotaro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OzMomotaro](https://forums.unrealengine.com/u/OzMomotaro)\
**Post date:** [June 1, 2021, 2:10am UTC](https://forums.unrealengine.com/t/ue4-crashes-adding-scene-capture-2d-render-target-to-scene-with-niagara-emitters-rural-australia/484173/2 "2021-06-01T02:10:49Z")

</div>

**Problem Description:**  
I wanted to include a Scene Capture 2D actor into a scene from the Rural Australia (Example 01 Map) that was recently free on UE Marketplace. I created a simple test project where I added the Rural Australia environment collection to a simple third person template (totally vanilla). Everything is perfect until I drop a SceneCapture2D then create a render target in any of the maps - at this point when I try to play in editor it crashes. However, if I disable the niagara elements (in this case birds and falling leaves) it runs no problems. Likewise, if I have volumetric clouds (something I want) in the scene, then I have the same crash with the render target.

**Question:**  
Based on the scenario described - has anyone had similar problems with either niagara emitters or volumetric clouds - where connecting a render target to a SceneCapture2D causes a fatal crash when playing in editor? If so - can anyone suggest possible debugging routes, as I’m at a loss.

**Additional Info:**  
One thing I noticed was that it DID matter in what sequence I enabled either the niagara emitters or volumetric clouds - if they were added/enabled after the SceneCapture2d/RenderTarget were introduced, then this had markedly different behaviour. Does this suggest a memory allocation issue?

**Crash Report:**  
I keep getting the following crash reference to Batch Element Num Primitives == 0 as part of the MeshPassProcessor (line 860), but I suspect the problem is GPU resource management (so it could be specific to the 2070Super driver?).

```
Assertion failed: BatchElement.IndirectArgsBuffer [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Renderer/Private/MeshPassProcessor.cpp] [Line: 860] It is only valid to set BatchElement.NumPrimitives == 0 when a IndirectArgsBuffer is used
UE4Editor_Core!AssertFailedImplV() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:104]
UE4Editor_Core!FDebug::CheckVerifyFailedImpl() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:461]
UE4Editor_Renderer!FMeshDrawCommand::SetDrawParametersAndFinalize() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Renderer\Private\MeshPassProcessor.cpp:860]
UE4Editor_Renderer!FDynamicPassMeshDrawListContext::FinalizeCommand() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Renderer\Public\MeshPassProcessor.h:1235]
UE4Editor_Renderer!FMeshPassProcessor::BuildMeshDrawCommands<TMeshProcessorShaders<TDepthOnlyVS<0>,FDepthOnlyHS,FDepthOnlyDS,FDepthOnlyPS<0>,FMeshMaterialShader,FMeshMaterialShader,FMeshMaterialShader>,FDepthOnlyShaderElementData>() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Renderer\Public\MeshPassProcessor.inl:154]
UE4Editor_Renderer!FDepthPassMeshProcessor::AddMeshBatch() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Renderer\Private\DepthRendering.cpp:953]
UE4Editor_Renderer!GenerateDynamicMeshDrawCommands() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Renderer\Private\MeshDrawCommands.cpp:552]
UE4Editor_Renderer!FMeshDrawCommandPassSetupTask::AnyThreadTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Renderer\Private\MeshDrawCommands.cpp:834]
UE4Editor_Renderer!TGraphTask<FMeshDrawCommandPassSetupTask>::ExecuteTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:886]
UE4Editor_Core!FTaskThreadAnyThread::ProcessTasks() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:1065]
UE4Editor_Core!FTaskThreadAnyThread::ProcessTasksUntilQuit() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:888]
UE4Editor_Core!FTaskThreadAnyThread::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:965]
UE4Editor_Core!FRunnableThreadWin::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]

```

**System Description**  
My dev system is the following:

- Windows 10 Build: 19042
- Unreal ver: 4.26.1
- CPU: AMD Ryzen 7 3700X (8 Cores)
- GPU: GIGABYTE RTX2070 Super 8GB (operating at 2560x1440x144Hz) [driver: 460.89]
- RAM: 32 GB
- DirectX ver: 12
- UE4 experience level: NOVICE(most important system component)

---

<div class="post-metadata">

**Author:** ![OzMomotaro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OzMomotaro](https://forums.unrealengine.com/u/OzMomotaro)\
**Post date:** [June 6, 2021, 11:51pm UTC](https://forums.unrealengine.com/t/ue4-crashes-adding-scene-capture-2d-render-target-to-scene-with-niagara-emitters-rural-australia/484173/3 "2021-06-06T23:51:27Z")

</div>

Just bumping this.

---

<div class="post-metadata">

**Author:** ![RChao](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RChao](https://forums.unrealengine.com/u/RChao)\
**Post date:** [October 9, 2021, 9:44am UTC](https://forums.unrealengine.com/t/ue4-crashes-adding-scene-capture-2d-render-target-to-scene-with-niagara-emitters-rural-australia/484173/4 "2021-10-09T09:44:58Z")

</div>

You can try turning off camera distance culling in Niagara rendering settings

---

<div class="post-metadata">

**Author:** ![OzMomotaro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OzMomotaro](https://forums.unrealengine.com/u/OzMomotaro)\
**Post date:** [November 9, 2021, 5:40am UTC](https://forums.unrealengine.com/t/ue4-crashes-adding-scene-capture-2d-render-target-to-scene-with-niagara-emitters-rural-australia/484173/5 "2021-11-09T05:40:20Z")

</div>

Thanks for that RChao\_ … will have a look to see if that helps.
