Fix #109201: Consistent mapping boundaries of brush textures #110896

Merged
Sergey Sharybin merged 1 commits from Sergey/blender:fix_109201 into main 2023-08-09 11:40:05 +02:00

This fix makes it so the circular brush is fitted into the square
texture. This seems to be the most straightforward way to resolve
confusion of the inter-dependencies between different brush and
texture options.

This fix makes it so the circular brush is fitted into the square texture. This seems to be the most straightforward way to resolve confusion of the inter-dependencies between different brush and texture options.
Sergey Sharybin added the
Module
Sculpt, Paint & Texture
label 2023-08-07 15:58:22 +02:00
Sergey Sharybin added 1 commit 2023-08-07 15:58:32 +02:00
Fix #109201: Consistent mapping boundaries of brush textures
All checks were successful
buildbot/vexp-code-patch-coordinator Build done.
945098ebd6
This fix makes it so the circular brush is fitted into the square
texture. This seems to be the most straightforward way to resolve
confusion of the inter-dependencies between different brush and
texture options.
Author
Owner

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR110896) when ready.
Sergey Sharybin requested review from Daniel Bystedt 2023-08-07 15:59:01 +02:00
Sergey Sharybin requested review from Julien Kaspar 2023-08-07 15:59:01 +02:00
Author
Owner

The way to solve the problem is based on what Julien mentioned to me here at the studio. We did a quick test already, and it seemed to behave as expected to him.

However, please give it a whirl after the builds are up to verify it is indeed at the state we want things to be for 4.0.

P.S. The Solution section in the bug report might need to be updated, as no defaults are to be changed.

The way to solve the problem is based on what Julien mentioned to me here at the studio. We did a quick test already, and it seemed to behave as expected to him. However, please give it a whirl after the builds are up to verify it is indeed at the state we want things to be for 4.0. P.S. The Solution section in the bug report might need to be updated, as no defaults are to be changed.
Member

I've tested it with all brushes that support the tip roundness setting (Clay Strips & Paint). Overall this seems to fix the core issue.

There are some strange issues at the boundary of the brush falloff where the texture scale is jumping and the geometry is not properly updating the deformation/painting.

I've used a simple texture mask (white square with grey margin) to test how well the square is mapped into the surfaces.

The Clay Strips brush has some artefacts when the tip roundness is high:
image

The paint brush on the other hand has issues with a low tip roundness:
image

I've tested it with all brushes that support the tip roundness setting (Clay Strips & Paint). Overall this seems to fix the core issue. There are some strange issues at the boundary of the brush falloff where the texture scale is jumping and the geometry is not properly updating the deformation/painting. I've used a simple texture mask (white square with grey margin) to test how well the square is mapped into the surfaces. The Clay Strips brush has some artefacts when the tip roundness is high: ![image](/attachments/66003c5f-447b-4bb0-8db4-30aa0e440be2) The paint brush on the other hand has issues with a low tip roundness: ![image](/attachments/b2d3ef59-5a87-4474-8be3-d5e33e1a78d9)
534 KiB
458 KiB
Member

Thanks a lot for the change with the mapping of textures, @Sergey. It work a lot better now :-)

A later, important goal would be to have the tip roundness option on most brushes in sculpt mode - especially sculpt draw, but also the draw brush in texture mode. The goal is to be able to "stamp" an entire square texture with anchored stroke.


Jumping texture mapping with clay tubes and tip roundness = 1

I found the similair issue that @JulienKaspar highlighted above. Mapping kind of jumps with the following settings. It seems to be Tip roundness with the clay strips brush that is causing the issue

tip roundness = > 0
mapping = Area plane
stroke method = Anchored

This does not seem to be happening with the sculpt mode paint brush, so it seems to be related to the clay strips brush somehow.

Fixing this issue would be all for me to accept this patch

See attached video Jumping mapping with high tip roundness


Randomly found bug with multires + clay anchor overdraw

On "overscale" anchored stroke and then rescale, artefacts are created. This seems to only happen when using the multires modifier. This only seem to happen with clay or clay tubes + multires. Not with draw + multires for example. I have replicated this issue in Blender 3.6 so it has nothing to do with this patch

See attached video Clay tubes multires overdraw bug


I cannot replicate @JulienKaspar s issue with "The paint brush on the other hand has issues with a low tip roundness:" During my tests the paint brush works as excpected.

Thanks a lot for the change with the mapping of textures, @Sergey. It work a lot better now :-) A later, important goal would be to have the tip roundness option on most brushes in sculpt mode - especially sculpt `draw`, but also the `draw brush` in `texture mode`. The goal is to be able to "stamp" an entire square texture with anchored stroke. __________________ **Jumping texture mapping with clay tubes and tip roundness = 1** I found the similair issue that @JulienKaspar highlighted above. Mapping kind of jumps with the following settings. It seems to be `Tip roundness` with the `clay strips` brush that is causing the issue tip roundness = > 0 mapping = Area plane stroke method = Anchored This does not seem to be happening with the `sculpt mode paint` brush, so it seems to be related to the `clay strips` brush somehow. **Fixing this issue would be all for me to accept this patch** See attached video `Jumping mapping with high tip roundness` __________________ **Randomly found bug with multires + clay anchor overdraw** On "overscale" anchored stroke and then rescale, artefacts are created. This seems to only happen when using the multires modifier. This only seem to happen with `clay` or `clay tubes` + `multires`. Not with draw + multires for example. I have replicated this issue in Blender 3.6 so it has nothing to do with this patch See attached video `Clay tubes multires overdraw bug` __________________ I cannot replicate @JulienKaspar s issue with "The paint brush on the other hand has issues with a low tip roundness:" During my tests the paint brush works as excpected.
Daniel Bystedt changed title from Fix #109201: Consistent mapping boundaries of brush textures to WIP: Fix #109201: Consistent mapping boundaries of brush textures 2023-08-08 00:54:18 +02:00
Member

Uploading a lightweight blend file with some brushes with textures in case you find it useful

Uploading a lightweight blend file with some brushes with textures in case you find it useful
Author
Owner

@DanielBystedt Thanks for testing! I've started looking into the issue from both you and Julien, and came to realization that it is not specific to this patch. The same issue happens in the current Blender 4.0. I did not have time to verify your brush in 3.6, but the repro case from Julien gives artifacts in 3.6 as well.

Juluen submitted an isolated report about his case #110921. I think yours is most likely caused by the same root cause, but maybe worth cross-referencing your findings from this PR in that issue.

Since the issue is not introduced by this PR, and this PR does fix another bug, I would suggest landing it.
And then look into the artifacts as a separate and dedicated investigation. Just to keep a stream of fixes flowing more smoothly to the main branch.

How do you feel about it?

@DanielBystedt Thanks for testing! I've started looking into the issue from both you and Julien, and came to realization that it is not specific to this patch. The same issue happens in the current Blender 4.0. I did not have time to verify your brush in 3.6, but the repro case from Julien gives artifacts in 3.6 as well. Juluen submitted an isolated report about his case #110921. I think yours is most likely caused by the same root cause, but maybe worth cross-referencing your findings from this PR in that issue. Since the issue is not introduced by this PR, and this PR does fix another bug, I would suggest landing it. And then look into the artifacts as a separate and dedicated investigation. Just to keep a stream of fixes flowing more smoothly to the main branch. How do you feel about it?
Julien Kaspar approved these changes 2023-08-08 16:13:09 +02:00
Member

@DanielBystedt Thanks for testing! I've started looking into the issue from both you and Julien, and came to realization that it is not specific to this patch. The same issue happens in the current Blender 4.0. I did not have time to verify your brush in 3.6, but the repro case from Julien gives artifacts in 3.6 as well.

Juluen submitted an isolated report about his case #110921. I think yours is most likely caused by the same root cause, but maybe worth cross-referencing your findings from this PR in that issue.

Since the issue is not introduced by this PR, and this PR does fix another bug, I would suggest landing it.
And then look into the artifacts as a separate and dedicated investigation. Just to keep a stream of fixes flowing more smoothly to the main branch.

How do you feel about it?

Thanks for clarifying @Sergey. I'd be more than happy to accept this pull request :-)

> @DanielBystedt Thanks for testing! I've started looking into the issue from both you and Julien, and came to realization that it is not specific to this patch. The same issue happens in the current Blender 4.0. I did not have time to verify your brush in 3.6, but the repro case from Julien gives artifacts in 3.6 as well. > > Juluen submitted an isolated report about his case #110921. I think yours is most likely caused by the same root cause, but maybe worth cross-referencing your findings from this PR in that issue. > > Since the issue is not introduced by this PR, and this PR does fix another bug, I would suggest landing it. > And then look into the artifacts as a separate and dedicated investigation. Just to keep a stream of fixes flowing more smoothly to the main branch. > > > How do you feel about it? Thanks for clarifying @Sergey. I'd be more than happy to accept this pull request :-)
Daniel Bystedt approved these changes 2023-08-08 22:56:21 +02:00
Sergey Sharybin changed title from WIP: Fix #109201: Consistent mapping boundaries of brush textures to Fix #109201: Consistent mapping boundaries of brush textures 2023-08-09 11:39:34 +02:00
Sergey Sharybin merged commit 8141ee90f4 into main 2023-08-09 11:40:05 +02:00
Sergey Sharybin deleted branch fix_109201 2023-08-09 11:40:06 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
4 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#110896
No description provided.