Realtime Compositor: Implement File Output node #113204

Closed
Omar Emara wants to merge 5 commits from OmarEmaraDev/blender:gpu-file-output-node into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

This patch implements the File Output node for the Realtime Compositor.

This patch implements the File Output node for the Realtime Compositor.
Omar Emara added 1 commit 2023-10-03 14:37:07 +02:00
3332c3432d Realtime Compositor: Implement File Output node
This patch implements the File Output node for the Realtime Compositor.
Omar Emara added 1 commit 2023-10-04 19:11:19 +02:00
Omar Emara added 1 commit 2023-10-05 10:49:18 +02:00
Omar Emara changed title from WIP: Realtime Compositor: Implement File Output node to Realtime Compositor: Implement File Output node 2023-10-05 12:21:19 +02:00
Omar Emara requested review from Sergey Sharybin 2023-10-05 12:21:29 +02:00
Omar Emara added the
Module
VFX & Video
Interest
Compositing
labels 2023-10-05 12:21:46 +02:00
Omar Emara added 2 commits 2023-10-05 14:37:15 +02:00
Sergey Sharybin requested changes 2023-10-09 16:55:01 +02:00
Sergey Sharybin left a comment
Owner

I think the much better implementation would avoid having such a large chunk of duplicated code w.r.t the existing file output node.

The way I'd do it is by constructing temporary RenderResult with passes which match the node sockets (do it from both CPU and GPU compositor), and leave the actual file IO to a dedicated function, which will decide on file naming etc and refer the actual saving to BKE_image_render_write_exr/BKE_image_render_write.

There is already seems to be discrepancy in the way how stamping is handled.

I think the much better implementation would avoid having such a large chunk of duplicated code w.r.t the existing file output node. The way I'd do it is by constructing temporary `RenderResult` with passes which match the node sockets (do it from both CPU and GPU compositor), and leave the actual file IO to a dedicated function, which will decide on file naming etc and refer the actual saving to `BKE_image_render_write_exr`/`BKE_image_render_write`. There is already seems to be discrepancy in the way how stamping is handled.
Sergey Sharybin requested review from Brecht Van Lommel 2023-10-09 16:55:20 +02:00
Author
Member

I will look into that. The main issue I see immediately is that multi-view saving would need a cross-evaluation storage mechanism similar to global EXR handles used here, which would need to be a separate implementation for both GPU and CPU compositors. So I suspect we will likely end up having more duplicate and complex code than what we have now.

I will look into that. The main issue I see immediately is that multi-view saving would need a cross-evaluation storage mechanism similar to global EXR handles used here, which would need to be a separate implementation for both GPU and CPU compositors. So I suspect we will likely end up having more duplicate and complex code than what we have now.
Brecht Van Lommel reviewed 2023-10-09 19:54:26 +02:00
@ -454,0 +493,4 @@
* even this compositor evaluation. This is useful for multi-view images, since the compositor
* is dispatched multiple times for each of the views, so we need a global resource to add all
* views to the same EXR image. The EXR is then only written once the last view was added. */
void *exr_handle = IMB_exr_get_handle_name(image_path);

Does this exr handle leak when a multiview render is interrupted?

Does this exr handle leak when a multiview render is interrupted?
Author
Member

I am not sure, but if the render pipeline can be interrupted before the last view is executed, which seems to be the case looking at the code, then I guess yes, it will leak. This seems to be the case for the CPU compositor as well, so I guess this mechanism can't be used anyways ...

I am not sure, but if the render pipeline can be interrupted before the last view is executed, which seems to be the case looking at the code, then I guess yes, it will leak. This seems to be the case for the CPU compositor as well, so I guess this mechanism can't be used anyways ...
Author
Member

Closed in favour of #113982.

Closed in favour of #113982.
Omar Emara closed this pull request 2023-11-02 11:10:23 +01:00

Pull request closed

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
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#113204
No description provided.