Relative space #80562

Open
opened 2020-09-07 14:34:28 +02:00 by Monique Dewanchand · 7 comments

Currently when users change the render size percentage of a scene the compositor tree needs to be adjusted as a lot of composite nodes aren’t relative. This has a lot of impact on performance of the user and the system. This is part of https://developer.blender.org/T74491.

A solution can be to introduce a Pixel factor to any buffer in the compositor. The term Pixel Factor is not really correct, but I couldn’t come up with a better term. (suggestions are welcome).
The pixel factor is the scale factor between the used input buffer and the input buffer that would have been used when the render resolution percentage would have been set to 100%.

For render layers the pixel factor is the same as the render resolution percentage. For movie clips and images a pixel factor of 1 is used.

Nodes that use parameters in pixels could use this pixel factor to adjust its effect. Nodes that use multiple input buffers would select a pixel factor for the output buffer. This depends on the node, for example when mixing a render layer on a movie clip, the pixel factor closest to the pixel factor that would be used by the compositor node would be selected for the output buffer.

The compositor output node would scale the input buffers to match the scene render percentage.

There are nodes where the pixel factor won’t work:

  Glare Node: Iteration factor could be scaled, but could lead to different results.
  Filter Node: Uses a Convolution filter. When working on scaled down buffers this could lead to visual artifacts
  Despeckle: Uses arithmetic with the neighbour pixels. Might not have visual artifacts.

There is new compo implementation https://github.com/m-castilla/blender/tree/compositor-up but it seems that this branch doesn’t tackle this part of the ticket.

Questions:

  Is having a pixel factor the way to solve the problem?
  What should be done with the nodes that cannot work with a pixel factor?
  Should the Image/Movieclip pixel factor be dependent on the compositor output resolution? (Quality vs performance)
Currently when users change the render size percentage of a scene the compositor tree needs to be adjusted as a lot of composite nodes aren’t relative. This has a lot of impact on performance of the user and the system. This is part of https://developer.blender.org/T74491. A solution can be to introduce a Pixel factor to any buffer in the compositor. The term Pixel Factor is not really correct, but I couldn’t come up with a better term. (suggestions are welcome). The pixel factor is the scale factor between the used input buffer and the input buffer that would have been used when the render resolution percentage would have been set to 100%. For render layers the pixel factor is the same as the render resolution percentage. For movie clips and images a pixel factor of 1 is used. Nodes that use parameters in pixels could use this pixel factor to adjust its effect. Nodes that use multiple input buffers would select a pixel factor for the output buffer. This depends on the node, for example when mixing a render layer on a movie clip, the pixel factor closest to the pixel factor that would be used by the compositor node would be selected for the output buffer. The compositor output node would scale the input buffers to match the scene render percentage. There are nodes where the pixel factor won’t work: ``` Glare Node: Iteration factor could be scaled, but could lead to different results. Filter Node: Uses a Convolution filter. When working on scaled down buffers this could lead to visual artifacts Despeckle: Uses arithmetic with the neighbour pixels. Might not have visual artifacts. ``` There is new compo implementation https://github.com/m-castilla/blender/tree/compositor-up but it seems that this branch doesn’t tackle this part of the ticket. Questions: ``` Is having a pixel factor the way to solve the problem? What should be done with the nodes that cannot work with a pixel factor? Should the Image/Movieclip pixel factor be dependent on the compositor output resolution? (Quality vs performance)
Author
Member
Added subscribers: @monique, @semimetallic, @bent, @Mantissa, @MichaelHermann, @MrJoMo, @SeanKennedy, @JasonClarke, @BartekMoniewski, @3di, @laurelkeys, @Pipeliner, @MD.FahadHassan, @DarkKnight, @EAW, @BintangPratama, @frameshift, @LazyDodo, @brecht, @Jeroen-Bakker, @Sergey
Author
Member

response from @Sergey :

I assume the Pixel factor you’re referring to is a purely internal value. There is no reason for it to be exposed to the users: as far as artist is concerned thing should “just work”.

I do believe that for artists operating in pixel space is more natural. For example, blur of 16 pixels is more clear for them that blur of 0.0083 (which is 16 pixels normalized to FullHD resolution). Surely, sometimes it might be more clear to expose normalized transform (similar to Gimp’s scale where its possible to switch form pixel values to percentage), but to me introducing such “units” “toggles” is a separate topic.

The way I see it the mental model of nodes pretty much stays the same. The difference would be that the pixel values are in 100% render resolution space. So if one sets render resolution to 200% then the effective blur size becomes 32 pixels, and at 50% render resolution it becomes 8 pixels.

So in this terms the proposed Pixel factor seems to be aligned with the initial idea when #74491 was written down. Not sure why it should be per-buffer. To me it seems it should only be taken into account when the compositor tree is converted from bNode's to OperationNode's.

The Glare node has different issues: is single threaded. There should be another algorithm which will be multi-threaded. For the time being, having some half-decent approximate scaled result will be sufficient. Other nodes you mention here I think are expected to have possibly different pixel-to-pixel results (and you can’t scale down without artifacts in the current compositor anyway ;).

Are there any other “problematic” nodes?

The images/clips are to be perceived scaled according to the pixel factor, so that they work nicely for VFX shots.

response from @Sergey : I assume the Pixel factor you’re referring to is a purely internal value. There is no reason for it to be exposed to the users: as far as artist is concerned thing should “just work”. I do believe that for artists operating in pixel space is more natural. For example, blur of 16 pixels is more clear for them that blur of 0.0083 (which is 16 pixels normalized to FullHD resolution). Surely, sometimes it might be more clear to expose normalized transform (similar to Gimp’s scale where its possible to switch form pixel values to percentage), but to me introducing such “units” “toggles” is a separate topic. The way I see it the mental model of nodes pretty much stays the same. The difference would be that the pixel values are in 100% render resolution space. So if one sets render resolution to 200% then the effective blur size becomes 32 pixels, and at 50% render resolution it becomes 8 pixels. So in this terms the proposed Pixel factor seems to be aligned with the initial idea when #74491 was written down. Not sure why it should be per-buffer. To me it seems it should only be taken into account when the compositor tree is converted from bNode's to OperationNode's. The Glare node has different issues: is single threaded. There should be another algorithm which will be multi-threaded. For the time being, having some half-decent approximate scaled result will be sufficient. Other nodes you mention here I think are expected to have possibly different pixel-to-pixel results (and you can’t scale down without artifacts in the current compositor anyway ;). Are there any other “problematic” nodes? The images/clips are to be perceived scaled according to the pixel factor, so that they work nicely for VFX shots.
Author
Member

In repsonse to Sergey's comment:

  • Yes "pixel factor" is an internal value. Imho the user should only use the render resolution percentage.
  • Indeed, Pixel factor is not per buffer, but is set when nodes are converted to operations
  • For the time being I'll leave the glare node, filter and despeckle node as is. Re-implementing glare node should be done in a separate task. (Same for bilateral blur node which also doesn't seem correct).
  • Problematic nodes? There are some nodes that might need discussion. But let's tackle that one node at a time.
In repsonse to Sergey's comment: - Yes "pixel factor" is an internal value. Imho the user should only use the render resolution percentage. - Indeed, Pixel factor is not per buffer, but is set when nodes are converted to operations - For the time being I'll leave the glare node, filter and despeckle node as is. Re-implementing glare node should be done in a separate task. (Same for bilateral blur node which also doesn't seem correct). - Problematic nodes? There are some nodes that might need discussion. But let's tackle that one node at a time.

To me it seems we are in an agreement with how the system should work in this regard. Are there any open/loose ends of the design/discussion which needs to be covered prior to the implementation can start?

From the implementation side, to me it seems the natural step would be to implement the relative space for one node (and all related areas). Such approach will allow to verify we are on the same page, easily do any alternation to implementation if needed. What do you think?

To me it seems we are in an agreement with how the system should work in this regard. Are there any open/loose ends of the design/discussion which needs to be covered prior to the implementation can start? From the implementation side, to me it seems the natural step would be to implement the relative space for one node (and all related areas). Such approach will allow to verify we are on the same page, easily do any alternation to implementation if needed. What do you think?
Author
Member

Open/loose ends? not atm.
Agreed, I was planning to start with one node and deliver that as a patch. We can then discuss if the approach is okay or whether we need something else.

Open/loose ends? not atm. Agreed, I was planning to start with one node and deliver that as a patch. We can then discuss if the approach is okay or whether we need something else.

Added subscriber: @AditiaA.Pratama

Added subscriber: @AditiaA.Pratama
Philipp Oeser removed the
Interest
VFX & Video
label 2023-02-10 09:31:59 +01:00
Member

I am removing the Needs Triage label. This is under the general rule that Design and TODO tasks should not have a status.

If you believe this task is no longer relevant, feel free to close it.

I am removing the `Needs Triage` label. This is under the general rule that Design and TODO tasks should not have a status. If you believe this task is no longer relevant, feel free to close it.
Alaska removed the
Status
Needs Triage
label 2024-04-07 05:51:27 +02: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
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#80562
No description provided.