Viewport Compositing: Scale node does not render correctly, uses a lot of VRAM in 4.1 and crashes in 4.2 #120857
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#120857
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows 11
Graphics card: RTX 3090
Blender Version
Broken: 4.2 alpha (
026f8e8bdf
- 20/04/2024)Worked: 4.0
Short description of error
Since 4.1, Viewport compositing Scale using Render Size mode does not give identical results between Viewport and Final Compositing.
The Viewport Compositing of the attached graph also requires a lot more GPU memory, from 3GB to 12GB.
In 4.2, the scene crashes, randomly but 100% reproducible.
Exact steps for others to reproduce the error
The attached scene has a compositing graph that creates a fullscreen animated random value using a noise texture that is scaled to the render size and offset using Scene time.
I can confirm crash in latest 4.2.
But, for some reason, in today lite debug build, with msvc debugging, i getting:
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in blender.exe.
@OmarEmaraDev /
I can't reproduce the crash myself. Does anyone get a proper stack trace?
@chafouin Do you get any crash file written?
The crash txt file is empty for me.
Sorry, I misclicked on the "Comment and Close" button.
As mentioned above, that crash.txt file is empty.
With regards to the difference between the viewport and final render, this is expected and is a limitation of the viewport compositor, because it clips huge images to sizes that can fit on the GPU. Noting that you are creating images that are
262144 x 262144
in size, which can occupy hundreds of gigabytes of memory.As for the crash, it is probably related to that huge allocation, and I suspect it is not related to the viewport compositor, but rather, the CPU compositor. Can you try to confirm that by disabling backdrop, closing the image editor and just leaving the 3d view?
@chafouin I submitted a fix for review. But even with the fix, the huge image sizes you are working with will eventually prompt the OS to kill Blender. You need to fix your node tree to avoid the "scale by a factor of 512" bit. It is probably not intentional and not something you want anyways.
This used to work in 4.0 though, the Scale using Stretch is now stretching the entire image to the render resolution, instead of applying a simple ratio multiplier based on the render resolution.
Wow okay, I understand why its happening after the scaling, I didn't expect it to actually create such a large image... I know it's a dumb way to create a random value, but I was expecting it to give single pixel to the entire frame.
Having a random value node would be extremely helpful.
Indeed, it seems to be fine with just the Viewport compositing on. Thanks for looking into it and for the fix.
That's true, because in 4.0, we delayed transformations, so scaling never took place at the scale node. This was changed in 4.1 to match the CPU compositor. But GPUs have limitations on how large an image can be, hence the difference and clipping I mentioned. We will probably bring back the 4.0 behavior partially though.
This is planned. See #112732.