Fullframe compositor: unify scaling behavior with realtime compositor #114764

Merged
Habib Gahbiche merged 5 commits from zazizizou/blender:com-unify-scale into main 2023-12-26 12:58:56 +01:00
Member

This patch unifies the behavior of the scale node by removing the arbitrary limit of scaling images. The change applies for scale and transform node.

main this patch
Scaling before scale after scale
Scale undo Scale undo before Scale undo after

Note: with this change, Blender can crash for large resizing factors (around 10 000 x 10 000). We think it's very unlikely users will run into this issue, so we agreed errors coming from failed memory allocation won't be handled, as is the case for GPU compositor.

This patch unifies the behavior of the scale node by removing the arbitrary limit of scaling images. The change applies for scale and transform node. | | main | this patch | | ----------- | ----------- | ----------- | | Scaling | ![before scale](/attachments/d2ce1a41-a37f-4f55-b80a-03cfa6162c6e) | ![after scale](/attachments/1cf29788-9535-41a0-9f52-4d50b1a5da54) | |Scale undo | ![Scale undo before](/attachments/f0510bc7-6315-42c9-ad96-135d83146197) | ![Scale undo after](/attachments/5e4f3936-fb71-443c-a81a-e0e3457ce926) | Note: with this change, Blender can crash for large resizing factors (around 10 000 x 10 000). We think it's very unlikely users will run into this issue, so we agreed errors coming from failed memory allocation won't be handled, as is the case for GPU compositor.
Habib Gahbiche added 1 commit 2023-11-12 17:28:52 +01:00
Author
Member

@blender-bot build

@blender-bot build
Author
Member

@Jeroen-Bakker do you know the historic reasons behind limiting the image size for scale operation? I was not able to get Blender to crash when scaling images with very large factors, but the image viewer does seem to limit the maximum size of images. Do you think it's ok to eliminate this limitation in order to unify behavior with realtime compositor?

Note: GPU compositor does crash at somepoint when memory runs out, so maybe a limit should be considered to prevent the loss of unsaved files.

@Jeroen-Bakker do you know the historic reasons behind limiting the image size for scale operation? I was not able to get Blender to crash when scaling images with very large factors, but the image viewer does seem to limit the maximum size of images. Do you think it's ok to eliminate this limitation in order to unify behavior with realtime compositor? Note: GPU compositor does crash at somepoint when memory runs out, so maybe a limit should be considered to prevent the loss of unsaved files.
Author
Member

@OmarEmaraDev @Sergey maybe you have opinions here too...

@OmarEmaraDev @Sergey maybe you have opinions here too...
Member

@zazizizou There was no reason for size limiting, it is a documented limitation and the plan was to remove it. This is discussed in D12466.

The fact that the GPU compositor crashes for huge textures is a bug, and should be fixed, can you open a bug report for it? But the fact that it crashes due to insufficient memory might indicate that it is in fact killed, not crashed.

Ideally, we would have support for huge textures on the GPU as well, but this is not a short term target as was agreed before.

@zazizizou There was no reason for size limiting, it is a documented limitation and the plan was to remove it. This is discussed in D12466. The fact that the GPU compositor crashes for huge textures is a bug, and should be fixed, can you open a bug report for it? But the fact that it crashes due to insufficient memory might indicate that it is in fact killed, not crashed. Ideally, we would have support for huge textures on the GPU as well, but this is not a short term target as was agreed before.
Author
Member

I see thanks. Here is the report: #115043

I see thanks. Here is the report: #115043
Omar Emara requested review from Omar Emara 2023-11-21 14:39:25 +01:00
Sergey Sharybin added this to the Compositing project 2023-11-21 14:42:16 +01:00
Omar Emara requested changes 2023-11-21 15:39:24 +01:00
Omar Emara left a comment
Member

We still have an interenal limit of DEFAULT_MAX_SCALE_CANVAS_SIZE. Maybe remove max_scale_canvas_size_ entirely and adjust it users accordingly (Mask node only I think).

We still have an interenal limit of `DEFAULT_MAX_SCALE_CANVAS_SIZE`. Maybe remove `max_scale_canvas_size_` entirely and adjust it users accordingly (Mask node only I think).
Habib Gahbiche changed title from Fullframe compositor: unify scaling behavior with realtime compositor to WIP: Fullframe compositor: unify scaling behavior with realtime compositor 2023-11-21 17:30:45 +01:00
Habib Gahbiche added 4 commits 2023-12-26 11:12:45 +01:00
Habib Gahbiche changed title from WIP: Fullframe compositor: unify scaling behavior with realtime compositor to Fullframe compositor: unify scaling behavior with realtime compositor 2023-12-26 11:20:39 +01:00
Habib Gahbiche requested review from Omar Emara 2023-12-26 11:23:35 +01:00
Omar Emara approved these changes 2023-12-26 11:44:16 +01:00
Habib Gahbiche merged commit 57df35c8f9 into main 2023-12-26 12:58:56 +01:00
Habib Gahbiche deleted branch com-unify-scale 2023-12-26 12:58:58 +01: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#114764
No description provided.