Using subdiv modifier affects normal baking performace of all objects in scene #60428

Open
opened 2019-01-11 21:47:05 +01:00 by Jonathan Lampel · 14 comments

System Information
Operating system: Windows 10
Graphics card: GTX 1080Ti

Blender Version
Broken: version: 2.83 (sub 10), branch: master, commit date: 2020-03-19 11:11, hash: cc516b82ef
Worked: Never (2.8+)

Exact steps for others to reproduce the error
#60428.blend

  • Open file
  • Press bake, watch memory usage

Remove subsurf modifier on door_frame_low.001 object and repeat step 2

Baking is much quicker and doesn't require too much RAM

**System Information** Operating system: Windows 10 Graphics card: GTX 1080Ti **Blender Version** Broken: version: 2.83 (sub 10), branch: master, commit date: 2020-03-19 11:11, hash: `cc516b82ef` Worked: Never (2.8+) **Exact steps for others to reproduce the error** [#60428.blend](https://archive.blender.org/developer/F8416619/T60428.blend) - Open file - Press bake, watch memory usage # Remove subsurf modifier on `door_frame_low.001` object and repeat step 2 Baking is much quicker and doesn't require too much RAM

Added subscriber: @JonathanLampel-4

Added subscriber: @JonathanLampel-4
Jonathan Lampel changed title from Baking normals many times freezes computer to Baking memory usage massively increases over time 2019-01-14 17:48:06 +01:00

Added subscriber: @ZedDB

Added subscriber: @ZedDB
Dalai Felinto was assigned by Sebastian Parborg 2019-01-28 10:56:10 +01:00

There is something weird going in in there for certain. If I delete the door_high and door_low collections the baking is fine.

However, as those objects shouldn't affect the baking this is a bit odd.

There is something weird going in in there for certain. If I delete the door_high and door_low collections the baking is fine. However, as those objects shouldn't affect the baking this is a bit odd.

Added subscriber: @LeighAlexH

Added subscriber: @LeighAlexH

I'm currently following Jonathan's door tutorial and experiencing the exact same issue in 2.80.45. 42.25GB memory usage and about half an hour for a very simple bake.

I'm currently following Jonathan's door tutorial and experiencing the exact same issue in 2.80.45. 42.25GB memory usage and about half an hour for a very simple bake.
Dalai Felinto removed their assignment 2019-12-23 16:35:24 +01:00

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'

I can't reproduce this issue with the example file. When I click 'bake' I get this error:

Uninitialized image "cube normal" from object "cube_low"

Adding a new image and selecting that in the 'cube normal' node fixes that, though. I've updated the blend file in the task description for this.

I can also confirm the long duration (waited minutes, is still at 0%) and the memory usage. I cancelled after Blender allocating 32 GB.

Disabling the two hidden collections indeed works around this.

@JonathanLampel-4 can you do more digging? If you can, please remove objects one by one to see which one is influencing this behaviour.

I can't reproduce this issue with the example file. When I click 'bake' I get this error: > Uninitialized image "cube normal" from object "cube_low" Adding a new image and selecting that in the 'cube normal' node fixes that, though. I've updated the blend file in the task description for this. I can also confirm the long duration (waited minutes, is still at 0%) and the memory usage. I cancelled after Blender allocating 32 GB. Disabling the two hidden collections indeed works around this. @JonathanLampel-4 can you do more digging? If you can, please remove objects one by one to see which one is influencing this behaviour.

Sure thing! Thanks for updating the file for 2.81. Here's what I've found in an afternoon of investigating.

There is no one object that causes the slowdown - each object seems to contribute a little bit, but some disproportionately more than others.

Turning on Simplify and setting Max Subdiv to 0 for Render helps substantially. However, it can't be just the subdiv modifier since some objects with no subdiv modifier still cause a smaller but noticeable spike in memory.

Turning on Simplify and setting Max Subdiv to 0 speeds things up even for the problematic objects that don't have a Subdiv modifier, which is very strange.

The relationship between number of problematic objects and the size of the memory spike is not linear. I would have assumed that including ten problematic objects would result in a much bigger spike than including only one problematic object, but that doesn't seem to be the case.

Here's an updated file that has all the objects organized by how much they contribute to the memory spike. It may be useful to know that all of these objects have been part of several bakes before in this file's history. Totally new objects, even very dense ones, don't seem to influence the bake whatsoever.

baking-bug_02.blend

I really appreciate you looking into this one! This type of major slowdown has happened to me on every project in the past year and a half in which I need to bake normals for a lot of objects, and it doesn't show up until well into production. If there's any other digging you would find useful, just let me know.

Sure thing! Thanks for updating the file for 2.81. Here's what I've found in an afternoon of investigating. There is no one object that causes the slowdown - each object seems to contribute a little bit, but some disproportionately more than others. Turning on Simplify and setting Max Subdiv to 0 for Render helps substantially. However, it can't be just the subdiv modifier since some objects with no subdiv modifier still cause a smaller but noticeable spike in memory. Turning on Simplify and setting Max Subdiv to 0 speeds things up even for the problematic objects that don't have a Subdiv modifier, which is very strange. The relationship between number of problematic objects and the size of the memory spike is not linear. I would have assumed that including ten problematic objects would result in a much bigger spike than including only one problematic object, but that doesn't seem to be the case. Here's an updated file that has all the objects organized by how much they contribute to the memory spike. It may be useful to know that all of these objects have been part of several bakes before in this file's history. Totally new objects, even very dense ones, don't seem to influence the bake whatsoever. [baking-bug_02.blend](https://archive.blender.org/developer/F8333978/baking-bug_02.blend) I really appreciate you looking into this one! This type of major slowdown has happened to me on every project in the past year and a half in which I need to bake normals for a lot of objects, and it doesn't show up until well into production. If there's any other digging you would find useful, just let me know.
Member

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'
Member

Added subscriber: @ankitm

Added subscriber: @ankitm
Member

If the memory trace (Instruments.app) helps. This is for the ~800MB jump in allocations.
Screenshot 2020-03-18 at 23.12.05.png
This is for ~500MB jump at a later point.
Screenshot 2020-03-18 at 23.11.41.png

If the memory trace (Instruments.app) helps. This is for the ~800MB jump in allocations. ![Screenshot 2020-03-18 at 23.12.05.png](https://archive.blender.org/developer/F8414280/Screenshot_2020-03-18_at_23.12.05.png) This is for ~500MB jump at a later point. ![Screenshot 2020-03-18 at 23.11.41.png](https://archive.blender.org/developer/F8414279/Screenshot_2020-03-18_at_23.11.41.png)
Richard Antalik changed title from Baking memory usage massively increases over time to Using subdiv modifier affects normal baking performace of all objects in scene 2020-03-19 22:08:09 +01:00

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'
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
8 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#60428
No description provided.