Blender freezes when using Texture paint or Weight Paint #75452

Open
opened 2020-04-06 19:56:50 +02:00 by Kunal Das · 18 comments

System Information
Operating system: Windows 10 Insider build19592
Graphics card: GTX 1660Ti Max Q 6GB
Processor: i7-9750H
RAM: 32GB DDR4-2666Mhz

Blender Version
Broken: version: 2.83 (sub 11), branch: arcpatch-D7019, commit date: 2020-04-07 09:45, hash: b2b0241aca
Worked: Never (2.79, 2.8+)

Short description of error
Blender freezes or stops responding when using Texture Paint or Weight Paint. Tried game ready and Studio drivers, still the same issue.
Moreover, RAM consumption spikes up to more than 20GB. This happens when the brush size is increased and starts painting.

Assigned GPU in Preferences>System>CUDA, but the GPU is been barely used.

Exact steps for others to reproduce the error
Blender.rar

**System Information** Operating system: Windows 10 Insider build19592 Graphics card: GTX 1660Ti Max Q 6GB Processor: i7-9750H RAM: 32GB DDR4-2666Mhz **Blender Version** Broken: version: 2.83 (sub 11), branch: arcpatch-[D7019](https://archive.blender.org/developer/D7019), commit date: 2020-04-07 09:45, hash: `b2b0241aca` Worked: Never (2.79, 2.8+) **Short description of error** Blender freezes or stops responding when using Texture Paint or Weight Paint. Tried game ready and Studio drivers, still the same issue. Moreover, RAM consumption spikes up to more than 20GB. This happens when the brush size is increased and starts painting. Assigned GPU in Preferences>System>CUDA, but the GPU is been barely used. **Exact steps for others to reproduce the error** [Blender.rar](https://archive.blender.org/developer/F8453112/Blender.rar)
Author

Added subscriber: @Gigakb

Added subscriber: @Gigakb

Added subscriber: @DirSurya

Added subscriber: @DirSurya
Robert Guetzkow was assigned by Kunal Das 2020-04-07 04:55:43 +02:00
Member

Added subscriber: @ankitm

Added subscriber: @ankitm
Member

#75284 (Huge memory usage when trying to paint on UVs far ouside the 0-1 range)

#75284 (Huge memory usage when trying to paint on UVs far ouside the 0-1 range)
Member

Closed as duplicate of #75284

Closed as duplicate of #75284
Robert Guetzkow was unassigned by Ankit Meel 2020-04-07 11:29:10 +02:00
Member

Added subscriber: @rjg

Added subscriber: @rjg
Member

was it discussed with Robert already ?

was it discussed with Robert already ?

@ankitm No it wasn't.

@Gigakb Please don't assign the task yourself. This will be done by the development coordinators, module owners and developers.

@ankitm No it wasn't. @Gigakb Please don't assign the task yourself. This will be done by the development coordinators, module owners and developers.

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

Changed status from 'Duplicate' to: 'Needs Triage'
Author

@rjg sorry my bad! I thought the poster needs to assign things.

I apologize...

@rjg sorry my bad! I thought the poster needs to assign things. I apologize...

Added subscriber: @iss

Added subscriber: @iss

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

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

Can confirm this.

Also this doesn't look like the same problem as #75284 by havin quick look at code paths and performance profiler.

Can confirm this. Also this doesn't look like the same problem as #75284 by havin quick look at code paths and performance profiler.
Author

any update?

any update?
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member

Weight and projection painting isn't optimized for dense meshes. Marking this as a known issue.

Weight and projection painting isn't optimized for dense meshes. Marking this as a known issue.

Added subscriber: @maniacalipsis

Added subscriber: @maniacalipsis

A little more info around this problem:
Finally I had bought 8GB more RAM (16GB total now) and started to paint on 16Kx8K texture. It was successfully loaded and after this the memory usage was ok. But only the first time, until I started to paint. And the more I painted, the blender allocated more and more gigabytes until It ate'em all. I thought that it's a problem of "Undo" and setted "Undo memory limit" to 2GB, but nothing had change. Also, tracking a memory usage while painting, I noticed that a new portion of memory is allocated after each swap of the brush colors.
Then I made a test:

  • Make and unwrap any model, e.g. cube, and assign a material with an image texture. (4K and 8K was tested)
  • Switch to Texture paint mode and paint over it, quickly swapping brush colors.

Results are following:
Screenshot_20200710_205039.jpg
(new 8K texture)

Screenshot_20200710_205154.jpg
(I started to paint, swapping colors after each stroke)

Screenshot_20200710_205306.jpg
(And nothing freed after some wait, but continued go on)

Screenshot_20200710_210626.jpg
(Finally, I started to paint some time without color swapping, and - O-miracle - a lot of memory had freed in a short time. But when I started to swap again - all comes back)

Screenshot_20200710_205351.jpg
(Settings)

By the way: when I tried the same with 4K texture, the memory consumption looks similar by the principle but not so impressive by variation of amount.
Screenshot_20200710_204936.jpg

p.s. Painting freezes while allocating each portion of memory (that is obviously).

Hope this may help to improve performanse of this tool/module/code at all.

p.p.s.: Don;t know how to painting undo is realized, but I think that it may be so:

  • locate a rectangular region where are the pixels will be affected by pending painting operation
  • copy this region and its coords into the undo stack (only array of pixel colors not all the X,Y,Z,U and W)

apply current painting op. (actually change pixels)

And to make the undo - just copy last stored rect back to the image.
Thus expenses will be proportional to size of the area, modified by single operation. I know, this will be expensive for the huge and wide strokes, but finally it's rateably and predictable.
(Also m.b. some improvement is possible, for example, divide large rect on several smaller ones and reject that ones, which wasn't actually affected. E.g. if a large thin circle was painted).

A little more info around this problem: Finally I had bought 8GB more RAM (16GB total now) and started to paint on 16Kx8K texture. It was successfully loaded and after this the memory usage was ok. But only the first time, until I started to paint. And the more I painted, the blender allocated more and more gigabytes until It ate'em all. I thought that it's a problem of "Undo" and setted "Undo memory limit" to 2GB, but nothing had change. Also, tracking a memory usage while painting, I noticed that a new portion of memory is allocated after each swap of the brush colors. Then I made a test: - Make and unwrap any model, e.g. cube, and assign a material with an image texture. (4K and 8K was tested) - Switch to Texture paint mode and paint over it, quickly swapping brush colors. Results are following: ![Screenshot_20200710_205039.jpg](https://archive.blender.org/developer/F8684428/Screenshot_20200710_205039.jpg) (new 8K texture) ![Screenshot_20200710_205154.jpg](https://archive.blender.org/developer/F8684431/Screenshot_20200710_205154.jpg) (I started to paint, swapping colors after each stroke) ![Screenshot_20200710_205306.jpg](https://archive.blender.org/developer/F8684437/Screenshot_20200710_205306.jpg) (And nothing freed after some wait, but continued go on) ![Screenshot_20200710_210626.jpg](https://archive.blender.org/developer/F8684446/Screenshot_20200710_210626.jpg) (Finally, I started to paint some time without color swapping, and - O-miracle - a lot of memory had freed in a short time. But when I started to swap again - all comes back) ![Screenshot_20200710_205351.jpg](https://archive.blender.org/developer/F8684466/Screenshot_20200710_205351.jpg) (Settings) By the way: when I tried the same with 4K texture, the memory consumption looks similar by the principle but not so impressive by variation of amount. ![Screenshot_20200710_204936.jpg](https://archive.blender.org/developer/F8684490/Screenshot_20200710_204936.jpg) p.s. Painting freezes while allocating each portion of memory (that is obviously). Hope this may help to improve performanse of this tool/module/code at all. p.p.s.: Don;t know how to painting undo is realized, but I think that it may be so: - locate a rectangular region where are the pixels will be affected by pending painting operation - copy this region and its coords into the undo stack (only array of pixel colors not all the X,Y,Z,U and W) # apply current painting op. (actually change pixels) And to make the undo - just copy last stored rect back to the image. Thus expenses will be proportional to size of the area, modified by single operation. I know, this will be expensive for the huge and wide strokes, but finally it's rateably and predictable. (Also m.b. some improvement is possible, for example, divide large rect on several smaller ones and reject that ones, which wasn't actually affected. E.g. if a large thin circle was painted).
Philipp Oeser removed the
Interest
Sculpt, Paint & Texture
label 2023-02-10 09:12:35 +01:00
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
7 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#75452
No description provided.