Very slow performance when copying rigid body physics #76356

Closed
opened 2020-05-03 01:52:37 +02:00 by Arken · 23 comments

System Information
Operating system: Win 10 Pro
Graphics card: GTX 1660 Ti

Blender Version
2.83 beta

Short description of error
Hey guys,
I'm writing this as I'm still waiting for the "Copy from Active" command to be finished. It's been over 30 min now.
When lookin at the task manager I see CPU usage of only 15-27% on my Ryzen 2700X CPU. I have about 23K pills that I want to apply physics to. See attached blender file.
Is there a way this could be improved in the future and optimized so that 100% of the CPU could be used?
Thank you.
blender-2.83-beta-rigid-body-copy-from-active.jpg

Exact steps for others to reproduce the error

  • Open attached file
  • Add Rigid Body to active object
  • Object > Rigid Body > Copy from Active

Pills.blend

**System Information** Operating system: Win 10 Pro Graphics card: GTX 1660 Ti **Blender Version** 2.83 beta **Short description of error** Hey guys, I'm writing this as I'm still waiting for the "Copy from Active" command to be finished. It's been over 30 min now. When lookin at the task manager I see CPU usage of only 15-27% on my Ryzen 2700X CPU. I have about 23K pills that I want to apply physics to. See attached blender file. Is there a way this could be improved in the future and optimized so that 100% of the CPU could be used? Thank you. ![blender-2.83-beta-rigid-body-copy-from-active.jpg](https://archive.blender.org/developer/F8508332/blender-2.83-beta-rigid-body-copy-from-active.jpg) **Exact steps for others to reproduce the error** - Open attached file - Add Rigid Body to active object - Object > Rigid Body > Copy from Active [Pills.blend](https://archive.blender.org/developer/F8508324/Pills.blend)
Author

Added subscriber: @Arken

Added subscriber: @Arken
Member

Added subscriber: @ankitm

Added subscriber: @ankitm
Author

update: I left my PC on all night, 8 hours, and it still didn't finish.
I had to force quit.

update: I left my PC on all night, 8 hours, and it still didn't finish. I had to force quit.
Member

Does it work with a smaller number of objects in a reasonable time? or does it just hang above a threshold ?

Does it work with a smaller number of objects in a reasonable time? or does it just hang above a threshold ?
Author

It takes about 5 minutes to do 400 objects.

It takes about 5 minutes to do 400 objects.

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Simply copying properties shouldn't take that long.
This indeed seems to be a bug.

Simply copying properties shouldn't take that long. This indeed seems to be a bug.

Added subscriber: @DanielJones-3

Added subscriber: @DanielJones-3

I have a scene with only about 7K objects and it is so slow. This is definitely a bad performance issue for doing rigid body physics. Is there a workaround for this? It takes too long to be usable right now. I am using the latest alpha build.

I have a scene with only about 7K objects and it is so slow. This is definitely a bad performance issue for doing rigid body physics. Is there a workaround for this? It takes too long to be usable right now. I am using the latest alpha build.

Added subscriber: @Fernando-Alcala

Added subscriber: @Fernando-Alcala

2.83
I too have encountered this problem.
Some testing I did:
1 rigid to 50 objs = 0m:16s
1 rigid to 100 objs = 0m:33s
1 rigid to 150 objs = 0m:49s
1 rigid to 200 objs = 1m:07s
1 rigid to 250 objs = 1m:23s
1 rigid to 500 objs = 2m:58s
1 rigid to 1000 objs = 5m:52s
1 rigid to 2000 objs = 12m:02s
1 rigid to 5000 objs = 36m:52s

It's clear that linearity is lost somewhere between 2000-5000 rigid bodies, possibly before (2000 rigid bodies should have been 11:44). Still doesn't excuse how long it takes.

5000 1kg rigid bodies to 1.1kg = 2s
5000 sphere rigid bodies to boxes = 2s

The problem is creating the new rigid bodies, as changing settings to existing rigid bodies is insignificant.

2.83 I too have encountered this problem. Some testing I did: 1 rigid to 50 objs = 0m:16s 1 rigid to 100 objs = 0m:33s 1 rigid to 150 objs = 0m:49s 1 rigid to 200 objs = 1m:07s 1 rigid to 250 objs = 1m:23s 1 rigid to 500 objs = 2m:58s 1 rigid to 1000 objs = 5m:52s 1 rigid to 2000 objs = 12m:02s 1 rigid to 5000 objs = 36m:52s It's clear that [linearity is lost ](https://docs.google.com/spreadsheets/d/1jZ9vwh2n3RsNZxwqbBMyTyCC5Tt0ZvaSDKK4iawxgT0/edit?usp=sharing) somewhere between 2000-5000 rigid bodies, possibly before (2000 rigid bodies should have been 11:44). Still doesn't excuse how long it takes. 5000 1kg rigid bodies to 1.1kg = 2s 5000 sphere rigid bodies to boxes = 2s The problem is creating the new rigid bodies, as changing settings to existing rigid bodies is insignificant.

Added subscriber: @jlawheed

Added subscriber: @jlawheed

V 2.83.5. Mac OS 10.15.6/3.2 GHz 16 core Intel Xeon W/128GB memory/AMD Radeon Pro 16GB

Same issue here. I wound up adding the rigid body before duplicating and that turned out okay (about 20k objects). Trouble is, I had wanted to bake it, then delete all of the key frames (so that all of my objects start in the position they ended at) to then interact with something else- and since they're all already created, my only option is to copy from active - which even if I let go overnight, doesn't do it and I have to force quit.

V 2.83.5. Mac OS 10.15.6/3.2 GHz 16 core Intel Xeon W/128GB memory/AMD Radeon Pro 16GB Same issue here. I wound up adding the rigid body before duplicating and that turned out okay (about 20k objects). Trouble is, I had wanted to bake it, then delete all of the key frames (so that all of my objects start in the position they ended at) to then interact with something else- and since they're all already created, my only option is to copy from active - which even if I let go overnight, doesn't do it and I have to force quit.

Added subscriber: @Rickyx

Added subscriber: @Rickyx

V. 2.91.0 Linux 4.19.0-13-amd64, i7-8750H CPU, 16Gb ram

I confirm this issue.
One core at 100% for:
some minutes to copy to 2k objects.
~10 seconds to copy to 120 objects.

Thank you,
Riccardo

V. 2.91.0 Linux 4.19.0-13-amd64, i7-8750H CPU, 16Gb ram I confirm this issue. One core at 100% for: some *minutes* to copy to 2k objects. ~10 seconds to copy to 120 objects. Thank you, Riccardo

26b2a35dd4 has fixed this.

26b2a35dd44c has fixed this.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Philipp Oeser self-assigned this 2021-07-30 07:42:17 +02:00
Member

In #76356#1199299, @Fernando-Alcala wrote:
26b2a35dd4 has fixed this.

Indeed

> In #76356#1199299, @Fernando-Alcala wrote: > 26b2a35dd44c has fixed this. Indeed

Added subscriber: @deanem

Added subscriber: @deanem

Rigid body physics for large number of objects is basically unusable. I am trying to run a rigid body sim on 10K little balls, and I have been waiting all morning. At first I tried 20K, but forget it! Now I have about 10K and I'm trying to copy rigid body to them all and it's been a half hour so far.
I used to use Lightwave 3D, and I could have one object of 10K spheres, and tell it to make each loose geometry in the object its own rigid body object, and animate it right away. It could handle thousands and thousands like nothing.
I'm just trying to make one stack of balls flow through a tube and into a bowl, and it has been hours just trying to get the little balls set up in the first place.
Since I can't have a particle system with self collision, I just don't know what to do.
What do I do if I want to destroy a building with a bunch of pieces? Or two buildings?
How do people accomplish these simple things with Blender, when I can't even make a stack of 10K balls have physics?
There is a lot of room for optimization here.

Rigid body physics for large number of objects is basically unusable. I am trying to run a rigid body sim on 10K little balls, and I have been waiting all morning. At first I tried 20K, but forget it! Now I have about 10K and I'm trying to copy rigid body to them all and it's been a half hour so far. I used to use Lightwave 3D, and I could have one object of 10K spheres, and tell it to make each loose geometry in the object its own rigid body object, and animate it right away. It could handle thousands and thousands like nothing. I'm just trying to make one stack of balls flow through a tube and into a bowl, and it has been hours just trying to get the little balls set up in the first place. Since I can't have a particle system with self collision, I just don't know what to do. What do I do if I want to destroy a building with a bunch of pieces? Or two buildings? How do people accomplish these simple things with Blender, when I can't even make a stack of 10K balls have physics? There is a lot of room for optimization here.
Member

Please try a fresh 3.0 build from builder.blender.org, the copying should be much faster there

Please try a fresh 3.0 build from builder.blender.org, the copying should be much faster there
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
9 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#76356
No description provided.