Render Result not applying the compositor if the region is cropped #83166

Open
opened 2020-11-28 22:20:47 +01:00 by Otakar · 18 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 457.30

Blender Version
Broken: version: 2.91.0, branch: master, commit date: 2020-11-25 08:34, hash: 0f45cab862
Worked: (newest version of Blender that worked as expected)

Short description of error
When you render just a small region (to save time) and make the composite in full size (fullHD), it isn't taken into account in the final result.
Having the resulting file (in this case full size - fullHD) without the compositing taken into account, makes no sense.

This really limits the use of both render region and Compositor

Workaround is File Output node but that doesnt support video output.
COMPOSITOR x RENDERREGION.jpg

Thanks and regards

Exact steps for others to reproduce the error

  • Open attached file
  • render it and compare the compositor preview with the render result output

Test.blend

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 457.30 **Blender Version** Broken: version: 2.91.0, branch: master, commit date: 2020-11-25 08:34, hash: `0f45cab862` Worked: (newest version of Blender that worked as expected) **Short description of error** When you render just a small region (to save time) and make the composite in full size (fullHD), it isn't taken into account in the final result. Having the resulting file (in this case full size - fullHD) without the compositing taken into account, makes no sense. This really limits the use of both *render region* and *Compositor* Workaround is *File Output* node but that doesnt support video output. ![COMPOSITOR x RENDERREGION.jpg](https://archive.blender.org/developer/F9402232/COMPOSITOR_x_RENDERREGION.jpg) Thanks and regards **Exact steps for others to reproduce the error** - Open attached file - render it and compare the compositor preview with the render result output [Test.blend](https://archive.blender.org/developer/F9402231/Test.blend)

Added subscriber: @vojtech.salek

Added subscriber: @vojtech.salek
![COMPOSITOR x RENDERREGION.jpg](https://archive.blender.org/developer/F9402232/COMPOSITOR_x_RENDERREGION.jpg) [Test.blend](https://archive.blender.org/developer/F9402231/Test.blend)

I really cannot imagine use case when anyone would also want the composite regioned.
If anyone wants it cropped for real real with everything, there is thecrop to render region function, with that enabled, it makes sense to crop also the composite.

I really cannot imagine use case when anyone would also want the composite regioned. If anyone wants it cropped for real real with everything, there is the*crop to render region* function, with that enabled, it makes sense to crop also the composite.
Germano Cavalcante changed title from Render region has Output Dimensions priority over Compositor to Render Result not applying the compositor if the region is cropped 2020-12-02 18:55:20 +01:00

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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

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

Thanks for the report, I can confirm.

Thanks for the report, I can confirm.

Added subscribers: @manzanilla, @monique, @Jeroen-Bakker, @Sergey

Added subscribers: @manzanilla, @monique, @Jeroen-Bakker, @Sergey

This is more of a design limitation of the way how currently border render is integrated with the compositor. To make things even more confusing, there is an in-compositor border render.

@monique, @Jeroen-Bakker, @manzanilla, is this something you cal look into? Otherwise it.s more of a known issue, I'm afraid.

This is more of a design limitation of the way how currently border render is integrated with the compositor. To make things even more confusing, there is an in-compositor border render. @monique, @Jeroen-Bakker, @manzanilla, is this something you cal look into? Otherwise it.s more of a known issue, I'm afraid.

Only solution I see is applying render region on 3d render phase only. Removing it from compositor fixes the problem: P1993: (An Untitled Masterwork)

diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
index 9c21c91c370..64303d9e1a3 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
@@ -613,35 +613,3 @@ void ExecutionGroup::setViewerBorder(float xmin, float xmax, float ymin, float y
                   ymax * this->m_height);
   }
 }
-
-void ExecutionGroup::setRenderBorder(float xmin, float xmax, float ymin, float ymax)
-{
-  NodeOperation *operation = this->getOutputOperation();
-
-  if (operation->isOutputOperation(true)) {
-    /* Basically, setting border need to happen for only operations
-     * which operates in render resolution buffers (like compositor
-     * output nodes).
-     *
-     * In this cases adding border will lead to mapping coordinates
-     * from output buffer space to input buffer spaces when executing
-     * operation.
-     *
-     * But nodes like viewer and file output just shall display or
-     * safe the same exact buffer which goes to their input, no need
-     * in any kind of coordinates mapping.
-     */
-
-    bool operationNeedsBorder = !(operation->isViewerOperation() ||
-                                  operation->isPreviewOperation() ||
-                                  operation->isFileOutputOperation());
-
-    if (operationNeedsBorder) {
-      BLI_rcti_init(&this->m_viewerBorder,
-                    xmin * this->m_width,
-                    xmax * this->m_width,
-                    ymin * this->m_height,
-                    ymax * this->m_height);
-    }
-  }
-}
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.h b/source/blender/compositor/intern/COM_ExecutionGroup.h
index dd079415d09..8eb229a515a 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.h
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.h
@@ -437,8 +437,6 @@ class ExecutionGroup {
    */
   void setViewerBorder(float xmin, float xmax, float ymin, float ymax);

-  void setRenderBorder(float xmin, float xmax, float ymin, float ymax);
-
   /* allow the DebugInfo class to look at internals */
   friend class DebugInfo;

diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
index 4c0c7d2103e..3a0c38e5312 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
@@ -87,16 +87,6 @@ ExecutionSystem::ExecutionSystem(RenderData *rd,
     ExecutionGroup *executionGroup = this->m_groups[index];
     executionGroup->determineResolution(resolution);

-    if (rendering) {
-      /* case when cropping to render border happens is handled in
-       * compositor output and render layer nodes
-       */
-      if ((rd->mode & R_BORDER) && !(rd->mode & R_CROP)) {
-        executionGroup->setRenderBorder(
-            rd->border.xmin, rd->border.xmax, rd->border.ymin, rd->border.ymax);
-      }
-    }
-
     if (use_viewer_border) {
       executionGroup->setViewerBorder(
           viewer_border->xmin, viewer_border->xmax, viewer_border->ymin, viewer_border->ymax);

But it seems a design decision it should be applied on each pipeline step: 3d render, compositing and vse.
VSE just displays an error saying it doesn't support it as if it should.

Only solution I see is applying render region on 3d render phase only. Removing it from compositor fixes the problem: [P1993: (An Untitled Masterwork)](https://archive.blender.org/developer/P1993.txt) ``` diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp index 9c21c91c370..64303d9e1a3 100644 --- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp +++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp @@ -613,35 +613,3 @@ void ExecutionGroup::setViewerBorder(float xmin, float xmax, float ymin, float y ymax * this->m_height); } } - -void ExecutionGroup::setRenderBorder(float xmin, float xmax, float ymin, float ymax) -{ - NodeOperation *operation = this->getOutputOperation(); - - if (operation->isOutputOperation(true)) { - /* Basically, setting border need to happen for only operations - * which operates in render resolution buffers (like compositor - * output nodes). - * - * In this cases adding border will lead to mapping coordinates - * from output buffer space to input buffer spaces when executing - * operation. - * - * But nodes like viewer and file output just shall display or - * safe the same exact buffer which goes to their input, no need - * in any kind of coordinates mapping. - */ - - bool operationNeedsBorder = !(operation->isViewerOperation() || - operation->isPreviewOperation() || - operation->isFileOutputOperation()); - - if (operationNeedsBorder) { - BLI_rcti_init(&this->m_viewerBorder, - xmin * this->m_width, - xmax * this->m_width, - ymin * this->m_height, - ymax * this->m_height); - } - } -} diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.h b/source/blender/compositor/intern/COM_ExecutionGroup.h index dd079415d09..8eb229a515a 100644 --- a/source/blender/compositor/intern/COM_ExecutionGroup.h +++ b/source/blender/compositor/intern/COM_ExecutionGroup.h @@ -437,8 +437,6 @@ class ExecutionGroup { */ void setViewerBorder(float xmin, float xmax, float ymin, float ymax); - void setRenderBorder(float xmin, float xmax, float ymin, float ymax); - /* allow the DebugInfo class to look at internals */ friend class DebugInfo; diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp index 4c0c7d2103e..3a0c38e5312 100644 --- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp +++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp @@ -87,16 +87,6 @@ ExecutionSystem::ExecutionSystem(RenderData *rd, ExecutionGroup *executionGroup = this->m_groups[index]; executionGroup->determineResolution(resolution); - if (rendering) { - /* case when cropping to render border happens is handled in - * compositor output and render layer nodes - */ - if ((rd->mode & R_BORDER) && !(rd->mode & R_CROP)) { - executionGroup->setRenderBorder( - rd->border.xmin, rd->border.xmax, rd->border.ymin, rd->border.ymax); - } - } - if (use_viewer_border) { executionGroup->setViewerBorder( viewer_border->xmin, viewer_border->xmax, viewer_border->ymin, viewer_border->ymax); ``` But it seems a design decision it should be applied on each pipeline step: 3d render, compositing and vse. VSE just displays an error saying it doesn't support it as if it should.

Added subscribers: @SeanKennedy, @sebastian_k

Added subscribers: @SeanKennedy, @sebastian_k

@manzanilla, is still not very clear to me what would happen when you use render border and crop in scene settings. The render pipeline will give cropped image, and in that case compositing can not be valid.

Even if the render result is not cropped, I'm not sure whether doing compositing is helpful.

@sebastian_k , @SeanKennedy, can you share your insights of border render in compositing pipeline?

@manzanilla, is still not very clear to me what would happen when you use render border and crop in scene settings. The render pipeline will give cropped image, and in that case compositing can not be valid. Even if the render result is not cropped, I'm not sure whether doing compositing is helpful. @sebastian_k , @SeanKennedy, can you share your insights of border render in compositing pipeline?

Added subscriber: @EAW

Added subscriber: @EAW

Do anything to the Compositor Node Tree that triggers a re-evaluation, and it will update to what I assume is the desired result.
From the user perspective (aka Without looking at the code @manzanilla posted above), It seems that when Render Region is checked, the compositor simply isn't evaluated post render. However, the avg render times of 0:00.07 with compositor unchecked vs 0:00.18 checked is the only subtle hint to the use that this cannot be true.
Test1.png

Do anything to the Compositor Node Tree that triggers a re-evaluation, and it will update to what I assume is the desired result. From the user perspective (aka Without looking at the code @manzanilla posted above), It seems that when `Render Region` is checked, the compositor simply isn't evaluated post render. However, the avg render times of 0:00.07 with `compositor` unchecked vs 0:00.18 checked is the only subtle hint to the use that this cannot be true. ![Test1.png](https://archive.blender.org/developer/F9856661/Test1.png)

Added subscriber: @NeilGordon

Added subscriber: @NeilGordon

Why would Blender crop the compositing phase just because you chose to use render region? This inexplicable behaviour confused me (and, from googling it, at least a few other users) a great deal.
I ended up rendering out a small area that needed fixing with alpha transparent background, then doing a new pass to composite those images on top of my existing frames that had the flaw I was correcting.
This should have been doable in one pass and indeed the compositor view preview even implies it will work by displaying exactly the result I would have expected!

Please don't let this remain another inconsistent behaviour niggle in the Blender experience.

Why would Blender crop the compositing phase just because you chose to use render region? This inexplicable behaviour confused me (and, from googling it, at least a few other users) a great deal. I ended up rendering out a small area that needed fixing with alpha transparent background, then doing a new pass to composite those images on top of my existing frames that had the flaw I was correcting. This should have been doable in one pass and indeed the compositor view preview even implies it will work by displaying exactly the result I would have expected! Please don't let this remain another inconsistent behaviour niggle in the Blender experience.

Added subscriber: @Bachadam

Added subscriber: @Bachadam

@NeilGordon It is indeed confusing. Unfortunately, solving it requires un-entangling some design limitations. With the limited development power in the compositor area this is why it takes time.

@NeilGordon It is indeed confusing. Unfortunately, solving it requires un-entangling some design limitations. With the limited development power in the compositor area this is why it takes time.

@Sergey Thanks for the explanation, I look forward to each new version, and hopefully this behaviour fix will be a nice surprise part of one at some point. 🙂

@Sergey Thanks for the explanation, I look forward to each new version, and hopefully this behaviour fix will be a nice surprise part of one at some point. 🙂
Thomas Dinges added this to the 2.93 LTS milestone 2023-02-07 18:40:57 +01:00
Philipp Oeser removed the
Interest
VFX & Video
label 2023-02-10 09:31:57 +01:00
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
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
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
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
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
7 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#83166
There is no content yet.