Page MenuHome

Clay Strips: Input pressure curve and new defaults
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Nov 8 2019, 4:41 AM.

Details

Summary

By squaring the pen pressure and disabling BRUSH_SPACE_ATTEN the brush
feels like it has a bigger strength range, wich makes it easier to
control when applying less pressure in order to smooth sculpted
surfaces.

Each brush should have a custom input pressure curve by default to get
an optimal behaviour and make all brushes consistent, but that is going
to take some time to get it right.

Diff Detail

Repository
rB Blender
Branch
sculpt-clay-curve (branched from master)
Build Status
Buildable 5613
Build 5613: arc lint + arc unit

Event Timeline

  • Add Clay Strips pressure/size mapping curve

    All brushes should have their own default mapping curve in the new function (I will add them in a later patch). It does not make sense to map them linearly by default.

This is the new default behavior of Clay Strips

Jeroen Bakker (jbakker) requested changes to this revision.Nov 14 2019, 4:14 PM

Codewise is fine, just a check

I think it would be better to come up with a design of how the eventual pressure system will look like. It currently feel like we are spending time in patching existing limitations (short term solutions) and not working towards a final solution.

source/blender/editors/sculpt_paint/sculpt.c
1742

use a different variable. might introduce bugs in the future.

This revision now requires changes to proceed.Nov 14 2019, 4:14 PM
Pablo Dobarro (pablodp606) marked an inline comment as done.
  • Review Update

True, input curves should not be hardcoded, but for now, this is better than having them linear. My plan is to add a function datablock to control this from paint_stroke.c directly. That way we can create custom functions to map pen tablet outputs to paint mode brush inputs using any curve or math operation. We can ship Blender with the current mapping functions in the brush defaults as a node function, but users will also be able to tweak them if they want to, like in any other painting software. After that, all these new functions (and the previous ones that are modifying the input values in sculpt.c) can be removed.

This revision is now accepted and ready to land.Nov 15 2019, 4:12 PM