Page MenuHome

brush lag in texture painting
Closed, DuplicatePublic


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

Blender Version
2.80 0f5b53ba4dc

Short description of error
When painting textures in 3D viewport brush lags very much, so that it is not even possible to draw a circle. In Texture editor it works fine.

Exact steps for others to reproduce the error
The same issue with any mesh. Does not matter how many polygons. increased brush spacing also does not help.
Attaching short video with this issue.

Event Timeline

I also noticed, that if the brush size is much smaller, then the issue disappears, or even with larger brush the lag is not so bad. the worst lag is with medium size brush..

Sebastian Parborg (zeddb) lowered the priority of this task from 90 to 50.

I get this as well. I wouldn't think that the projection calculation of the brush in 3D space onto a plane would be this slow.

I'm not seeing any poor performance, please attach a .blend file so we're sure to be testing the same setup?

It might also be a threading issue, try changing Render > Performance > Threads to 1 or other values to see if it makes a difference.

Projection painting code is very different than our 2D painting code, the bottleneck here may not be in the 3D viewport, so not necessarily an issue for @Clément Foucault (fclem).

For me it happens with any blend file (just tested again with latest builds). I have also tested it on few different PCs (one pc with amd ryzen 1700 CPU/GTX 1080Ti and another with amd ryzen 2700x/GTX 1080Ti)
Blender 2.79 has also the same issue for me.
Sorry, but I could not find (Render > Performance > Threads to 1) option.

@Sarunas Atkocaitis (Sarunas) you have to switch to cycles for that option to be visible.

Here is a simple test file:

@Brecht Van Lommel (brecht) ah, I see. I guess I was too hasty with the assign then. How should we assign this to (if any)?
If I set the threads to 1, the issue becomes even more apparent. If I try to draw in a circle, the 2D painting code is able to keep up quite well, but the 3D viewport seems to struggle quite a bit.
Do you know if we handle the poll rate of the mouse differently in the 2D viewport than in the 3D viewport?

@Sebastian Parborg (zeddb)
Thanks for adivice.
I have switched threads to 1 and it actually fixed the issue it draws without the lag, but if I put anything else then 1 to the thread count it starts lagging again.

@Sarunas Atkocaitis (Sarunas) interesting, I guess it might just be that I have a really crappy CPU (AMD bulldozer) that I get other results. (Or could also be different under Linux than in Windows)

I can confirm as well that setting rendering threads to 1 resolves the issue but setting rendering threads to anything above 1 causes problems.

I can't find the thread option and I'm having performance problems in the viewport when trying to paint, to the point it's difficult to even make a line.
I have no problem when painting on the Image editor, it behaves smoothly.

Win10 64b
Geforce GTX 1060 3GB

The Thread option will only be visible if you're using Cycles as your renderer. So switch your rendering engine and you'll be able to reduce your threads. After that, you can switch back to Eevee and it should work fine.

Hi, I used 1 thread in the performance options and the stroke is a lot smoother but still persist a little lag, also this happens in sculpt mode. I used a subdivided cube for the test (No Dyntopo) and this is the result

Cannot reproduce this issue on macOS, even on a low specced laptop. What resolution is your texture?

I have tested in a very new PC with Windows 10:

Intel i9 16 threads
32 GB Ram
RTX2080 TI

I get lag painting textures in a simple cube, and I think the PC is able to run a very heavy work, so it looks there are some bottleneck.

@Brecht Van Lommel (brecht) I could run a Visual Studio performace profiler session to find where is the time used.

Hi, I can confirm that the performance improves a lot by setting the threads to 1.

Here the result in VS2017. I hope this help you.

@Jeroen Bakker (jbakker) Yes, it's can merge it.

a few tips to better the performance
Set Threads to 1
turn off (Disable) modifiers while painting, (If you need them back just turn them on and try to set their values as low as possible while painting, but again turning them off or disabling gives you the best, )
If its still laggy, try paiting click by click, hold the mouse for a sec while clicked once, if you move the mouse the brush will keep painting even while lagging, and thats why sometimes it lags even more than you expected

I am still getting this issue with Blender 2.81a. Texture painting lags when using large-radius brushes or when painting onto large textures (> 2048). I tried setting Threads to 1 but that made no difference for me.

My issue is a bit different from the original. Performance is worse when painting in the Image Editor instead of the 3D viewport. I wouldn't mind the lag if it didn't also interfere with the input, but it's causing what should be perfectly curved lines to look like they're instead made up of smaller straight lines.

This also happens in linux, tested with ubuntu 18.

However, with small brushes increasing the threads does improve the performance, also, the default brush stroke in 2.81a is "Space", a very "laggy" brush compared with the "Dots" stroke for the new users.