Add option for Render Layers node to render in native scene resolution #109659

Open
opened 2023-07-03 17:51:41 +02:00 by Max-Georg Schulzke · 6 comments

System Information
Operating system: 64bit Windows 10
Graphics card: RTX 3090

Blender Version
Broken: 2.93.6; 3.6.0
Worked: -

Short description of error
When using a file output node to save different scenes in different formats while rendering an animation, the file will always be in the format dimension of the currently active scene.

Possible overlapping with:
#87447

Exact steps for others to reproduce the error
You use the provided sample files and press render.
You will need to navigate to the set output paths in the Compositing node.
C:\OutputTest(3.6) and C:\OutputTest_293(2.93)

Replicate yourself:

  1. open default scene
  2. duplicate scene using "Linked Copy"
  3. in freshly duplicated Scene, change the "Format" > "Resolution" to 9:16 1080x1920
  4. open Compositing > "Use Nodes"
  5. add a "File Output" node > select it
  6. expand "Properties" and create a second output using "Add Input"
  7. duplicate "Render Layers" node and select the other scene in the duplicated "Render Layers" node
  8. plug each "Render Layers ⇾ Image" into one of the inputs of the "File Output" node
  9. now press Render

Expected Result:
Every image is saved by the File Output node in its own resolution, respective of the parent scenes "Format" settings.

Actual Result:
All images have the resolution of the currently selected Scene.

2.93.6 File
OutputNode_Test_293.blend
3.6.0 File
OutputNode_Test_36.blend

**System Information** Operating system: 64bit Windows 10 Graphics card: RTX 3090 **Blender Version** Broken: 2.93.6; 3.6.0 Worked: - **Short description of error** When using a file output node to save different scenes in different formats while rendering an animation, the file will always be in the format dimension of the currently active scene. **Possible overlapping with:** https://projects.blender.org/blender/blender/issues/87447 **Exact steps for others to reproduce the error** You use the provided sample files and press render. You will need to navigate to the set output paths in the Compositing node. C:\OutputTest(3.6) and C:\OutputTest_293(2.93) **Replicate yourself:** 1. open default scene 2. duplicate scene using "Linked Copy" 3. in freshly duplicated Scene, change the "Format" > "Resolution" to 9:16 1080x1920 4. open Compositing > "Use Nodes" 5. add a "File Output" node > select it 6. expand "Properties" and create a second output using "Add Input" 7. duplicate "Render Layers" node and select the other scene in the duplicated "Render Layers" node 8. plug each "Render Layers ⇾ Image" into one of the inputs of the "File Output" node 9. now press Render **Expected Result:** Every image is saved by the File Output node in its own resolution, respective of the parent scenes "Format" settings. **Actual Result:** All images have the resolution of the currently selected Scene. **2.93.6 File** [OutputNode_Test_293.blend](/attachments/644afeed-1bf0-469b-a76d-d750ef2e9970) **3.6.0 File** [OutputNode_Test_36.blend](/attachments/9bb2828b-7679-4fde-9d7d-80babc9e0d7a)
Max-Georg Schulzke added the
Status
Needs Triage
Type
Report
Priority
Normal
labels 2023-07-03 17:51:42 +02:00
Member

Thanks for the report. I can confirm. I'll check

Thanks for the report. I can confirm. I'll check
Pratik Borhade added
Module
VFX & Video
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-07-04 10:53:55 +02:00
Member

It seems do_render_compositor_scene uses the same Render for all scenes.
And this seems somewhat expected, see the following comment:

/* Render scene into render result, within a compositor node tree.
 * Uses the same image dimensions, does not recursively perform compositing. */

However, apparently there was some thought into using own resolution as well:

/* exception: scene uses own size (unfinished code) */

Here is a hakish/unfinished version that would use the scene's own size, BUT

  • that would probably break old files that rely on this
  • needs further investigation wrt crop and size percentage (should this be used from the orig scene?)
  • maybe this could be an option on the renderlayers node?
  • needs further input from render pipeline devs (@brecht might want to share insights?)
diff --git a/source/blender/render/intern/pipeline.cc b/source/blender/render/intern/pipeline.cc
index a146b4d62b1..522cad5b67f 100644
--- a/source/blender/render/intern/pipeline.cc
+++ b/source/blender/render/intern/pipeline.cc
@@ -1125,12 +1125,20 @@ static void do_render_compositor_scene(Render *re, Scene *sce, int cfra)
   BKE_scene_camera_switch_update(sce);
 
   /* exception: scene uses own size (unfinished code) */
-  if (false) {
+  rcti disprect_new;
+  bool use_own_size = true;
+  if (use_own_size) {
     BKE_render_resolution(&sce->r, false, &winx, &winy);
-  }
+    resc->r.xsch = winx;
+    resc->r.ysch = winy;
 
+    disprect_new.xmin = 0;
+    disprect_new.xmax = winx;
+    disprect_new.ymin = 0;
+    disprect_new.ymax = winy;
+  }
   /* initial setup */
-  RE_InitState(resc, re, &sce->r, &sce->view_layers, nullptr, winx, winy, &re->disprect);
+  RE_InitState(resc, use_own_size ? nullptr : re, &sce->r, &sce->view_layers, nullptr, winx, winy, use_own_size ? &disprect_new : &re->disprect);
 
   /* We still want to use 'rendercache' setting from org (main) scene... */
   resc->r.scemode = (resc->r.scemode & ~R_EXR_CACHE_FILE) | (re->r.scemode & R_EXR_CACHE_FILE);
It seems `do_render_compositor_scene` uses the same `Render` for all scenes. And this seems somewhat expected, see the following comment: ``` /* Render scene into render result, within a compositor node tree. * Uses the same image dimensions, does not recursively perform compositing. */ ``` However, apparently there was some thought into using own resolution as well: `/* exception: scene uses own size (unfinished code) */` Here is a hakish/unfinished version that would use the scene's own size, BUT - that would probably break old files that rely on this - needs further investigation wrt crop and size percentage (should this be used from the orig scene?) - maybe this could be an option on the renderlayers node? - needs further input from render pipeline devs (@brecht might want to share insights?) ``` diff --git a/source/blender/render/intern/pipeline.cc b/source/blender/render/intern/pipeline.cc index a146b4d62b1..522cad5b67f 100644 --- a/source/blender/render/intern/pipeline.cc +++ b/source/blender/render/intern/pipeline.cc @@ -1125,12 +1125,20 @@ static void do_render_compositor_scene(Render *re, Scene *sce, int cfra) BKE_scene_camera_switch_update(sce); /* exception: scene uses own size (unfinished code) */ - if (false) { + rcti disprect_new; + bool use_own_size = true; + if (use_own_size) { BKE_render_resolution(&sce->r, false, &winx, &winy); - } + resc->r.xsch = winx; + resc->r.ysch = winy; + disprect_new.xmin = 0; + disprect_new.xmax = winx; + disprect_new.ymin = 0; + disprect_new.ymax = winy; + } /* initial setup */ - RE_InitState(resc, re, &sce->r, &sce->view_layers, nullptr, winx, winy, &re->disprect); + RE_InitState(resc, use_own_size ? nullptr : re, &sce->r, &sce->view_layers, nullptr, winx, winy, use_own_size ? &disprect_new : &re->disprect); /* We still want to use 'rendercache' setting from org (main) scene... */ resc->r.scemode = (resc->r.scemode & ~R_EXR_CACHE_FILE) | (re->r.scemode & R_EXR_CACHE_FILE); ```
Member

Note: it does seem a bit inconsistent, since pushing this button will use the "right" resolution and feed it to the tree:

image

Note: it does seem a bit inconsistent, since pushing this button will use the "right" resolution and feed it to the tree: ![image](/attachments/ebcc8b90-5224-46f2-9a9e-0153a1328cac)
116 KiB

The current state I would not consider a bug, it's working as designed for the common case where you want to composite a bunch of scenes and render layers together into one image. For that case it's convenient to have them all be the same resolution automatically, without e.g. accidentally leaving one scene at e.g. 50% resolution.

I'd be fine with there being an option to control this. Perhaps the resolution % should always be inherited.

The current state I would not consider a bug, it's working as designed for the common case where you want to composite a bunch of scenes and render layers together into one image. For that case it's convenient to have them all be the same resolution automatically, without e.g. accidentally leaving one scene at e.g. 50% resolution. I'd be fine with there being an option to control this. Perhaps the resolution % should always be inherited.
Philipp Oeser changed title from File output node only saving Format of the current scene? to Add option for Render Layers node to render in native scene resolution 2023-07-04 15:22:46 +02:00
Philipp Oeser added
Type
To Do
and removed
Type
Report
labels 2023-07-04 15:22:56 +02:00
Member

Changed to TODO then

Changed to TODO then

without e.g. accidentally leaving one scene at e.g. 50% resolution.

I really get your point for a classic composite pipeline

but I mostly do exhibit visualizations with different orthographic, perspective and fpsy formats
some landscape, some portrait and some matching the booth photograph dimensions for the fspy composite
and its really nice to just change the 3D exhibit once and directly push it to the renderfarm and have all the required renders again
for rapid design iterations

thanks for your service to blender

> without e.g. accidentally leaving one scene at e.g. 50% resolution. I really get your point for a classic composite pipeline but I mostly do exhibit visualizations with different orthographic, perspective and fpsy formats some landscape, some portrait and some matching the booth photograph dimensions for the fspy composite and its really nice to just change the 3D exhibit once and directly push it to the renderfarm and have all the required renders again for rapid design iterations thanks for your service to blender
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#109659
No description provided.