Sculpt tiling seems to break some brushes #45577

Closed
opened 2015-07-27 17:24:58 +02:00 by Sanc Tuary · 14 comments

System Information
win32

Blender Version
Broken: cmake win32 hash : cdf2dbe

Short description of error
flatten and scrape brush misbehave with tiling enabled

Exact steps for others to reproduce the error
Load that blend :
testtilebug.blend

with "Load UI" enabled so you can easily see the problem, use the already selected brush on the zone i am pointing on the screenshot (Dyntopo is enabled)
http://i.imgur.com/rg8GX9i.jpg

The brush is the Scrape brush with locked "Area Plane" in order to use the brush to polish nicely like that :
http://blenderartists.org/forum/showthread.php?370903-Advice-on-sculpting-brushes-is-needed&p=2868828&viewfull=1#post2868828

You should obtain some horrible thing like that :
http://i.imgur.com/iMLqTiu.jpg

Now go disable the X/Y/Z tiling and redo the brush stroke, you should obtain the expected (and desired) :
http://i.imgur.com/DJWsGBF.jpg

I observed the same problem happening with the flatten brush.

**System Information** win32 **Blender Version** Broken: cmake win32 hash : cdf2dbe **Short description of error** flatten and scrape brush misbehave with tiling enabled **Exact steps for others to reproduce the error** Load that blend : [testtilebug.blend](https://archive.blender.org/developer/F213208/testtilebug.blend) with "Load UI" enabled so you can easily see the problem, use the already selected brush on the zone i am pointing on the screenshot (Dyntopo is enabled) http://i.imgur.com/rg8GX9i.jpg The brush is the Scrape brush with locked "Area Plane" in order to use the brush to polish nicely like that : http://blenderartists.org/forum/showthread.php?370903-Advice-on-sculpting-brushes-is-needed&p=2868828&viewfull=1#post2868828 You should obtain some horrible thing like that : http://i.imgur.com/iMLqTiu.jpg Now go disable the X/Y/Z tiling and redo the brush stroke, you should obtain the expected (and desired) : http://i.imgur.com/DJWsGBF.jpg I observed the same problem happening with the flatten brush.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @sanctuary

Added subscriber: @sanctuary
Antonis Ryakiotakis was assigned by Sergey Sharybin 2015-07-28 11:22:22 +02:00

Added subscriber: @Sergey

Added subscriber: @Sergey

Added subscriber: @sternmull

Added subscriber: @sternmull

calc_sculpt_plane() is used by do_scrape_brush() to calculate its reference-plane. I think at the moment it returns the same plane for all tiled strokes. To work correctly it should update the planes origin. For symmetry this function updates the plane by flipping or rotating its normal and origin by using mirror_symmetry_pass and symm_rot_mat. When using tiling it should also move the plane around (Maybe by using an offset that gets updated in do_tiled()).

While looking at this I found there is also an issue with the initial calculation of the plane (and other stuff) when painting starts: When tiling is enabled the first stroke is not issued at the original painting position. Instead it starts at the tiled stroke with the minimum coordinates. At this position the brush is usually partially outside of the mesh and will probably calculate some unexpected normals and other stuff on initialization.

calc_sculpt_plane() is used by do_scrape_brush() to calculate its reference-plane. I think at the moment it returns the same plane for all tiled strokes. To work correctly it should update the planes origin. For symmetry this function updates the plane by flipping or rotating its normal and origin by using mirror_symmetry_pass and symm_rot_mat. When using tiling it should also move the plane around (Maybe by using an offset that gets updated in do_tiled()). While looking at this I found there is also an issue with the initial calculation of the plane (and other stuff) when painting starts: When tiling is enabled the first stroke is not issued at the original painting position. Instead it starts at the tiled stroke with the minimum coordinates. At this position the brush is usually partially outside of the mesh and will probably calculate some unexpected normals and other stuff on initialization.

This issue was referenced by 2ae67de944

This issue was referenced by 2ae67de94437162a9d429850b04a295fa393d971

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Committed the quick and dirty solution - recalculate the sculpt plane always in tiled sculpting.

Committed the quick and dirty solution - recalculate the sculpt plane always in tiled sculpting.
Author

I do not know if it's because of the "dirty" solution or if it is what you mean by "TODO" in the fix.
But in case you aren't already aware, while the brushes after that fix do not horribly destroy the meshes where you stroke fortunately, even with the fix they are still not working correctly with "Area Plane" locked when you use tiling, in fact they work as the user had not locked the "Area Plane".

( using blender-2.75-6b7313b-win32.zip , today's buildbot)

They work correctly only if i disable X/Y/Z tiling in sculpt.

I do not know if it's because of the "dirty" solution or if it is what you mean by "TODO" in the fix. But in case you aren't already aware, while the brushes after that fix do not horribly destroy the meshes where you stroke fortunately, even with the fix they are still not working correctly with "Area Plane" locked when you use tiling, in fact they work as the user had not locked the "Area Plane". ( using blender-2.75-6b7313b-win32.zip , today's buildbot) They work correctly only if i disable X/Y/Z tiling in sculpt.

You are right, the commit of this task effectively disables the locked "Area Plane". Yesterday I submitted a patch that corrects this behaviour: D1438

You are right, the commit of this task effectively disables the locked "Area Plane". Yesterday I submitted a patch that corrects this behaviour: [D1438](https://archive.blender.org/developer/D1438)
Author

Hello,

I do not know if your patch fixing the problem has been included in Blender since you submitted it , but i tried today's buildbot ( blender-2.75-3b4a8f1-win32.zip ) and unfortunately the problem is still present, the locked planes are ignored if sculpt tiling is enabled.

Hello, I do not know if your patch fixing the problem has been included in Blender since you submitted it , but i tried today's buildbot ( blender-2.75-3b4a8f1-win32.zip ) and unfortunately the problem is still present, the locked planes are ignored if sculpt tiling is enabled.

No it's not, I will be committing the fix tomorrow, unless someone else does so first.

No it's not, I will be committing the fix tomorrow, unless someone else does so first.
Author

Thank you

Thank you
Author

Just reporting that i tested on today's buildbot ( blender-2.75-23f5407-win32.zip ) and i confirm that it's now working greatly.

Thank you very much for the patch and the commit.

Just reporting that i tested on today's buildbot ( blender-2.75-23f5407-win32.zip ) and i confirm that it's now working greatly. Thank you very much for the patch and the commit.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#45577
No description provided.