Cycles: adaptive sampling improvements #74581

Open
opened 2020-03-09 18:23:01 +01:00 by Brecht Van Lommel · 28 comments
  • Optimize PMJ pattern generation, and generate more samples

  • Solve issues with combined CPU and GPU not using the same amount of samples. Possibly by using a higher adaptive step for both CPU and GPU.

  • Render multiple small times at the same time for GPU, to allow adaptive sampling to stop and match CPU without too much performance impact.

  • Denoising can detect patterns due to adaptive sampling only working per tile. (#79190)

  • Detect errors in larger windows or using some hierarchical methods, as the simple 3x3 window fails for noisy scenes

  • Analyze different error metrics, and consider adding some user control over this

- [x] Optimize PMJ pattern generation, and generate more samples - [x] Solve issues with combined CPU and GPU not using the same amount of samples. Possibly by using a higher adaptive step for both CPU and GPU. - [x] Render multiple small times at the same time for GPU, to allow adaptive sampling to stop and match CPU without too much performance impact. - [x] Denoising can detect patterns due to adaptive sampling only working per tile. (#79190) - [ ] Detect errors in larger windows or using some hierarchical methods, as the simple 3x3 window fails for noisy scenes - [ ] Analyze different error metrics, and consider adding some user control over this
Author
Owner

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Author
Owner

Added subscriber: @brecht

Added subscriber: @brecht

#99135 was marked as duplicate of this issue

#99135 was marked as duplicate of this issue
Author
Owner

Added subscriber: @Stefan_Werner

Added subscriber: @Stefan_Werner

Added subscriber: @SteffenD

Added subscriber: @SteffenD

Added subscriber: @derekbarker

Added subscriber: @derekbarker

Will this allow us to render GPU at smaller tiles even when not using adaptive sampling? Because that would be a dream come true!

Will this allow us to render GPU at smaller tiles even when not using adaptive sampling? Because that would be a dream come true!

Added subscriber: @Russ1642

Added subscriber: @Russ1642

Without digging into the code it seems that adaptive sampling counts up to your render samples setting but won't change pixels if they're within your noise threshhold. It doesn't stop rendering when each pixel in the tile reaches the noise threshhold, it must keep running noise checks or something on every pixel for every sample.
Try this: With the default cube set the noise threshold to 0.1, minimum samples to 200, and the render samples to 10,000,000. It'll render the noisy tile and then spend minutes not changing the image at all but counting up to the 10,000,000 samples for no reason. Even for tiles that are entirely background. It seems this algorithm doesn't actually stop when the noise threshhold is reached.

Edit: This is for GPU rendering. CPU rendering doesn't do this.

Without digging into the code it seems that adaptive sampling counts up to your render samples setting but won't change pixels if they're within your noise threshhold. It doesn't stop rendering when each pixel in the tile reaches the noise threshhold, it must keep running noise checks or something on every pixel for every sample. Try this: With the default cube set the noise threshold to 0.1, minimum samples to 200, and the render samples to 10,000,000. It'll render the noisy tile and then spend minutes not changing the image at all but counting up to the 10,000,000 samples for no reason. Even for tiles that are entirely background. It seems this algorithm doesn't actually stop when the noise threshhold is reached. Edit: This is for GPU rendering. CPU rendering doesn't do this.
Member

Cooperative groups in CUDA 9+ should allow GPUs with SM 6.0 and newer to do adaptive sampling at the same granularity as the CPU.

Cooperative groups in CUDA 9+ should allow GPUs with SM 6.0 and newer to do adaptive sampling at the same granularity as the CPU.
Member

Added subscriber: @Alaska

Added subscriber: @Alaska

Added subscriber: @lsscpp

Added subscriber: @lsscpp

Added subscriber: @BeckersC

Added subscriber: @BeckersC

Added subscriber: @moisessalvador

Added subscriber: @moisessalvador

In #74581#922698, @Russ1642 wrote:
Without digging into the code it seems that adaptive sampling counts up to your render samples setting but won't change pixels if they're within your noise threshhold. It doesn't stop rendering when each pixel in the tile reaches the noise threshhold, it must keep running noise checks or something on every pixel for every sample.
Try this: With the default cube set the noise threshold to 0.1, minimum samples to 200, and the render samples to 10,000,000. It'll render the noisy tile and then spend minutes not changing the image at all but counting up to the 10,000,000 samples for no reason. Even for tiles that are entirely background. It seems this algorithm doesn't actually stop when the noise threshhold is reached.

Edit: This is for GPU rendering. CPU rendering doesn't do this.

Yes, it's weird. I've been wondering the same. In other software, adaptative sampling is supposed to give you an uniform noise all around, by stopping sampling on areas that otherwise would come out clean. But blender's one does almost like the opposite? It's hard to understand how it works. Yes, it saves some rendertime with the default settings but I couldn't tell you why

> In #74581#922698, @Russ1642 wrote: > Without digging into the code it seems that adaptive sampling counts up to your render samples setting but won't change pixels if they're within your noise threshhold. It doesn't stop rendering when each pixel in the tile reaches the noise threshhold, it must keep running noise checks or something on every pixel for every sample. > Try this: With the default cube set the noise threshold to 0.1, minimum samples to 200, and the render samples to 10,000,000. It'll render the noisy tile and then spend minutes not changing the image at all but counting up to the 10,000,000 samples for no reason. Even for tiles that are entirely background. It seems this algorithm doesn't actually stop when the noise threshhold is reached. > > Edit: This is for GPU rendering. CPU rendering doesn't do this. Yes, it's weird. I've been wondering the same. In other software, adaptative sampling is supposed to give you an uniform noise all around, by stopping sampling on areas that otherwise would come out clean. But blender's one does almost like the opposite? It's hard to understand how it works. Yes, it saves some rendertime with the default settings but I couldn't tell you why

Added subscriber: @Harvester

Added subscriber: @Harvester

Added subscriber: @Defka

Added subscriber: @Defka
Contributor

Added subscriber: @Raimund58

Added subscriber: @Raimund58
Brecht Van Lommel changed title from Adaptive Sampling Improvements to Cycles: adaptive sampling improvements 2021-10-28 15:06:45 +02:00

Added subscriber: @slowburn

Added subscriber: @slowburn

Added subscriber: @melak47

Added subscriber: @melak47

Added subscriber: @IHaveThatPower

Added subscriber: @IHaveThatPower

Added subscriber: @intracube

Added subscriber: @intracube

Added subscriber: @JamesBarrie

Added subscriber: @JamesBarrie
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

If this is still considered at this point in time, BF Blender 2.90 seems to be off...

If this is still considered at this point in time, `BF Blender 2.90` seems to be off...
Author
Owner

Added subscriber: @3di

Added subscriber: @3di

Removed subscriber: @moisessalvador

Removed subscriber: @moisessalvador

This issue was referenced by 857bb1b5ec

This issue was referenced by 857bb1b5ecf30aa95ecacd16ccdf36a3ccd7db50
Brecht Van Lommel added this to the Render & Cycles project 2023-02-07 19:08:06 +01:00
Brecht Van Lommel added
Priority
Normal
and removed
Priority
High
labels 2023-02-07 19:15:24 +01:00
Philipp Oeser removed the
Interest
Render & Cycles
label 2023-02-09 14:01:28 +01: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 Assignees
19 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#74581
No description provided.