Regression: hi-poly mesh with collision in empty scene causes low fps. #84340

Closed
opened 2021-01-03 08:21:36 +01:00 by Vyacheslav Kobozev · 8 comments

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71

Blender Version
Broken: version: 2.83.9, branch: boneMaster_283, commit date: 2020-11-17 11:33, hash: 6bd7c877fb
Broken till 2.92 today
Worked 2.79b

Short description of error
If I use collision after subdiv (modifier or real) blender hits performance.
Compare with 2.79b:
2021-01-03_10-11-35.mp4

2021-01-03_10-14-32.mp4

**System Information** Operating system: Windows-7-6.1.7601-SP1 64 Bits Graphics card: GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71 **Blender Version** Broken: version: 2.83.9, branch: boneMaster_283, commit date: 2020-11-17 11:33, hash: `6bd7c877fb` Broken till 2.92 today Worked 2.79b **Short description of error** If I use collision after subdiv (modifier or real) blender hits performance. Compare with 2.79b: [2021-01-03_10-11-35.mp4](https://archive.blender.org/developer/F9548512/2021-01-03_10-11-35.mp4) [2021-01-03_10-14-32.mp4](https://archive.blender.org/developer/F9548511/2021-01-03_10-14-32.mp4)

Added subscriber: @Vyach

Added subscriber: @Vyach

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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

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

I can confirm.
If I'm not mistaken, a new system for the dependency graph was implemented in 2.80.
Perhaps the collision modifier now has a dependency on the object's position and therefore the entire stack of modifiers is recalculated when it is moved.

But since at 2.79 this was not necessary, it does appear to be a regression.

I can confirm. If I'm not mistaken, a new system for the dependency graph was implemented in 2.80. Perhaps the collision modifier now has a dependency on the object's position and therefore the entire stack of modifiers is recalculated when it is moved. But since at 2.79 this was not necessary, it does appear to be a regression.
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'
Member

The Transform -> Collision Modifier dependency was added in c384b5ddbd. This seems correct, because the modifier is accessing ob->obmat. The collision modifier builds a bvh tree in world space. This is not ideal in this example file, but that is how the code is designed to work currently.

The performance can be improved slightly by moving the collision modifier before the subdivision modifier. This way the original mesh is used as collision shape. However, the subdivision modifier is stuff evaluated every time the position changes, so you still get quite a performance hit from that.

For the time being, the most practical solution might be to have two separate objects. One collision object that you parent to the subdivided object. The collision object can be hidden for rendering. This way, the collision modifier is evaluated on low res geometry when the object is moved. Since the subdivision modifier does not depend on the object transforms, it is not reevaluated every time you move the object.

I don't consider this to be a bug, because the commit that causes the performance regression fixes a bug. Thanks for the report anyway!

The `Transform -> Collision Modifier` dependency was added in c384b5ddbd. This seems correct, because the modifier is accessing `ob->obmat`. The collision modifier builds a bvh tree in world space. This is not ideal in this example file, but that is how the code is designed to work currently. The performance can be improved slightly by moving the collision modifier before the subdivision modifier. This way the original mesh is used as collision shape. However, the subdivision modifier is stuff evaluated every time the position changes, so you still get quite a performance hit from that. For the time being, the most practical solution might be to have two separate objects. One collision object that you parent to the subdivided object. The collision object can be hidden for rendering. This way, the collision modifier is evaluated on low res geometry when the object is moved. Since the subdivision modifier does not depend on the object transforms, it is not reevaluated every time you move the object. I don't consider this to be a bug, because the commit that causes the performance regression fixes a bug. Thanks for the report anyway!

@JacquesLucke
Okay, I see, so it is the same global issue with unwanted recalculations.

Thanks for tip/workaround.

@JacquesLucke Okay, I see, so it is the same global issue with unwanted recalculations. Thanks for tip/workaround.
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
3 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#84340
No description provided.