This patch allow to change the brush tip shape between a square and a
circle using a brush property.
After this change we are no longer testing the distance against a cube
(the Z axis is not used). I did not test this in depth, but if it does
not produce any artifacts I think we can keep it this way instead of
adding more complexity to the code.
Details
Diff Detail
- Repository
- rB Blender
- Branch
- clay-strips-roundness (branched from master)
- Build Status
Buildable 5689 Build 5689: arc lint + arc unit
Event Timeline
Do we need to add migration code. Seems like the setting is set to 0.25f I expected some sort of migration code.
- Rename clay_strips_tip_roundness to tip_roundness
This property and test can also be used to improve some other brushes and tools (like the paint brush), so that name does not make sense.
I was testing this brush tip test in the sculpt vertex colors paint brush and I decided to change how it works. The falloff was previously applied from the center of the square, so it produces these kinds of artifacts if the falloff is not constant. This may be acceptable in the clay brush as the artifacts can be hidden using a custom falloff or autosmooth, but it is not acceptable in the alpha of the paint brush.
With the new test implementation, the falloff is only applied only on the round part of the brush. With this test, we can use the smoother curve falloff which has 0 derivatives in 0 and 1, making the transitions perfectly smooth while keeping the brush tip shape editable.
With this modification, the round clay strips brush is way smoother than the square one, but that will be also controllable after adding the hardness property (I can add it to this patch if you want to).
Just the regular small comments.
| source/blender/blenloader/intern/versioning_280.c | ||
|---|---|---|
| 3940 | This seems to be different than the default | |
| source/blender/editors/sculpt_paint/sculpt.c | ||
| 1113 | const float roundness | |
| 1152 | Use true/false for booleans | |
| source/blender/makesdna/DNA_brush_types.h | ||
| 325 | Would be good to give it a comment explaining the unit of this. Is it a factor? | |
I accept this patch. Knowing that we still need to add more options to the brush for better working. You can better decide when to add this to master.


