Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.
C++ 3d3d-sculptingcppdear-imguidigital-sculptingfbxgame-developmentgaussian-splattinggltfimage-to-3dmcpopenglopenusdsculptingtext-to-3dunreal-engine
Move and Kelvinlet grab brushes grab with the full size under Pressure > Size (#122)
islandmed2918d47f2ee2
diff --git a/changes/fix-move-pressure-size.md b/changes/fix-move-pressure-size.mdnew file mode 100644index 00000000..87cf6b59--- /dev/null+++ b/changes/fix-move-pressure-size.md@@ -0,0 +1,9 @@+---+fixed: **Move with Pressure > Size on a pen** (#122, reported by Zoldyck-Kill): Move and the Kelvinlet grab+ brushes set the area they grab at the press, when a pen barely touches, so with Pressure > Size on they grabbed+ only a few percent of the brush and seemed not to work. They now always grab with the full brush size;+ Pressure > Strength still applies.+testers:+ - Windows + pen tablet: turn on Pressure > Size, pick Move, press lightly and drag; the whole brush circle moves.+ - Same with KelvinGrab.+---diff --git a/docs/guide/sculpting.md b/docs/guide/sculpting.mdindex 34bf6f19..f017dea3 100644--- a/docs/guide/sculpting.md+++ b/docs/guide/sculpting.md@@ -679,7 +679,7 @@ Two toggles decide what pressure does. They are on the top shelf and in **Sculpt| Toggle | Default | Effect ||---|---|---|| **Pressure > Strength** | On | Pen pressure scales the brush strength. |-| **Pressure > Size** | Off | Pen pressure scales the brush size (down to 5% at the lightest touch). |+| **Pressure > Size** | Off | Pen pressure scales the brush size (down to 5% at the lightest touch). Move, KelvinGrab, KelvinTwist and KelvinScale always grab with the full size. |Pressure applies only to strokes made with the pen; mouse strokes always use full pressure. Custom brushesalso have a **Pressure curve** setting that makes them respond to a light or a firm touch (seediff --git a/src/app/App.cpp b/src/app/App.cppindex b247978e..4fa2c928 100644--- a/src/app/App.cpp+++ b/src/app/App.cpp@@ -1873,11 +1873,12 @@ void App::beginStroke(float x, float y, const RayHit& hit) {}if (strokeBrush_ == BrushType::Move && !recipe && strokeSculpt_) {- const float pressure = pressureSize_ ? std::max(strokePressure(), 0.05f) : 1.0f;+ // The grab region is fixed at the press, when a pen barely touches: Pressure > Size would shrink it to a+ // few percent (#122), so Move grabs with the full brush size.DabParams p;p.center = hit.position;p.viewDir = camera_.forward();- p.radius = radiusPx_ * pressure * camera_.worldPerPixel(hit.position, canvasHeight());+ p.radius = radiusPx_ * camera_.worldPerPixel(hit.position, canvasHeight());p.strength = strength_;p.focal = focalShift_;p.connectedOnly = uiPrefs_.connectedOnly;diff --git a/src/app/PanelKelvinlet.cpp b/src/app/PanelKelvinlet.cppindex 0bc5db22..3a0885f7 100644--- a/src/app/PanelKelvinlet.cpp+++ b/src/app/PanelKelvinlet.cpp@@ -52,9 +52,9 @@ bool App::kelvinStrokeBrush() const { return dragBrush(strokeBrush_) && !strokeR// ---------------------------------------------------------------------------void App::kelvinBegin(const RayHit& hit) {- const float pressure = pressureSize_ ? std::max(strokePressure(), 0.05f) : 1.0f;+ // Full brush size, as Move: the press pressure of a pen is near zero, so Pressure > Size would shrink the grab (#122).kelvinCenter_ = hit.position;- kelvinRadius_ = radiusPx_ * pressure * camera_.worldPerPixel(hit.position, canvasHeight());+ kelvinRadius_ = radiusPx_ * camera_.worldPerPixel(hit.position, canvasHeight());grabPlanePoint_ = grabLast_ = kelvinTarget_ = hit.position;kelvinPending_ = 0.0f;kelvinLastX_ = lastX_;