Texture Paint incredibly slow.

It is on automatic already :slight_smile:
None of the other draw methods improves performance on my system

I have noticed this slow down when working tonight in the UV Image Editor. I loaded a 2048x1024 image, started painting with no hiccups at first. After I saved the image painting as a scrap and made some adjustments to the brushes, next thing I knew the brushes started dragging and not making the smooth strokes that they had done before. Just to be sure, I loaded a new file and started painting on a new image and that went smoothly. I then opened the previous image and started painting there, and it was dragging. I am wondering if there is a memory issue.

I saw this mentionned on the bug tracker, and could notice this sometime, have you checked if the Space setting (in the Stroke tab) is at 10 ?
Apparently sometime it can be set to 5 by Blender (especially when loading old models) with the new system, and having Space set to 5 makes the brush noticably slower.

Space settingsā€¦ I will check.

Ok, I made the change and I still get straight lines instead of the brush following a curve as drawn with my pen.

And if I open the same image in a new file, it paints smoothly with even spacing set to 5.

Last night I gave up in the original file and started using 3d space by adding the image to a plane and painting that way - worked just fine. I am wondering if it had anything to do with the mask I set up for the coloring of the back ground. I was sure to set the compositor to not use nodes while I painted, so I wonder. I did write down the error in the window if that might make sense.

"BLI_dynstr_append text too long or format error.

<!> event has invalid window"

i noticed something strange with the painting, i tested now on my work machine which has a quadro k400 and the performance is super bad again:( the draw method changes did only give slightly better perfromance.
however, i noticed that the slowdown/lag only occures when i want to make long strokes in the same direction, if i make only short left - right strokes its super fast:/

anyone can try if he can reproduce this?

@kromar, I donā€™t get that but maybe you can use smooth stroke to make use of the stroke ā€˜leadingā€™ that pulls the stroke along, maybe that would help. Also, how many samples are you using on your brush?

Oddly i noticed that the brushes are, for me, faster in the 3D view (provided i use Triple Buffering + Region Overlap) than in the UV/Image Editor, a noticable difference actually.
I donā€™t really understand as the algorithm should be more complex to 3D project your brushes strokes, while the UV/Image editor should be only 2D and so much less complex for the system ?

Yes, this is true sometimes. I get different results depending on how many times I change settings in the brushes, or when I open a new default file I get speed up. I did notice the 3d view is a good place to paint in concert with the image editor, as in loading the same image on a plane in camera view matched to the same dimensions.

I noticed this :
http://www.miikahweb.com/en/blender/svn-logs/commit/56767

Fix sculpt getting slower as you paint a longer stroke. Partial redraw was
redrawing the whole area that was painted on from the start of the stroke,
should only do the last part.

In 2.67 the brush system saw an unification , so i wonder if the sculpt brush getting slower could have the same source of the paint brush getting slower reported in this thread.

Someone experiencing the problem from this thread should get to try a build superior to r56767 to see if that fix does it for the paint mode too.

Downloading now, and I will test as soon as it is installed.

I have incredible speed in viewport 3d paint, but in Image Editor I get slow and erratic strokes that donā€™t follow the curve of the brush stroke. Iā€™m not sure how to describe it exactly, but it is like it waits and then connects the dots with a line at intervals.

not sure what going on, my amd 7950 is like 3 times faster in texture painting than the quadro k4000, this is ridiculous considering the high price of the quadro. i think i will return it and get an other amd for work and then a separate system with some shit nvidia card to test the game engineā€¦

EDIT: apparently texture painting depends on the cpu, so that might explain the difference

I saw in the commits list :

Revision 56823 by Brecht Van Lommel
Attempt to fix #35057 and #35372: slow texture painting performance.

After the paint refactoring for 2.67, the OpenGL texture was getting updated for
every stroke point, rather than once for every redraw. With a small brush radius
and low spacing the number of stroke points can be quite large, which might have
a big performance impact depending on the graphics card / drivers.

Also for 2D image paint, avoid redrawing the button panels and properties editor
during painting.

There is another possible cause for slowdowns with 3D texture painting which was
not fixed. Projection painting is creating and destroying threads for every stroke
point. Depending on the CPU/OS there might be a lot of overhead in doing that if
the brush size is small.

Revision 56822 by Brecht Van Lommel
Fix another cases where painting long brush strokes with small radius was slowed
down, this time by the operator properties getting converted to a string for
display in the info window.

With 1000+ stroke points this can get slow, and takes up too much space anyway,
so now itā€™s (somewhat arbitrarily) limited to printing only 10 points.

So be sure to give a test to a build equal or superior to r56823 if you can build yourself, or wait until one is available on the buildbot to see if Brecht managed to fix that problem.

uh that would be awesome if the performance would be stable:O trying to build trunk (getting some issues with the new defense software:/)

If youā€™re on 64 bits (mac/linux/windows), thereā€™s a r56823 currently on the buildbot for those.
http://builder.blender.org/download/

For other 32bits, probably tomorrow.

I hope this is a fix. I am having fun with the painting, but I like to paint from a zoomed out view for the first forms and long strokes, so it was getting choppy. Workaround was starting in 3d view on a plane, then moving that to the uv image editor once I was ready to make small changes.

I can say itā€™s somewhat better (r58923 on 64-bit Ubuntu with NVIDIA GTS 450). Really small brushes still lag on fast broad strokes, however.

This latest build did not improve performance on my PC whatsoever :frowning:

neither did it on my systems, but brecht mentioned an other issue which he will try to fix next and that sounds more like the source of our problem. i trust that he will improve the performance one way or an other:D

Similar observation after being able to test r56836 :
-same as before 2D painting in the UV/Image editor is still slow
-3D painting in the 3DView is still fast only if i have Triple Buffering -and- Region Overlap enabled (probably an Intel oddity as if i donā€™t enable Region Overlap, itā€™s roughly the same slow as in 2D painting)

So the source of the slow is indeed probably the other problem mentionned by Brecht that is not yet fixed.