Compositor: Viewport issues when zoomed in #111344
Labels
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#111344
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-08-21 10:12, hash:
f0a8c1946162
Worked: never
Short description of error
Composition Mask is "rendered" wrongly in the viewport when the camera is not fully in view.
Exact steps for others to reproduce the error
Current buggy result:
The mask only matches when the entire camera is in view:
I can confirm the problem.
I suppose it has something to do with the
rcti get_compositing_region()
function incompositor_engine.cc
.The code was introduced in
cc78fd4e93
by @OmarEmaraDevConsider the following example where we have a 1000x800 viewport and a 500x500
final render resolution, and consequently a camera of the same resolution.
We have two options for how the compositor should operate on that setup, each of
which is discussed in the following two sections.
Camera Compositing
The compositor can constrain itself to the camera region, and out of camera
regions will be left unaltered regardless of passepartout.
Advantages:
compositing pipeline.
have the same size in both compositions and will align with the camera in their
identity transform.
able to align images easily.
Disadvantages:
the passepartout is not opaque.
Viewport Compositing
The compositor will operate on the entire viewport and will ignore the camera
view.
The aforementioned advantages and disadvantages are essentially reversed, but
can be partially alleviated using the alternatives described in each of the
following sections.
Transformed Input Resources
Input resources can assume the size of the camera region and transformed
relative to the space of viewport such that they align with the camera.
The disadvantages is that pre-transformed resources can be unintuitive to work
with, for instance, rotating the resource will also move it due to the centered
pivot of the compositor transforms. Moreover, when realized on the domain of the
viewport, the areas outside of the original mask will assume a zero values,
which might not be what the users wants. Finally, the different domains of the
inputs can be harder to reason about for users, as opposed to having all inputs
have the same domain.
Padded Input Resources
Input resources can be zero padded to the size of the viewport, such that all
inputs will have the same size.
This alleviates the different sizes disadvantages but shares the rest of the
disadvantages as the transformed input resources alternative.
Neither of the alternatives workarounds the aspect ratio change and the
difference in sizes. To workaround those, one would have to change all nodes to
operate in the scene camera space. Except this would break setups where one is
processing an image that is standalone or simply is not related to the scene.
Perhaps this deserves a topic on DevTalk.
For "Camera Compositing", in my opinion, even with the weirdness, I feel it would be more useful to constrain to the camera region.
(It would be interesting to see pictures showing the disadvantages.)
For "Viewport Compositing", if the camera aspect is kept for the composition region, I imagine the composition should also be cropped just like in camera view.
(Some kind of border should be drawn in this case.)
If compositing the entire viewport is really useful for some cases. Then it could have an option in the popover.
Like
[X] Keep Rendering Aspect
.@OmarEmaraDev It may help to clarify how people expect (or are expected) to use the Viewport Compositing (as oppose to the camera compositing).
The Camera Compositing doesn't need all nodes to be in Scene Camera Space. What it needs is for nodes to have their absolute pixels to be internally converted to the scene camera space relative to the camera 100% size.
And on top of that to have the aspect ratio respected. For me the simpler example is how border render should just work with the viewport compositor, and give you the same result as if you were to render it out with F12.