[4.5.1 Rendering Bug] All GPU Particles in scene are periodically instantly cleared when lots are present, how to stop this full purge?

Dear Friends at Epic,

I have a game that spawns a lot of GPU particles constantly as a main gameplay element.

I am spawning bursts of upwards of 10,000 particles per explosion.

During gameplay, when these bursts are going off, the entire GPU particle buffer appears to be getting periodically instantly cleared.

The result is that all gpu particles in the scene instantly disappear, including new ones that had just spawned.

This is very jarring and makes the GPU particle hard for me to rely on for conveying important visual data to the player.

#Github Engine

I have github engine 4.5, so I can make changes myself if you can point me in the right direction!

Where would this periodic entire purge of all gpu particles be occurring?

I really need to stop this from happening.

#Bug

I call this a bug because to me it is so visually jarring, especially when just-spawned gpu particles instantly disappear.

I am trying to use those GPU particles to represent important gameplay information to the player, and this information is periodically instantly lost.

This periodic instant GPU purge also and breaks game immersion.

#Thanks!

Rama

Hello Rama,

Before we create a bug report, I would like to get some clarification and perhaps a screenshot of your “Cascade” set up. Firstly, are these explosions happening within short succession or all at once? Estimated, how many particle effects are in your level as well? And what is the lifespan of these particle effects? All of these are a factor as to why you are seeing your issue.

A 10,000 GPU particle explosion is quite large in itself, and having multiple iterations of these spawning within short succession throughout your level will definitely see a performance hit. If you are attempting to spawn this particle effect multiple times throughout the level either at one time or within a short time period of one another, you are hitting the “ceiling” of your GPU’s ability to render these effects.This “ceiling” is set pretty high by default in order for multiple GPU effects to occur at once.

I would suggest reducing the amount of GPU particles of your particle effect within cascade to optimize the effect. You will still be able to have a very strong explosion effect without having them disappear almost immediately after being spawned. As for where the purge is occurring, that is hardware dependent because it is based off of your GPU.

Thank you,

#Issue Resolved

Thanks for taking the time Andrew!

Actually I resolved the issue!

It was just regular 'ole Garbage Collection

I put my spawned particles into a UPROPERTY() array and now they are never getting randomly instantly cleared!

The reason I thought all GPU particles were getting instantly cleared is cause none of them were protected from GC

#Code For Others

For anyone curious about my solution here’s what I did!

//in my Game State class
UPROPERTY() //<~~~~~~~~~~~~~~~
TArray<UParticleSystemComponent*> RuntimeParticles;
	
void ClearRuntimeParticles();
	
	
UParticleSystemComponent* CreateRuntimeParticle(
	UParticleSystem* PS, 
	const FVector& Location,
	const FRotator& Rotator= FRotator::ZeroRotator,
	bool AutoDestroy=true
);

CreateRuntimeParticle spawns the particle and adds it to the UPROPERTY() array so it is protected from GC :slight_smile:

#:heart:

Rama