Godot: High GPU usage after creating particles

Created on 5 Jan 2018  Â·  15Comments  Â·  Source: godotengine/godot

Godot version:
Godot 3.0 Beta2
GPU - GTX 980 TI

OS/device including version:
Windows 10 falls creator

Issue description:
After creating a Particles node, GPU usage bumps to around 45%, on Particles2D is even worse, GPU usage goes to around 50%

Steps to reproduce:
Create a empty scene and add the Particles or Particles2D node.

enhancement rendering

Most helpful comment

I think it works as expected here — visible particles will cause the editor to redraw up to 60 times per second (up to 100 times per second with V-Sync disabled).

That said, particle simulation could be paused while the editor window is minimized or unfocused. This could lead to decreased CPU and GPU usage when the editor is idle, which is especially helpful on laptops.

All 15 comments

Looks like the particles node is causing 100% editor viewport updates, similar to the setting Spinner -> update always. This is probably expected when it emits particles, but in godot 2.x it at least leaves the process if there are no particles to draw: https://github.com/godotengine/godot/blob/0d6485d919e0d4685bcbcf8ec117ea698538f785/scene/2d/particles_2d.cpp#L456

The update is now managed somewhere in the gles3 rasterizer, I couldn't find where.
You can hide the node in the scene, then the editor will not be permanently updated.
(Tested in the current tip version of godot3).

I opened #14869. I am experiencing high resource usage in ram, cpu, and gpu. I think there are other issues open for high resource usage and low frame rate. If you read the last post by Juan he states that "it seems to be completely driver bound, so this may actually be a problem onGLES3 having significantly more driver overhead" . Your issue could be unrelated to my problem though.

@Dillybob1992 , apparently the result varies(i don't know the circumstances), now i'm getting 32% for Particles2D and 20% for Particles, i know that Particles are processed by the GPU now, but as you said 20% and 32% don't seem correct to me.

The CPU usage should be simliar to toggling update always, and is the
result of the screen redrawing in every frame. The bug here is that, if
particles are not visible, they should not cause a screen redraw.

On Fri, Jan 5, 2018 at 9:33 AM, Bruno Ortiz notifications@github.com
wrote:

@Dillybob1992 https://github.com/dillybob1992 , apparently the result
varies(i don't know the circumstances), now i'm getting 32% for Particles2D
and 20% for Particles, i know that Particles are processed by the GPU now,
but as you said 20% and 32% don't seem correct to me.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/15355#issuecomment-355544592,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z2xwC5x58jqRkoG48ufTE-u06SNrcks5tHhaOgaJpZM4RT5PI
.

Apologies, I just checked and it's working as intended. For both 2D and 3D particles, when not on screen it does not redraw. Closing this, as it's a non issue.

@reduz when it's not visible it does not redraw, but even when the particle is not emitting or does not have any material attached to it, it keeps redrawing, maybe its a issue?

@bruno-ortiz is right. If you disable emitting or enable on_shot, it keeps redrawing the editor even if there is nothing to draw.

This is not a bug, though. Emitting does not mean the particle system is
disabled, just that new particles will not be emitted. Emitting can be off
and particles still stay alive for a while.

On Jan 5, 2018 7:29 PM, "Rémi Verschelde" notifications@github.com wrote:

Reopened #15355 https://github.com/godotengine/godot/issues/15355.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/15355#event-1412088889, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AF-Z25rmJ_PFgkjwO9rPhIVSGXcnS4b3ks5tHqIrgaJpZM4RT5PI
.

The editor is always redrawn, even if all the particles are already dead ;)

Yeah, but this is not a bug. Will mark as enhancement and kick to 3.1

On my Laptop
i3-2330m (2/4) Intel HD 3000 with Linux Mint Mate 19 and GLES 3 (in GLES 2 particles don't work)
CPU usage is 4-12% but if I create Particles2D(default properties) CPU usage jump to 50%, when I set emitting to false, cpu back to normal.

This shouldn't work that, because by default only 8 particles are emitting with 1s lifetime

I believe particles very existence affects how often screen is redrawn, there were issues about it, and I'm not sure if the fixes were merged.

Here is a gif which show CPU(left values) and GPU(right values) with enabled and disabled newly created particles2D node.

ezgif-1-f9634d72be

"Menedżer okien pulpitu" is in english "Windows Desktop Manager"
I worked on machine with Intel 4770s and Intel HD 4600

I think it works as expected here — visible particles will cause the editor to redraw up to 60 times per second (up to 100 times per second with V-Sync disabled).

That said, particle simulation could be paused while the editor window is minimized or unfocused. This could lead to decreased CPU and GPU usage when the editor is idle, which is especially helpful on laptops.

This seems fixed in the master branch. Particles use a lot of CPU when they're enabled, as expected and described. But when disabling emitting, they don't use any extra CPU.

Was this page helpful?
0 / 5 - 0 ratings