Page MenuHome

rake doesn't properly align the strokes
Closed, ResolvedPublic

Description

System Information
win 7 x64

Blender Version
Hash: 9715d4c

Short description of error

rake strokes doesn`t properly align one after an other

this with normal space stroke but its really noticeable using curves to draw curve paths, as you can see in the image at the bottom follows a nice line but on the curves the rake stroke doesn't fully align with the path

Exact steps for others to reproduce the error
1-

shoud be alredy on texture paint mode
2-aim on the plane align the curve on the plane
3-hit enter to draw

Event Timeline

Nahuel Belich (belich) set Type to Bug.
Nahuel Belich (belich) created this task.
Nahuel Belich (belich) raised the priority of this task from to Needs Triage by Developer.

it would be good to fix this not only for the curve stroke, also the other stroke modes(space, dot etc) will benefit of a fidelity control on the rake of the stroke direction

I’ll check this too…

Bastien Montagne (mont29) triaged this task as Normal priority.May 6 2015, 12:36 PM

Ok, so basically, issue here is we do not have access to tangent at the draw point, only to the line made by current point and a previous one. This is a reasonable approximation when draw points are close enough, and there is no singularity (or even sharp changes) in slope, but breaks in any other case.

Antony, I do not think we consider this a bug? sounds more like limitation of current design…

However, there is one thing that makes things even worse here - previous rake reference point is generated by averaging itself and current draw point (paint.c, line 552-553), this sounds very bad to me? Replacing

interp_v2_v2v2(ups->last_rake, ups->last_rake, mouse_pos, u);  /* u == 0.5f */

by

copy_v2_v2(ups->last_rake, mouse_pos);

Alleviates the issue, at least.

Thanks a bunch Antony!!!!

Amazing!

General fix is by Bastien, I took care of the curve case.