Remove Z Buffer from ImBuf #109687

Merged
Sergey Sharybin merged 4 commits from Sergey/blender:imbuf_z_buffer into main 2023-07-04 17:03:10 +02:00

It was only used by OpenEXR and Iris images, and saving the Z Buffer
in those formats was disabled by default. This option comes from the
times prior to the addition of the Multilayer EXR.

It also worth noting that it was not possible to save Iris with Depth
pass from Blender as internally it is called IRIZ format and it was
not exposed. But even after exposing this format option something still
was missing as saving and loading ITIZ did not show up the Depth pass.

The reason of removal is to make it a more clear match of the ImBuf
with a render pass, and use it instead of a custom type in the render
result and render pass API. This will simplify the API and also avoid
stealing buffers and making shallow copies when showing the render
result.

For the cases when Depth is needed a Multilayer EXR is to be used,
as most likely more than just the Depth will be needed.

On a user level this change:

  • Removes the "Z Buffer" option from the interface.

  • It preserves existing sockets in compositor nodes, but it will
    output black image. Also changing the image data-block will
    remove the socket unless a Multilayer EXR with Depth pass image
    is selected.

  • Removes "Depth" socket of the Viewer and Composite nodes.

Ref #108618

It was only used by OpenEXR and Iris images, and saving the Z Buffer in those formats was disabled by default. This option comes from the times prior to the addition of the Multilayer EXR. It also worth noting that it was not possible to save Iris with Depth pass from Blender as internally it is called IRIZ format and it was not exposed. But even after exposing this format option something still was missing as saving and loading ITIZ did not show up the Depth pass. The reason of removal is to make it a more clear match of the ImBuf with a render pass, and use it instead of a custom type in the render result and render pass API. This will simplify the API and also avoid stealing buffers and making shallow copies when showing the render result. For the cases when Depth is needed a Multilayer EXR is to be used, as most likely more than just the Depth will be needed. On a user level this change: - Removes the "Z Buffer" option from the interface. - It preserves existing sockets in compositor nodes, but it will output black image. Also changing the image data-block will remove the socket unless a Multilayer EXR with Depth pass image is selected. - Removes "Depth" socket of the Viewer and Composite nodes. Ref #108618
Sergey Sharybin added the
Module
Core
label 2023-07-04 09:59:02 +02:00
Sergey Sharybin added 1 commit 2023-07-04 09:59:15 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
cd360e5843
Remove Z Buffer from ImBuf
It was only used by OpenEXR and Iris images, and saving the Z Buffer
in those formats was disabled by default. This option comes from the
times prior to the addition of the Multilayer EXR.

It also worth noting that it was not possible to save Iris with Depth
pass from Blender as internally it is called IRIZ format and it was
not exposed. But even after exposing this format option something still
was missing as saving and loading ITIZ did not show up the Depth pass.

The reason of removal is to make it a more clear match of the ImBuf
with a render pass, and use it instead of a custom type in the render
result and render pass API. This will simplify the API and also avoid
stealing buffers and making shallow copies when showing the render
result.

For the cases when Depth is needed a Multilayer EXR is to be used,
as most likely more than just the Depth will be needed.

On a user level this change:

- Removes the "Z Buffer" option from the interface.

- It preserves existing sockets in compositor nodes, but it will
  output black image. Also changing the image data-block will
  remove the socket unless a Multilayer EXR with Depth pass image
  is selected.

Ref #108618
Author
Owner

@blender-bot build

@blender-bot build
Sergey Sharybin added 1 commit 2023-07-04 10:57:13 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
ba3df93b12
Fix compositor crash
Code was still accessing removed socket of the Viewer node.
Author
Owner

@blender-bot build

@blender-bot build
Sergey Sharybin changed title from Remove Z Buffer from ImBuf to WIP: Remove Z Buffer from ImBuf 2023-07-04 11:18:23 +02:00
Sergey Sharybin changed title from WIP: Remove Z Buffer from ImBuf to Remove Z Buffer from ImBuf 2023-07-04 11:23:33 +02:00
Author
Owner

There is one thing which got me confused (hence some spam around WIP status): the Z input socket of the Composite node.

Seems that it only allows to save Depth pass to non-multilayer EXR when "Z Buffer" output option is enabled. I could not get it to work with the Multilayer EXR. Surely maybe I am missing something in my setup.

I think the viewport compositor run into issues with this socket as well, so given its limited and confusing state, maybe it is cleaner to remove it?

There is one thing which got me confused (hence some spam around WIP status): the Z input socket of the Composite node. Seems that it only allows to save Depth pass to non-multilayer EXR when "Z Buffer" output option is enabled. I could not get it to work with the Multilayer EXR. Surely maybe I am missing something in my setup. I think the viewport compositor run into issues with this socket as well, so given its limited and confusing state, maybe it is cleaner to remove it?
Sergey Sharybin requested review from Brecht Van Lommel 2023-07-04 11:29:02 +02:00

Yes, I think we should remove that socket as well.

Yes, I think we should remove that socket as well.
Sergey Sharybin added 1 commit 2023-07-04 11:53:01 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
73d0470993
Remove Depth socket of the Composite Output
Author
Owner

@blender-bot build

@blender-bot build
Brecht Van Lommel requested changes 2023-07-04 15:20:51 +02:00
Brecht Van Lommel left a comment
Owner

I think z_buffer can now also trivially be removed from RE_pipeline.h, but maybe that's intended as a separate PR?

I think `z_buffer` can now also trivially be removed from `RE_pipeline.h`, but maybe that's intended as a separate PR?
@ -240,3 +228,3 @@
if (number_of_outputs > 3) {
else {
/* happens when unlinking image datablock from multilayer node */
for (int i = 3; i < number_of_outputs; i++) {

Change 3 to 2.

Change 3 to 2.
Sergey Sharybin added 1 commit 2023-07-04 15:28:24 +02:00
Author
Owner

I think z_buffer can now also trivially be removed from RE_pipeline.h, but maybe that's intended as a separate PR?

Indeed. I am preparing a separate PR from it, as it will be no-functional-changes, so easier to look through and bisect and such.

> I think z_buffer can now also trivially be removed from RE_pipeline.h, but maybe that's intended as a separate PR? Indeed. I am preparing a separate PR from it, as it will be no-functional-changes, so easier to look through and bisect and such.
Brecht Van Lommel approved these changes 2023-07-04 15:32:40 +02:00
Sergey Sharybin merged commit e1b60fdb91 into main 2023-07-04 17:03:10 +02:00
Sergey Sharybin deleted branch imbuf_z_buffer 2023-07-04 17:03:11 +02:00
Sign in to join this conversation.
No reviewers
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
2 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#109687
No description provided.