# Weird Mesh Rendering With multiple Niagara Mesh Renderer

**URL:** <https://forums.unrealengine.com/t/weird-mesh-rendering-with-multiple-niagara-mesh-renderer/485577>\
**Category:** Rendering\
**Tags:** vertex, mesh-particles, unreal-engine, glitch, question\
**Created:** [June 30, 2021, 5:23pm UTC](https://forums.unrealengine.com/t/weird-mesh-rendering-with-multiple-niagara-mesh-renderer/485577 "2021-06-30T17:23:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1eddb38e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1eddb38e](https://forums.unrealengine.com/u/anonymous_user_1eddb38e)\
**Post date:** [June 30, 2021, 5:23pm UTC](https://forums.unrealengine.com/t/weird-mesh-rendering-with-multiple-niagara-mesh-renderer/485577/1 "2021-06-30T17:23:02Z")

</div>

Has anybody experienced a glitch similar to this :

![345262-glitch.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/4/1/a41338f1ff65c25836fb0d633ef36e4d40c17959.png)

Here i have a GPU emitter setup as a fountain with multiple mesh renderer and when i spawn a few of them at the same place, some particle spawn with their mesh all messed up.

I did some debugging with RenderDoc and it seems the vertices on some instances of the mesh particles are incorrect in the output of the vertex shader for some reason.

* * *

**To Reproduce**

I couldn’t find a way to reproduce the bug in a consistent manner but here is the simplest setup i had where it did occur:

**1.** Set a Project in DirectX12

**2.** Create a new default map

**3.** Setup a Niagara system with the fountain emitter template. Change for a GPU Emitter and add multiple mesh renderer, each with different RendererVisibility. Set each particle to a random VisibilityTag.

**4.** Spawn many system at location (0,0,0) either by blueprint in PIE or by copy paste in editor  
With enough system overlapping the bug should appear.

* * *

**Additional info**

Although this setup is sufficient to trigger the bug, I found that adding these to the scene make it way more likely to occur

- Set CastShadow on the niagara systems  
spawned in the world and have one or  
more movable light casting shadow
- Add one or more SceneCapture  
component (with a render target and  
set to tick every frame)

If you do that, the engine might crash unless you set the Niagara.GPUDrawIndirectArgsBufferSlack to something higher than the default value of 2.

- Setting Niagara.GPUDrawIndirectArgsBufferSlack=16  
seems enough

* * *

**System:**

- UE4.26 and 4.27
- Windows 10
- Intel Core i9-10900
- Tested on RTX3080, RTX2070 and QUADRO  
RTX8000

---

<div class="post-metadata">

**Author:** ![cesenandre](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cesenandre](https://forums.unrealengine.com/u/cesenandre)\
**Post date:** [October 1, 2021, 6:45am UTC](https://forums.unrealengine.com/t/weird-mesh-rendering-with-multiple-niagara-mesh-renderer/485577/2 "2021-10-01T06:45:45Z")

</div>

Hi man,  
think I’ve had a very similar issue with cpu simulated niagara mesh renderers, showing up only with multiple instances alltogether & some big-scaled ones…  
solved setting sort mode to “none” from previous “view distance”.

maybe this or something regarding z-depth could solve?

more info on my case:  
UE 4.27,  
Forward/deferred rendering,  
Instanced stereo on/off, separate translucency on/off, DX11/12,  
VR game, shows more often using Liv with SteamVR
