x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Kill GPU particles from blueprint

I have a collectible item, which has a particle system attached to it. When collected, the item flies towards the player, and the particle system acts as a trail. For performance and a better look, I'm using GPU particles for this, but there is a problem. If I walk offscreen before the particles have fully disappeared, the particle system is culled. When I walk back in later, the particles that were left over from the trail are still there, and continue where they left off. This looks extremely odd, since the collectible item has respawned by that point. The way I would normally fix this is by emptying the particle system when it respawns, deleting all instanced particles. Is there a way I can do this, or prevent those particles from reappearing (short of killing them on disable, which would instantly delete the trail)?

Product Version: Not Selected
Tags:
more ▼

asked Sep 09 '14 at 01:39 PM in Rendering

avatar image

Hoeloe
388 41 46 59

avatar image Hoeloe Sep 09 '14 at 01:43 PM

Hmm... it seems "Kill on deactivate" doesn't even work anyway...

avatar image Lovecraft_K ♦♦ STAFF Sep 09 '14 at 01:48 PM

Hey Hoeloe -

What is the lifetime setting on your trail effect and you have it sourced to your actor collectible item or just a child of the item in a blueprint?

Thank You

Eric Ketchum

avatar image Hoeloe Sep 09 '14 at 01:52 PM

It's currently just a child in the blueprint which I'm activating and deactivating in the blueprint. The particle lifetime is a constant 1 second. I'm using a workaround at the moment which destroys the particle system and creates a new one when the item respawns.

avatar image Lovecraft_K ♦♦ STAFF Sep 09 '14 at 02:45 PM

Hey Hoeloe -

I am making the assumption that the particle system is only used as a trail here, but I would remove the emitter from the Components of the Blueprint and then spawn the emitter on the item's movement, parenting the movement of the two items and destroy emitter on a few seconds (miliseconds) delay on the items destruction which should let the trails lifespan to dissipate.

Thank You

Eric Ketchum

avatar image Hoeloe Sep 09 '14 at 03:02 PM

Essentially, that's now what I'm doing, except I'm destroying the one in the blueprint and copying the data to instantiate a new one.

avatar image Lovecraft_K ♦♦ STAFF Sep 11 '14 at 10:03 PM

Hey Hoeloe -

I am attempting to build a test of this issue, but I wanted to confirm how you are moving the collectible object in blueprints? Are you using a move component to or a VInterp Set Relative Location? As much information as you can would be helpful so we can solve this issue for you.

Thank You

Eric Ketchum

avatar image Hoeloe Sep 12 '14 at 12:30 AM

The objects are being moved using a vector lerp node fed into Set Absolute Location.

avatar image Lovecraft_K ♦♦ STAFF Sep 12 '14 at 07:25 PM

Hey Hoeloe -

After some testing, the best way to achieve what you are looking for is to deactivate the emitter in the Blueprint. The key to making it look nature and more like a fade out is to set up the Alpha fade of the particle to be set via a particle parameter which is controlled through a finterp in blueprints then deavtivate the particle. This will elimate the stray GPU particles and not look like a cut.

Thank You

Eric Ketchum

avatar image Hoeloe Sep 12 '14 at 10:52 PM

Thanks, but this isn't the problem I was having. In fact, this is what I'm actually doing already. The problem is that GPU particles don't receive a tick event if the emitter (that is, its bounding box) is offscreen. The issue with this is that when particles are present when the bounding box leaves the screen, they are no longer updated, and remain in their current state until the bounding box re-enters the screen. This means that particles that should have faded a long time ago have been essentially frozen in their previous state for all the time that they have been offscreen, making it appear as though they have reappeared.

avatar image Lovecraft_K ♦♦ STAFF Sep 15 '14 at 06:19 PM

Hi Hoeloe -

I am having a difficult time reproducing the exact scenario you are describing above, do you have a test map that you would not mind sharing for us to test that is experiencing this issue?

Thank You

Eric Ketchum

avatar image Hoeloe Sep 15 '14 at 09:54 PM

https://dl.dropboxusercontent.com/u/30847069/GPU_Particle_Error_Demo.zip

Here is a link to a MWE. You can click to disable the emitter, and right click to enable it. If you do this while the particles are on screen, any particles left over from when the emitter was previously enabled are immediately destroyed, however, if you disable the emitter, and re-enable it while the particle system is off screen, then the leftover particles are still present (and have not updated since the particle system stopped rendering) when the system is in view again.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey Hoeloe -

I am happy to report that your issue has been fixed in an internal build of the engine. The fix should be in a forthcoming release of the engine.

Thank you for you help and patience while we tracked this issue down.

Eric Ketchum

more ▼

answered Sep 22 '14 at 08:00 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.7k 702 260 735

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question