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"

How to avoid initial Particle spawn Hitch?

We've noticed the first time particle systems are dynamically spawned in the world there is a performance hitch. eg Impact effects, muzzles flashes, explosions, etc. How to preload them or avoid this in another way? The textures referenced by their material do appear to be referenced. The assets themselves are just a UParticleSystem* UPROPERTY.

Product Version: UE 4.7
Tags:
more ▼

asked Jul 01 '15 at 01:14 AM in C++ Programming

avatar image

dzeligman
708 32 28 53

avatar image sloppyjava Dec 10 '15 at 05:25 AM

I would also like an answer to this extremely annoying problem.

avatar image zaksi Nov 02 '18 at 02:46 PM

I also want to know if there is any easy solution to this problem

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Often, first spawn hitches are caused by the engine having to load content. This doc talks about how to load your game's assets asynchronously

https://docs.unrealengine.com/latest/INT/Programming/Assets/AsyncLoading/index.html

more ▼

answered Dec 10 '15 at 09:07 PM

avatar image

joeGraf STAFF
1.5k 35 12 67

(comments are locked)
10|2000 characters needed characters left

According to my profiling, the initial particle hitches are not caused by having to load content, but by having to re-link the OpenGL shaders after changing parameters and/or using them in a new combination. (LinkProgram in OpenGLShaders.cpp)

To alleviate that, FOpenGLProgramBinaryCache was introduced in UE4.13, which can be enabled with r.UseProgramBinaryCache=1

In addition to the linking, you might also see hitches due to shader compilation. To circumvent that, you need to cache your shaders: https://docs.unrealengine.com/latest/INT/API/Runtime/ShaderCore/FShaderCacheState/index.html

Also, you can minimize the problem by using fewer unique shaders. For example, if you want to have the same effect in multiple colors, then instead of copy&pasting the particle system, you can use Instance Parameters. That way, all color variations use the same shader, but with different color values. As a result, you only need to link once for all colors, as opposed to compiling linking each color variation separately.

EDIT: After trying to fix this for myself for a while, I'd say that this is still (4.17.2) quite broken. The shader cache would be the correct solution (apart from the annoying procedure to generate it), but it currently crashes on ES2 and is thus useless. The bug https://issues.unrealengine.com/issue/UE-47553 will hopefully be fixed in 4.18. Until then, we're stuck with so-so workarounds.

more ▼

answered Oct 15 '17 at 03:04 AM

avatar image

fxtentacle
86 3 8

(comments are locked)
10|2000 characters needed characters left
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