Maniphest T83803

Large amount of hair particles gives slow playback while emitter is hidden
Closed, Archived

Assigned To
None
Authored By
Benoit Alexis (alexisb38)
Dec 15 2020, 4:35 PM
Tags
  • BF Blender
  • Animation & Rigging
  • Dependency Graph
Subscribers
Benoit Alexis (alexisb38)
Germano Cavalcante (mano-wii)
Richard Antalik (ISS)

Description

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.77

Blender Version
Broken: version: 2.91.0, branch: master, commit date: 2020-11-25 08:34, hash: rB0f45cab862b8
Worked: (newest version of Blender that worked as expected)

Short description of error
Working on a large scene, with different particle systems, scattering objects across a plane as hair emitters.
I use an animated texture to drive the length of the hair.
When I play the animation with the emitter visible, as well as all the particles, I get a slow playback (as expected, for a great amount of particles).
But when I hide the emitter ("Hide in Viewport" toggle in the outliner), the playback is not perfect.
However, if I put the emitter in a different collection, and disable this collection altogether, then the playback is perfect.
I would expect the "Hide in viewport" toggle to have the same effect as [Move to a new collection, disable the collection toggle].

Exact steps for others to reproduce the error
Here is a test scene, setup to have a visible effect on a powerful machine (i9, 2080ti) :

Starting from an empty scene:
create a plane, add 3 particles systems, set to hair
spawn 3 different meshes.
Depending on your computer set the particles number to high value.
Add 3 noise textures, one for each particle system, use them as "hair length" influence, and animate them.
Then hit playback and check out the fps.
On my machine, with 2500 particles per system, and interpolated children set to 50 in viewport I get 3fps
If I hide the plane emitter, I get between 15 and 20 fps
if I put the plane emitter in a different collection, and disable the collection, I get full 25fps.

This is a lot more visible in my working scene (lots of trees, animated via png sequences... ) It's nearly impossible to navigate the timeline (1fps), even with the particle emitter mesh hidden in viewport, (3fps).
It took me a while to realize the workaround of moving the emitter to a different collection and disable it. Then I am back at 25fps.

I just realized, if I "Hide in Viewport" all my particle systems, from within the particles systems tab, I get a 20fps playback.
However it's impracticle to disable the systems one by one with a laggy UI.
I am just wondering about why there would be so much difference in playback speed with actions that all have the same effect (hide the plane with particles).

Thanks in advance !

Event Timeline

Benoit Alexis (alexisb38) created this task.Dec 15 2020, 4:35 PM
Germano Cavalcante (mano-wii) added projects: Animation & Rigging, Dependency Graph.Dec 17 2020, 12:36 AM
Germano Cavalcante (mano-wii) added a subscriber: Germano Cavalcante (mano-wii).

What happens is that, apparently, the particle modifiers are being recalculated even though the objects are hidden.
This could be related to T76257 but I haven't found any drivers or evident dependencies that can cause this.
And if you disable the collection instead of hide the object the fps will return to normal.

The steps are a little complex to follow I will look carefully later to confirm if it is a different bug.

Richard Antalik (ISS) closed this task as Archived.Dec 22 2020, 4:16 PM
Richard Antalik (ISS) added a subscriber: Richard Antalik (ISS).

Your children are also interpolated, so you have ~375000 particles in total. You get slow performance on step 4 already.

Hidden objects are still evaluated. You need to either exclude collection form view layer, or disable object in viewports via monitor icon in outliner. Current behavior is expected.