Fix #111345: Compositor uses entire viewport in camera view #118241

Merged
Omar Emara merged 1 commits from OmarEmaraDev/blender:viewport-compositor-always-limit-compositing-space into main 2024-02-15 15:46:44 +01:00
Member

The compositor assumes the entire viewport as its compositing space even
in camera view. The current design decision was to limit the compositing
space by the camera region only if the camera passepartout is opaque,
that is, areas outside of the camera are not visible.

This patch changes that behavior to always limit the compositing space
by the camera region. The downside is that areas outside of the camera
will be left uncomposited.

This is useful to match viewport compositing to final render compositing
in terms of maintaining the same space, but not necessirly the same
resolution. However, this still has the limitation that space will be
different when the camera region intersects the viewport, since we only
composite their intersection in that case.

The compositor assumes the entire viewport as its compositing space even in camera view. The current design decision was to limit the compositing space by the camera region only if the camera passepartout is opaque, that is, areas outside of the camera are not visible. This patch changes that behavior to always limit the compositing space by the camera region. The downside is that areas outside of the camera will be left uncomposited. This is useful to match viewport compositing to final render compositing in terms of maintaining the same space, but not necessirly the same resolution. However, this still has the limitation that space will be different when the camera region intersects the viewport, since we only composite their intersection in that case.
Omar Emara added the
Interest
Compositing
Module
VFX & Video
labels 2024-02-14 08:39:48 +01:00
Omar Emara added 1 commit 2024-02-14 08:39:56 +01:00
35706f4616 Fix #111345: Compositor uses entire viewport in camera view
The compositor assumes the entire viewport as its compositing space even
in camera view. The current design decision was to limit the compositing
space by the camera region only if the camera passepartout is opaque,
that is, areas outside of the camera are not visible.

This patch changes that behavior to always limit the compositing space
by the camera region. The downside is that areas outside of the camera
will be left uncomposited.
Omar Emara requested review from Sergey Sharybin 2024-02-14 08:40:12 +01:00
Author
Member

20240214-093131.png

![20240214-093131.png](/attachments/5eef663a-0410-42a8-8380-71bac58d71a6)
Contributor

Thats not a downside. Its a good comparison tool. You can also move camera left and right and see difference

Thats not a downside. Its a good comparison tool. You can also move camera left and right and see difference

For the immediate simple step the PR looks great!

It still has limitation of "incorrect" compositing when the camera view is only partially visible. This is fine, since this is also how it behaves with an opaque pass passepartout. Maybe worth mentioning it explicitly in the description. Will leave it up to you for the final call if you think it worth it.

The more ideal solution would be to treat the viewport as an image with data window equal to the whole viewport, and view window equal to what camera "sees" (and some extra trickery for the partially "visible" camera). Correct if i'm wrong, but it is not something we can achieve just yet, because of things like relative transforms and such would need become aware whether they are relative to data or view window (and possible other cases like that) ?

For the immediate simple step the PR looks great! It still has limitation of "incorrect" compositing when the camera view is only partially visible. This is fine, since this is also how it behaves with an opaque pass passepartout. Maybe worth mentioning it explicitly in the description. Will leave it up to you for the final call if you think it worth it. The more ideal solution would be to treat the viewport as an image with data window equal to the whole viewport, and view window equal to what camera "sees" (and some extra trickery for the partially "visible" camera). Correct if i'm wrong, but it is not something we can achieve just yet, because of things like relative transforms and such would need become aware whether they are relative to data or view window (and possible other cases like that) ?
Author
Member

@Sergey Alright. That is true, we still don't have distinctions between data and display windows in the compositor.

@Sergey Alright. That is true, we still don't have distinctions between data and display windows in the compositor.
Sergey Sharybin approved these changes 2024-02-15 15:42:55 +01:00
Omar Emara merged commit 49faea5f36 into main 2024-02-15 15:46:44 +01:00
Omar Emara deleted branch viewport-compositor-always-limit-compositing-space 2024-02-15 15:46:46 +01: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
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
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
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
3 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#118241
No description provided.