Two billboards in same level causes sprite glitches

Build Type: Binary build of UE4 from launcher.
Build version: Tested on 4.21.2 and 4.22 preview 1, both experience the exact same issue.

Detailed description of the issue:
Existing project contains multiple actors, each with a single billboard attached to it. The billboards have different sprites set, and the billboards are set to be visible in-game, as well as in-editor.

In-editor, the billboards all render perfectly fine from all angles and directions.

While playing in-editor, the problem occurs.

While playing in a shipping executable, the problem occurs.

This issue still occurs on my buddy’s system, and he was able to repo following my same steps.

In our test project, the sprites glitch out consistently, which SEEMS like it’s based on distance from camera, or from each other.
In an example project, it glitches from the start, and seems stable (the sprites don’t jump around.)
In a new project based on the FPS template, the sprites jump around every time a projectile is fired or destroyed.

Repro Steps:

  1. Start a new project (if desired), or open existing

  2. Create a new blueprint of type “Actor”

  3. Enter the actor blueprint and add a billboard component to it, giving it a sprite, and setting “Is hidden in-game” to FALSE.

  4. Drop the actor into the level

  5. Do steps 2-4 again, making sure it is visible in the level at the same time as the first actor.

Note: I’ve actually tested a bit more, and the problem ALSO happens if you have a single actor with 2 billboards attached. All that seems to matter is that you have two billboards.

Note2: This also happens with TGA non-transparent images, as I was using transparent PNG’s before. The sprites still glitch around.

The problem gets worse the more actors you add (but it only helps to visualize the issue with more unique sprites, because a sprite overlapping a similar sprite is not noticeable.)

A video showing the problem in UE4: Dropbox - File Deleted

I misspoke a bit when I said it was a completely fresh project… I took the first person template, disabled the shooting sound, and removed all the other objects inside the level, to make sure nothing else interfered. The problem still happens with an entirely empty project, minus the actors with billboards.

My dxdiag: Dropbox - File Deleted

buddy’s dxdiag: Dropbox - File Deleted

Special thanks to my buddy Ex0dus13 who helped me research this issue for hours.

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks

Same problem as MasterEvilAce, with same cause and same consequences. We are using differents bilboards, but every bilboards which are linked to an actor are switching radomly (as on Master’s video)

Any way to track this bug ? Or to know if MasterEvilAce had any answer about that ?

Thank you MasterEvilAce for a precise and thorough report!

BouBou, we believe this issue to be fixed in 4.22

This fix (Unreal Engine Issues and Bug Tracker (UE-66287)) worked for me. Luckily its only one file (BatchedElements.cpp) and a well contained commit. Note that if you want to implement it into 4.21 you need to edit the DrawPrimitive call. DrawPrimitive expects PT_TriangleList as the first of four parameters if you try to re-do this on line 1180 make sure you change:

RHICmdList.DrawPrimitive(BaseVertex, PrimCount, 1);

to 

RHICmdList.DrawPrimitive(PT_TriangleList, BaseVertex, PrimCount, 1);

Good luck!