Cycles tiling artifacts with path guiding and caustics #113799
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#113799
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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-10-10.0.22621-SP0 64 Bits
Graphics card: AMD Radeon(TM) Graphics ATI Technologies Inc. 4.6.0 Core Profile Context 23.8.1.230810
Blender Version
Broken: version: 4.0.0 Beta, branch: blender-v4.0-release, commit date: 2023-10-02 01:10, hash:
883033a0969f
Worked: (newest version of Blender that worked as expected)
Short description of error
Rendering artifacts on cycles. As soon as increasing rendering resolution. (probably when tiled rendering takes place).
Exact steps for others to reproduce the error
Where I think problems are
Those images look like Path Guiding was turned on, a CPU only feature, however the .blend attached is set to use the GPU for render. Can you confirm whether you were rending on CPU w/Path Guiding, or just on the GPU?
Does this occur for you if you shrink the final render resolution and also shrink the Tile size in
Render properties
->Performance
->Memory
->Tile size
. I tried a smaller image with correspondingly smaller tiles and did not observe the artifacts here at least.As always, please try with a more recent version of the 4.0 beta in case problems have been fixed in the past 2 weeks.
The issue still Appears on the latest build.
Following your answer, I pulled the latest commit on blender4.0 & built blender again (today 8:00 AM at GMT+6). Also set the cycles device to "cpu" and path guiding "on".
More details:
Artifact on (960x540) resolution:
Artifact on 4k resolution:
tilesize:2048
Note: increasing tiling size should not be a workaround to fix rendering artifacts. Because obviously there will be a point where we users can not increase tiling any more (tiling was introduced for exact same reason i believe).
I can confirm this issue with CPU rendering with Path Guiding in 3.6 and 4.0.
I have an idea on what might be causing this.
Path Guiding generates a structure to store information about how rays should be guided. The structure is filled with useful information as samples are taken in different parts of the scene/structure.
What I believe is happening is that with tiling enabled, the "left" side the structure is filled out with information while the tile is on the left, while the "right" side of the structure gets very little information due to rays rarely going to that side. Then when the tile goes to the right side of the image, Path Guiding training has stopped (because the 128 training samples have been used up), and the rays on the right tile have to rely on the poorly formed Path Guiding structure, resulting in noticeable artifacts.
If tiling is off, then both the left and right side of the structure are filled out with information fairly evenly throughout the render, meaning there's no issues of "poorly formed" structures inside the camera view.
Here's some "simple" ideas from the code side on how to fix it:
If tiling is active, turn off the Path Guiding training limit, meaning training is happening all the time.CC @brecht and/or @Sebastian-Herholz to weigh in on what should be done.
Cycles rendering artifact when rendering at 3840x2160 render resolutionto Cycles tiling artifacts with path guiding and causticsThis is a known limitation of the path guiding implementation currently. First is that it's not really designed to render caustics like this, it can find them sometimes but the probably is low and so it will not do so consistently across tiles or different frames in an animation.
Something along these lines is probably the right solution, but it of course has downsides.
More generally, the issue is that we don't have an efficient way to render these caustics, and if we had a dedicated mechanism for that it would sidestep this problem somewhat.
The observation of @Alaska is right. Path guiding does not work well together with tiled rendering.
The training of the guiding structures works best when we have samples from rendering the full image.
This way, we gather information about the whole light transport of the scene at once, and information from paths originating from multiple image regions can be shared.
At the moment, there exists no guiding method, which is based on online learning, that works well with tiled rendering.
The easiest (short-term) solution would be to disable path guiding when the user needs to use tiled rendering or vice-versa (i.e., disable tiled rendering when path guiding is enabled).
The best (long-term) solution, in my opinion, is the one also proposed by @Alaska, is to have a pre-rendering path using a lower resolution to learn the guiding structure and then switch to full-resolution tiled rendering when the training is done.
One could even think about jittering the samples in the training phase in such a way that the samples are splatted in a high-resolution buffer (e.g., rendering every odd pixel in the first iteration and every even in the second).
@brecht is there an easy way to achieve the first solution for now?
It's certainly possible to disable path guiding or tiled rendering automatically, but I don't think doing either silently is a good user interface. Reporting and error with a suggestions to use disable tiling seems better to me (through
device->set_error
).But, it may also be that case that path guiding works fine with tiling for less challenging scenes? The same kind of scenes where there is enough coherency for animation perhaps? There is also some amount of overlapping pixels between tiles. If that is common, it would be good to still allow users to use both together.
From what i think, If path guiding fills up PGS at the start of the rendering, how about:
@Alaska I'm doing a fair amount of large renders (between 10000 and 20000px) and often those scenes cannot fit into VRAM, so I'm left with rendering on a CPU with tiles.
Having the ability to bake PG on lower res image - lets say 50% of the final size - would be absolutely great to have.
PG paths could be also stored for faster re-renders as part of persistent data option if nothing in the scene have changed.