Bullet viewport integration allocates too much memory on Windows for several shape types #35799
Labels
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#35799
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
%%%I noticed some strange behavior regarding Bullet integration in viewport, occurring only on Windows systems but with all builds including the official releases.
It's related to the shape type of the collision object and its memory consumption. Every shape type other than triangle mesh will result in a significantly higher memory footprint during simulation than usual on other platforms. Always 5 to 8 times more depending on shape type. Only in game engine everything is OK.
I did following comparisons, for each I started a fresh Blender instance and checked the process table of the task manager:
Test scene: 4096 cubes (16^3 array) = 24.576 quads
Bullet in game engine
Bullet in viewport
Apparently this doesn't seem to happen on Linux only Windows. Test scenes are attached.
%%%
Changed status to: 'Open'
%%%Scorpion81 provided a blend file that works even on Windows (memory usage below 0.5 GB for Convex Hull). I wasn't able to recreate this even after factory reset but I attached his blend here. He also reports that the faulty file attached even doesn't work on Linux right. Maybe this is a good starting point for investigation.%%%
%%%Blend was too large for tracker, I splitted it now.%%%
%%%hello,
i just opened these three files and took a look to the Windows 'TaskManager' on my windows PC, (opened one by one in a new blender instance)
... here the screenshots of TaskManager... the values of memory usage are very similar.
http://www.pasteall.org/pic/54703
... here my system details
http://www.pasteall.org/43698/text%%%
%%%Well, did you start the simulation? (Alt+A)%%%
%%%hit [Alt]+- [x], should i ?!, ... sorry, for my lack of knowledge.
wow, what a difference ...
... here all three files during animation:
http://www.pasteall.org/pic/54715
the first two are very similar (blender render / blender game), maybe it is because of my internal intel HD4000 GPU on i7-3770 CPU.
i made the screenshot after few frames were updated 2-3 for the first two .blend files (0.00x fps).
the third was way faster and with less memory usage (1.x .. 3.x fps).
%%%
%%%the memory usage for the first file jumps down from 8.x GB down to 2.x GB after frame ~20 (when the cube cluster hits the palne) and stays at this amount during re-playback the calculated animation.
oh, and the blender game file i started, i think that is what you wanted ... the memory usage is ~1.x GB
http://www.pasteall.org/pic/54718
PS.: the memory usage is not depending on the GPU, because i tested is on my clone system with an external AMD HD 5670 GPU... with very similar results.%%%
%%%i tested it on the same hardware with different OS (looks all exact the same on my system)
linux (ubuntu 13.04 64bit)
http://www.pasteall.org/43703/text
http://www.pasteall.org/pic/54723
Windows 8 64bit
http://www.pasteall.org/pic/54724
... but maybe i still make something wrong. :(%%%
%%%Scorpion81 reported that my file don't work on Linux either, so maybe there went already something wrong when I set it up (in Windows). He set up his own file on Linux which worked with around 1 GB (that's the attached "working" file) but I couldn't recreate it in Windows without recreating the problem that it takes up about 8 GB as well.
I don't think it's a hardware or driver problem whatsoever. There must be something different in that .blend file compared to the working one. The question is, what is it and where does the difference come from?
%%%
%%%Ok, I've looked into this for a bit now.
The problem is object scaling. If you apply scale of the cubes in the attached file memory use is back to normal.
Since the problem doesn't exist in the game engine I assume that it's a bug in bullet's scaling feature, that the game engine doesn't use. That also explains why it doesn't happen with mesh shapes.
I'll see what I can do about it.%%%
Added subscriber: @JulianEisel
Any news about this @sreich?
@JulianEisel, actually I wanted to look into this again soon, maybe in the next few weeks when I can find some time.
Unfortunately it's not so simple to track down.
Sure, just wanted to blow some fresh air into this ;)
Added subscriber: @Sergey
@sreich, did you find time to look into? otherwise i'll move it to physics memory optimization TODO.
Changed status from 'Open' to: 'Archived'
Moved to todo: http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Tools#Physics