Paint Mode: Backface Occlusion #98593

Closed
opened 2022-06-04 17:37:24 +02:00 by Julien Kaspar · 8 comments
Member

NOTE: This design still needs to be discussed and completed.

Issues

The current implementation of occlusion painting has certain issues:

Falloff capped at 90 degrees

Right now the normal falloff while texture painting is not going beyond 90 degrees and eventually caps at a harsh transition.
A better behaviour would be to have the falloff go past 90 degrees, instead of only inwards to any surface below 90 degrees.

Performance

For performance reasons the occlusion setting is often turned off or a simple "Front Face Only" option is used instead.
The goal should be to make full occlusion auto-masking perform well on high resolution meshes and textures.

Not available with Spherical Falloff

Currently there is only a projection based falloff available for texture painting.
With the new 3D paint brush based on sculpt mode we have the opportunity for a much more intuitive painting behaviour.
The combination of a spherical brush falloff and occlusion auto-masking would be the more intuitive default for occlusion painting.

Goal

The primary goal is to implement a brush that is ideal for projection painting.
For this it is vital to have fast performing and intuitive backface occlusion settings, similar to the ones in the current texture paint mode.

Design

Automasking

The best way to implement this as both a per brush setting and a global toggle is by using auto-masks.
This way we can support these auto-masking modes for both sculpt & paint mode:

  1. Mask via View Normals
  • Additional toggle for Occlusion
  1. Mask via Area Normals

The second one would be more beneficial for sculpting tools but both would work very similar.
Auto-masks would also support any tool in these modes. Not just brushes.

Falloff & Occlusion

To provide a better feel while painting, we need to provide a full 180 degrees for the normal falloff slider.
Even when masking by view normals and occlusion, it's important to have a smooth falloff that goes a bit beyond 90 degrees to avoid harsh transitions while painting.

Remove Front-Faces Only

With the new auto-masking settings being way more accessible that the old "Front Faces Only" toggle, it should be the only setting necessary for brushes.

Open questions:

  • What about modes that don't support auto-masking yet? Weight Paint mode could keep the current front faces only toggle or we could add auto-masking support. Making this accessible via shortcuts could be the main issue.
NOTE: This design still needs to be discussed and completed. # Issues The current implementation of occlusion painting has certain issues: ## Falloff capped at 90 degrees Right now the normal falloff while texture painting is not going beyond 90 degrees and eventually caps at a harsh transition. A better behaviour would be to have the falloff go past 90 degrees, instead of only inwards to any surface below 90 degrees. ## Performance For performance reasons the occlusion setting is often turned off or a simple "Front Face Only" option is used instead. The goal should be to make full occlusion auto-masking perform well on high resolution meshes and textures. ## Not available with Spherical Falloff Currently there is only a projection based falloff available for texture painting. With the new 3D paint brush based on sculpt mode we have the opportunity for a much more intuitive painting behaviour. The combination of a spherical brush falloff and occlusion auto-masking would be the more intuitive default for occlusion painting. # Goal The primary goal is to implement a brush that is ideal for projection painting. For this it is vital to have fast performing and intuitive backface occlusion settings, similar to the ones in the current texture paint mode. # Design ## Automasking The best way to implement this as both a per brush setting and a global toggle is by using auto-masks. This way we can support these auto-masking modes for both sculpt & paint mode: 1. Mask via View Normals - Additional toggle for Occlusion 2. Mask via Area Normals The second one would be more beneficial for sculpting tools but both would work very similar. Auto-masks would also support any tool in these modes. Not just brushes. ## Falloff & Occlusion To provide a better feel while painting, we need to provide a full 180 degrees for the normal falloff slider. Even when masking by view normals and occlusion, it's important to have a smooth falloff that goes a bit beyond 90 degrees to avoid harsh transitions while painting. ## Remove Front-Faces Only With the new auto-masking settings being way more accessible that the old "Front Faces Only" toggle, it should be the only setting necessary for brushes. Open questions: - What about modes that don't support auto-masking yet? Weight Paint mode could keep the current front faces only toggle or we could add auto-masking support. Making this accessible via shortcuts could be the main issue.
Author
Member
Added subscribers: @JulienKaspar, @JosephEagar, @Jeroen-Bakker, @Limarest, @DanielBystedt, @Gareth-Jensen-1
Member

Sculpt-dev has an automasking mode for this. IIRC it's pretty simple code, I can port it over.

Sculpt-dev has an automasking mode for this. IIRC it's pretty simple code, I can port it over.
Member

I think making this an automasking mode makes the most sense from a code point of view, however we don't have to present it as such in the UI.

I think making this an automasking mode makes the most sense from a code point of view, however we don't have to present it as such in the UI.

I agree that making it an automasking mode is better than having the old "use front faces" checkbox lost somewhere in the UI

I agree that making it an automasking mode is better than having the old "use front faces" checkbox lost somewhere in the UI
Author
Member

From the recent module meeting:

We agreed that this makes sense as a mode-wide auto-mask option.
Joe already implemented this in sculpt-dev. It just requires a scene wide setting for the occlusion falloff.
Both area and view normal occlusion are good to implement since they benefit very different brushes.
View normal occlusion is more useful for projection painting while area normal will be more used for sculpting brushes.

This new feature could completely replace “Front Faces Only”. Occlusion auto-masking is way faster to toggle and potentially doesn’t have performance downsides compared to Front-Faces Only.

From the [recent module meeting](https://devtalk.blender.org/t/2022-6-8-sculpt-texture-paint-module-meeting/24672): > We agreed that this makes sense as a mode-wide auto-mask option. > Joe already implemented this in sculpt-dev. It just requires a scene wide setting for the occlusion falloff. > Both area and view normal occlusion are good to implement since they benefit very different brushes. > View normal occlusion is more useful for projection painting while area normal will be more used for sculpting brushes. > > This new feature could completely replace “Front Faces Only”. Occlusion auto-masking is way faster to toggle and potentially doesn’t have performance downsides compared to Front-Faces Only.
Joseph Eagar was assigned by Julien Kaspar 2022-06-28 09:52:01 +02:00
Author
Member

From recent meeting notes:

- Joe added occlusion support
- Julien shared feedback
    - Replace Occlusion with Area Normal auto-masking in pie menu
    - Make Occlusion a sub-setting of view normal auto-masking
    - Implement a way to use limit and falloff settings for occlusion? 
- Joe also suggested that we can add blur propagation steps like in cavity auto-masking
    - This might already give the minimal required results
    - We might want to add that in general since regular view/normal auto-masking can also lead to hard edges
- Could also use cotangent weights for vertex painting to calculate limit and falloff
- Texture painting needs its own solution
    - We'll talk with Brecht and Jeroen if they have suggestions
From [recent meeting notes](https://devtalk.blender.org/t/2022-7-27-sculpt-texture-paint-module-meeting/25260): > - Joe added occlusion support > - Julien shared feedback > - Replace Occlusion with Area Normal auto-masking in pie menu > - Make Occlusion a sub-setting of view normal auto-masking > - Implement a way to use limit and falloff settings for occlusion? > - Joe also suggested that we can add blur propagation steps like in cavity auto-masking > - This might already give the minimal required results > - We might want to add that in general since regular view/normal auto-masking can also lead to hard edges > - Could also use cotangent weights for vertex painting to calculate limit and falloff > - Texture painting needs its own solution > - We'll talk with Brecht and Jeroen if they have suggestions

This issue was referenced by bbc69563d0

This issue was referenced by bbc69563d0704a8269318d8699e7c2bf4edc91c2
Author
Member

Changed status from 'Needs Triage' to: 'Resolved'

Changed status from 'Needs Triage' to: 'Resolved'
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
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#98593
No description provided.