texture paint viewport performance drop #35057

Closed
opened 2013-04-23 11:31:13 +02:00 by Daniel Grauer · 31 comments
Member

%%%--- Operating System, Graphics card ---
OS: windows 7 64bit
GPU: nvidia quadro 2000

- Blender version with error, and version that worked ---

error: official 2.66a, r56234

- Short description of error ---

while painting the viewport performance drops to about 5-10 fps which makes drawing nearly impossible

- Steps for others to reproduce the error (preferably based on attached .blend file) ---
  1. open the blend file
  2. make sure you have either a external software to monitor viewport fps like fraps or run animation with playback fps enabled
  3. enter texture paint mode
  4. start painting and notice how the fps drops (especially with smaller brushes)

see the comparison in the attached picture, the fps drops from 80fps to about 5fps.
this issue was also reproduced with the test scene on a linux system.

%%%

%%%--- Operating System, Graphics card --- OS: windows 7 64bit GPU: nvidia quadro 2000 - Blender version with error, and version that worked --- error: official 2.66a, r56234 - Short description of error --- while painting the viewport performance drops to about 5-10 fps which makes drawing nearly impossible - Steps for others to reproduce the error (preferably based on attached .blend file) --- 1. open the blend file 2. make sure you have either a external software to monitor viewport fps like fraps or run animation with playback fps enabled 3. enter texture paint mode 4. start painting and notice how the fps drops (especially with smaller brushes) see the comparison in the attached picture, the fps drops from 80fps to about 5fps. this issue was also reproduced with the test scene on a linux system. %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'

%%%Aforementioned linux system is a:
Intel i3 2100
NVIDIA GTS 450 (304.88 driver)
Ubuntu 12.10 amd64

2.66a, 2.66.6 r56160%%%

%%%Aforementioned linux system is a: Intel i3 2100 NVIDIA GTS 450 (304.88 driver) Ubuntu 12.10 amd64 2.66a, 2.66.6 r56160%%%

%%%I can't seem to be able to reproduce on my system.%%%

%%%I can't seem to be able to reproduce on my system.%%%

%%%I was able to reproduce on linux. There is a catch here: older blender versions do space stroking based on radius while newer blender versions do it based on diameter (this happened due to unification of stroke system). that means that we generate double the number of strokes for older versions.

So, if this file was saved with a recent version, to see the real difference between 2.66a and 2.67 you need to double the spacing in 2.66a. An older file opened in 2.67 will have its spacing halved automatically for that reason to match the old behaviour. I expect that there will be some difference due to all the extra stuff that we added but not this much of course. Can you try it with double spacing on older versions? I will also add a warning in our release notes on that.%%%

%%%I was able to reproduce on linux. There is a catch here: older blender versions do space stroking based on radius while newer blender versions do it based on diameter (this happened due to unification of stroke system). that means that we generate double the number of strokes for older versions. So, if this file was saved with a recent version, to see the real difference between 2.66a and 2.67 you need to double the spacing in 2.66a. An older file opened in 2.67 will have its spacing halved automatically for that reason to match the old behaviour. I expect that there will be some difference due to all the extra stuff that we added but not this much of course. Can you try it with double spacing on older versions? I will also add a warning in our release notes on that.%%%

%%%Any updates here? Since the issue is also reported to be in 2.66a I guess it's not because of the spacing alone. Maybe some GPU specific issue with slow updating of the textures.

Stanislav, are you saying you also see the problem on that system, or did you reply to the wrong report? I'm a bit confused by the use of "aforementioned" here, maybe you mentioned it on IRC or some other channel?

In any case, I can't redo the issue, I can paint quite comfortably at 60 fps in this file with a NVidia 650M on Mac and Linux.%%%

%%%Any updates here? Since the issue is also reported to be in 2.66a I guess it's not because of the spacing alone. Maybe some GPU specific issue with slow updating of the textures. Stanislav, are you saying you also see the problem on that system, or did you reply to the wrong report? I'm a bit confused by the use of "aforementioned" here, maybe you mentioned it on IRC or some other channel? In any case, I can't redo the issue, I can paint quite comfortably at 60 fps in this file with a NVidia 650M on Mac and Linux.%%%
Author
Member

%%%he said in IRC that he had the same slowdown with ubuntu. i also tested some older versions today (also back to 2.49b) and it seems this is a really old issue that persisted through all of the updates:/ would be great if this issue could be fixed.%%%

%%%he said in IRC that he had the same slowdown with ubuntu. i also tested some older versions today (also back to 2.49b) and it seems this is a really old issue that persisted through all of the updates:/ would be great if this issue could be fixed.%%%

%%%Sorry for the delay. Yes, the "aforementioned" was about the linux system Dan mentioned in his initial report. And yes, doubling the spacing does not seem to resolve the issue on my machine. Fast broad strokes really slowing down, the smaller the brush - the worse. This is already on r56462.%%%

%%%Sorry for the delay. Yes, the "aforementioned" was about the linux system Dan mentioned in his initial report. And yes, doubling the spacing does not seem to resolve the issue on my machine. Fast broad strokes really slowing down, the smaller the brush - the worse. This is already on r56462.%%%

%%%I've upgraded my Ubuntu to 13.04 and NVIDIA driver to 310.44, the slowdown is still present. When I start a stroke I am able to make several quick swipes, then painting slows down to a crawl until I either wait without releasing the pen (I'll be able to continue the stroke once Blender catches up), or just release the pen, wait for Blender to calculate previous stroke and then start anew.%%%

%%%I've upgraded my Ubuntu to 13.04 and NVIDIA driver to 310.44, the slowdown is still present. When I start a stroke I am able to make several quick swipes, then painting slows down to a crawl until I either wait without releasing the pen (I'll be able to continue the stroke once Blender catches up), or just release the pen, wait for Blender to calculate previous stroke and then start anew.%%%

%%%Maybe related, i'm on window XP 32 bits, using a G41 Intel "card"

Blender Texture paint mode has always been usable, not very fast tough.
At some point i started to paint bump maps, and there i noticed it was a lot slower, i reported the problem there :
http://projects.blender.org/tracker/index.php?func=detail&aid=33198&group_id=9&atid=498

Then after reading about people reporting the regular texture paint mode being slow, despite for me it's not that slow (while not that fast) i experimented and ran into something i really didn't expected.

In File -> User Preferences -> System, i usually use the Window Draw Method set to "Overlap", i found it to be the optimal setting for the interface when modelling (in the past i had some flickering in popups with other settings)

So i decided to give a try to Triple Buffer , that i usually avoid as i have read some people crashing with it.

I then noticed no difference in the texture paint mode, it's not slow but it's not fast.

Then i enabled the "Region Overlap" setting (that i never use as i don't use Triple Buffer as i mentionned), then went back to paint and .... wow.
Saying that it's fast and smooth is a very small understatement, in fact the texture paint mode is so fast and smooth now that it looks like if my system suddenly upgraded into some nasa quantum computer and sometime replaced my G41 by some Titan without telling me.

I tested a few time to see if i was not hallucinating and indeed i can repeat it everytime, if on my system i use -any- window draw type setting, Blender texture paint mode is usable, not fast but not slow.
But if while i use "Triple Buffer" - and - enable "Region Overlap", it's fantastically smooth and fast, something the kind of smooth and fast i -never- experienced before in Blender, and i use Blender since 2.4

I went back to the bump painting i mentionned in my bug report and same thing , with triple buffer + region overlap, it's lightning fast and smooth to use.

So whatever code is in Region Overlap, it gives on my system a gigantic boost to speed in Texture Paint mode, a more than noticable speed difference in comparison to every other window draw mode i ever used in Blender.
%%%

%%%Maybe related, i'm on window XP 32 bits, using a G41 Intel "card" Blender Texture paint mode has always been usable, not very fast tough. At some point i started to paint bump maps, and there i noticed it was a lot slower, i reported the problem there : http://projects.blender.org/tracker/index.php?func=detail&aid=33198&group_id=9&atid=498 Then after reading about people reporting the regular texture paint mode being slow, despite for me it's not that slow (while not that fast) i experimented and ran into something i really didn't expected. In File -> User Preferences -> System, i usually use the Window Draw Method set to "Overlap", i found it to be the optimal setting for the interface when modelling (in the past i had some flickering in popups with other settings) So i decided to give a try to Triple Buffer , that i usually avoid as i have read some people crashing with it. I then noticed no difference in the texture paint mode, it's not slow but it's not fast. Then i enabled the "Region Overlap" setting (that i never use as i don't use Triple Buffer as i mentionned), then went back to paint and .... wow. Saying that it's fast and smooth is a very small understatement, in fact the texture paint mode is so fast and smooth now that it looks like if my system suddenly upgraded into some nasa quantum computer and sometime replaced my G41 by some Titan without telling me. I tested a few time to see if i was not hallucinating and indeed i can repeat it everytime, if on my system i use -any- window draw type setting, Blender texture paint mode is usable, not fast but not slow. But if while i use "Triple Buffer" - and - enable "Region Overlap", it's fantastically smooth and fast, something the kind of smooth and fast i -never- experienced before in Blender, and i use Blender since 2.4 I went back to the bump painting i mentionned in my bug report and same thing , with triple buffer + region overlap, it's lightning fast and smooth to use. So whatever code is in Region Overlap, it gives on my system a gigantic boost to speed in Texture Paint mode, a more than noticable speed difference in comparison to every other window draw mode i ever used in Blender. %%%
Author
Member

%%%i tested the "Region Overlap" option and i dont notice a difference, but what makes a huge difference is the "Window Draw method" i usually have full enabled because all other modes have caused problems with normal map baking, and when i change it to anything else than full i get a huge fps boost.

so with Draw method:
"Full" --> the single digit fps that i reported
anything else --> tripple digits never seen it drop below 100fps so far (with a AMD 7950)%%%

%%%i tested the "Region Overlap" option and i dont notice a difference, but what makes a huge difference is the "Window Draw method" i usually have full enabled because all other modes have caused problems with normal map baking, and when i change it to anything else than full i get a huge fps boost. so with Draw method: "Full" --> the single digit fps that i reported anything else --> tripple digits never seen it drop below 100fps so far (with a AMD 7950)%%%

%%%I have this problem as well: http:*www.youtube.com/watch?v=kLx_YiaHjI8 (http:*www.blenderartists.org/forum/showthread.php?291323-Texture-Paint-incredibly-slow)

I have an AMD FX-8350 @ 4.0Ghz, 16 Gb RAM, 660 TI 3Gb overclocked, win8 64 bit
system-info.txt: http://www.pasteall.org/42031/text
System Properties: http://pasteall.org/pic/50840%%%

%%%I have this problem as well: http:*www.youtube.com/watch?v=kLx_YiaHjI8 (http:*www.blenderartists.org/forum/showthread.php?291323-Texture-Paint-incredibly-slow) I have an AMD FX-8350 @ 4.0Ghz, 16 Gb RAM, 660 TI 3Gb overclocked, win8 64 bit system-info.txt: http://www.pasteall.org/42031/text System Properties: http://pasteall.org/pic/50840%%%

%%%I don't know how enabling region overlap can increase performance. I don't see that here, must be some particle graphics driver thing.

The best performing draw method is triple buffer. If it works then it's highly suggested to use that. Full is slow and only should be use if nothing else works.

Marcus, you've got a bunch of options enabled in the system user preferences. Try disabling anisotropic filtering, multisample or region overlap and open the .blend file again. Or do File > Load Factory Settings (this is only temporary), and then load the .blend file to see if any other options are influencing things.%%%

%%%I don't know how enabling region overlap can increase performance. I don't see that here, must be some particle graphics driver thing. The best performing draw method is triple buffer. If it works then it's highly suggested to use that. Full is slow and only should be use if nothing else works. Marcus, you've got a bunch of options enabled in the system user preferences. Try disabling anisotropic filtering, multisample or region overlap and open the .blend file again. Or do File > Load Factory Settings (this is only temporary), and then load the .blend file to see if any other options are influencing things.%%%

%%%Yes, i still find it very odd that enabling Region Overlap while being on Triple Buffer mode gives such a boost on my computer, but as i'm using a G41 from Intel, maybe it "accidentally" fixes a problem with whatever Intel drivers has with how region and 3D view recalculations works in Blender.

The only sure thing i see is that it is really making Texture Paint mode working on my system much faster and smoother than it has ever worked, as if i am going to Triple Buffer only it does not boost anything, it's only when enabling that Region Overlap (while in Triple Buffer mode of course).

I wish i knew someone else using a G41 to see if he could confirm this oddity.%%%

%%%Yes, i still find it very odd that enabling Region Overlap while being on Triple Buffer mode gives such a boost on my computer, but as i'm using a G41 from Intel, maybe it "accidentally" fixes a problem with whatever Intel drivers has with how region and 3D view recalculations works in Blender. The only sure thing i see is that it is really making Texture Paint mode working on my system much faster and smoother than it has ever worked, as if i am going to Triple Buffer only it does not boost anything, it's only when enabling that Region Overlap (while in Triple Buffer mode of course). I wish i knew someone else using a G41 to see if he could confirm this oddity.%%%
Author
Member

%%%i tested again on the NVIDIA setup again with a new GPU (quadro K4000) and the slowdown is severe, switching to "Triple Buffer" only helps with slow strokes, as soon as i paint a bit faster (and that is by no means fast) the performance drops again and its impossible to paint.
%%%

%%%i tested again on the NVIDIA setup again with a new GPU (quadro K4000) and the slowdown is severe, switching to "Triple Buffer" only helps with slow strokes, as soon as i paint a bit faster (and that is by no means fast) the performance drops again and its impossible to paint. %%%
Author
Member

%%%i noticed an other strange behavior, it only seems to happen when i make long strokes, if i make short left - right strokes i can paint super fast without getting a slowdown. any idea why this could happen?%%%

%%%i noticed an other strange behavior, it only seems to happen when i make long strokes, if i make short left - right strokes i can paint super fast without getting a slowdown. any idea why this could happen?%%%

%%%Brecht, I've tried factory settings on the newest BuilderBot build (r56693) and I still have these problems. Also I have updated my 660TI to use the lastest beta drivers -- doesn't solve the problem either.
The problems occurs both when painting using cycles and BI.
I have no performance issues when using the Image Editor's paint tools%%%

%%%Brecht, I've tried factory settings on the newest BuilderBot build (r56693) and I still have these problems. Also I have updated my 660TI to use the lastest beta drivers -- doesn't solve the problem either. The problems occurs both when painting using cycles and BI. I have no performance issues when using the Image Editor's paint tools%%%

%%%Dan, long strokes would be expected to be slower just because it takes more processing to paint more pixels. Not sure if it's unreasonably slower. If it's OpenGL drawing that's the bottleneck then longer strokes wouldn't make much difference, if it's the projection painting itself then it would.

Marcus, so you tried with Load Factory Settings, then painting, and it's still slow? Also attaching an example .blend file may help, just in case there is some specific way things are set up.%%%

%%%Dan, long strokes would be expected to be slower just because it takes more processing to paint more pixels. Not sure if it's unreasonably slower. If it's OpenGL drawing that's the bottleneck then longer strokes wouldn't make much difference, if it's the projection painting itself then it would. Marcus, so you tried with Load Factory Settings, then painting, and it's still slow? Also attaching an example .blend file may help, just in case there is some specific way things are set up.%%%

%%%Brecht, with factory settings I am just drawing on the default cube unwrapped automatically and assigned a 1024x1024 texture, single sided enabled/disabled, all default settings using the most basic methods.%%%

%%%Brecht, with factory settings I am just drawing on the default cube unwrapped automatically and assigned a 1024x1024 texture, single sided enabled/disabled, all default settings using the most basic methods.%%%

%%%I fixed some possible performance issues, builds with revision 56823 or newer here will have the fix:
http://builder.blender.org/download/

I doubt it fixes all the problems mentioned here though, probably there are a few different ones here. There's also another possible slowdown due to overhead of creating/destroying threads, will check how to solve that next.%%%

%%%I fixed some possible performance issues, builds with revision 56823 or newer here will have the fix: http://builder.blender.org/download/ I doubt it fixes all the problems mentioned here though, probably there are a few different ones here. There's also another possible slowdown due to overhead of creating/destroying threads, will check how to solve that next.%%%
Author
Member

%%%thanks for the effort, unfortunately this does not solve the problem.%%%

%%%thanks for the effort, unfortunately this does not solve the problem.%%%

%%%Reminder: Another user has also reported this, here

http://www.blenderartists.org/forum/showthread.php?297257-GSOC-2013-MOARZ-texpaint-stuffs&p=2409148&viewfull=1#post2409148

this bug is still there.%%%

%%%Reminder: Another user has also reported this, here http://www.blenderartists.org/forum/showthread.php?297257-GSOC-2013-MOARZ-texpaint-stuffs&p=2409148&viewfull=1#post2409148 this bug is still there.%%%

%%%Hi, I recently updated my blender to 2.67, and now I updated to the newest build, but I'm experiencing some seriously slow performance during texture painting on some bump map details. I used to just turn off project paint to increase performance but now I can't turn it off anymore.

However if I increase the spacing and the brush size, things will go smooth, but the result then is far away from what I wanted. Is it possible to bring back the option to turn off the project paint?

I read some threads in blenderartist forum but nothing is really useful right now.

I'm using a GTX660Ti and i7-3770K, Photoshop sometimes also lags me out but that was when the brush is too big...

Please if this can't be solved easily, add back that option to turn off project paint would help a lot!%%%

%%%Hi, I recently updated my blender to 2.67, and now I updated to the newest build, but I'm experiencing some seriously slow performance during texture painting on some bump map details. I used to just turn off project paint to increase performance but now I can't turn it off anymore. However if I increase the spacing and the brush size, things will go smooth, but the result then is far away from what I wanted. Is it possible to bring back the option to turn off the project paint? I read some threads in blenderartist forum but nothing is really useful right now. I'm using a GTX660Ti and i7-3770K, Photoshop sometimes also lags me out but that was when the brush is too big... Please if this can't be solved easily, add back that option to turn off project paint would help a lot!%%%
Author
Member

%%%my coworker notices a significant slowdown after about 10-15minutes so maybe theres some kind of memory leak as well?%%%

%%%my coworker notices a significant slowdown after about 10-15minutes so maybe theres some kind of memory leak as well?%%%

%%%I think I have found a lead to fixing this bug. Looks like it's thread related. Setting the threads to 1 in the performance tab reclaims the performance back on my windows system (I'll check elsewhere as well). It looks like there is either some thread conflict here that prevents the system from being fast or some part of the code runs too many times.%%%

%%%I think I have found a lead to fixing this bug. Looks like it's thread related. Setting the threads to 1 in the performance tab reclaims the performance back on my windows system (I'll check elsewhere as well). It looks like there is either some thread conflict here that prevents the system from being fast or some part of the code runs too many times.%%%

%%%As I mentioned above, starting/stopping threads for each paint dab is really inefficient, especially if the brush size is small. Using something like OpenMP or the task scheduler I made that's in Sergey's depsgraph branch would be more efficient. A quick workaround would be to just avoid threading if the brush is small.

If you want optimal threading usage even for small brushes it requires bigger changes, you'd need to do something like storing multiple brush positions in an array and handle such an array per pixel, otherwise there's too much synchronization overhead. But making small brushes better parallelized probably isn't so important, mostly need to avoid the unnecessary overhead.%%%

%%%As I mentioned above, starting/stopping threads for each paint dab is really inefficient, especially if the brush size is small. Using something like OpenMP or the task scheduler I made that's in Sergey's depsgraph branch would be more efficient. A quick workaround would be to just avoid threading if the brush is small. If you want optimal threading usage even for small brushes it requires bigger changes, you'd need to do something like storing multiple brush positions in an array and handle such an array per pixel, otherwise there's too much synchronization overhead. But making small brushes better parallelized probably isn't so important, mostly need to avoid the unnecessary overhead.%%%
Author
Member

%%%we work most of the time with small brushes for small details so for us this is a big deal:(
what can we do to avoid this issue? where can we change this threading thing?%%%

%%%we work most of the time with small brushes for small details so for us this is a big deal:( what can we do to avoid this issue? where can we change this threading thing?%%%

%%%In the Performance panel you can set threads to Manual and set the value to 1 to disable threading.%%%

%%%In the Performance panel you can set threads to Manual and set the value to 1 to disable threading.%%%

%%%I committed Brecht's recommended hack on 58079. I'll leave a better implementation for when we have better task scheduling available. %%%

%%%I committed Brecht's recommended hack on 58079. I'll leave a better implementation for when we have better task scheduling available. %%%

%%%Could you test if it's working better for you after 58805? I see a great performance increase here for space strokes.%%%

%%%Could you test if it's working better for you after 58805? I see a great performance increase here for space strokes.%%%

Closing since this is so old and reporter has not replied yet. Better threading will need extensive changes yet and better be done after merging the GSOC branch.

Closing since this is so old and reporter has not replied yet. Better threading will need extensive changes yet and better be done after merging the GSOC branch.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
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#35057
No description provided.