Realtime Compositor: Implement Mask node #107464

Merged
Omar Emara merged 2 commits from OmarEmaraDev/blender:mask-node into main 2023-05-01 11:29:12 +02:00
Member

This patch implements the Mask node for the realtime compositor. The
evaluation of the mask is not GPU accelerated, but is cached as a form
of temporary implementation until we implement a GPU evaluator for
masks.

One limitation currently is that we do not redraw the viewport while the
mask is getting edited by the user, because always doing that will be
redundant in most situations, and conditioning the redraw requires a lot
of work that should be handled outside of this patch.

This is similar to the Texture node implementation in 151a53110c.

This patch implements the Mask node for the realtime compositor. The evaluation of the mask is not GPU accelerated, but is cached as a form of temporary implementation until we implement a GPU evaluator for masks. One limitation currently is that we do not redraw the viewport while the mask is getting edited by the user, because always doing that will be redundant in most situations, and conditioning the redraw requires a lot of work that should be handled outside of this patch. This is similar to the Texture node implementation in 151a53110c.
Omar Emara added the
Interest
Compositing
Module
Viewport & EEVEE
labels 2023-04-29 15:06:07 +02:00
Omar Emara added 1 commit 2023-04-29 15:06:27 +02:00
This patch implements the Mask node for the realtime compositor. The
evaluation of the mask is not GPU accelerated, but is cached as a form
of temporary implementation until we implement a GPU evaluator for
masks.

One limitation currently is that we do not redraw the viewport while the
mask is getting edited by the user, because always doing that will be
redundant in most situations, and conditioning the redraw requires a lot
of work that should be handled outside of this patch.

This is similar to the Texture node implementation in 151a53110c.
Omar Emara requested review from Clément Foucault 2023-04-29 15:06:39 +02:00
Clément Foucault approved these changes 2023-04-29 21:55:22 +02:00
Clément Foucault left a comment
Member

The patch looks good. I would still recommend to split the enum renaming to main first. But that's a bit nitpicky in my opinion. So do what you think is best.

The patch looks good. I would still recommend to split the enum renaming to `main` first. But that's a bit nitpicky in my opinion. So do what you think is best.
@ -774,3 +774,2 @@
/* CMP_NODEFLAG_MASK_AA = (1 << 0), */ /* DEPRECATED */
CMP_NODEFLAG_MASK_NO_FEATHER = (1 << 1),
CMP_NODEFLAG_MASK_MOTION_BLUR = (1 << 2),
CMP_NODE_MASK_FLAG_NO_FEATHER = (1 << 1),

Not sure if these readability changes should be included in this patch. Commit them directly to main first.

Not sure if these readability changes should be included in this patch. Commit them directly to main first.
Omar Emara added 1 commit 2023-05-01 11:10:00 +02:00
Omar Emara merged commit 3f6912ece2 into main 2023-05-01 11:29:12 +02:00
Omar Emara deleted branch mask-node 2023-05-01 11:29:13 +02:00
Howard Trickey referenced this issue from a commit 2023-05-29 02:51:43 +02:00
Sign in to join this conversation.
No reviewers
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 & 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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & 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
2 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#107464
No description provided.