BSDF Weighting Issue with MultiGGX #51836

Closed
opened 2017-06-18 07:07:55 +02:00 by Lukas Stockner · 10 comments
Member

While looking into D2677, I just noticed an obvious issue in the current master (b94a433ca3, to be precise):

Under certain settings, the results of Branched PT and regular PT will be completely different.

For example, take a default scene and set the cube to use a Principled BSDF with MultiGGX and Specular=Roughness=1, then render with BPT and PT. The BPT version will be more than twice as bright.

I'll look into this, I just thought I'd formally report it as a bug to make sure that this is known considering how close 2.79 is.

While looking into [D2677](https://archive.blender.org/developer/D2677), I just noticed an obvious issue in the current master (b94a433ca34, to be precise): Under certain settings, the results of Branched PT and regular PT will be completely different. For example, take a default scene and set the cube to use a Principled BSDF with MultiGGX and Specular=Roughness=1, then render with BPT and PT. The BPT version will be more than twice as bright. I'll look into this, I just thought I'd formally report it as a bug to make sure that this is known considering how close 2.79 is.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @LukasStockner

Added subscriber: @LukasStockner
Lukas Stockner self-assigned this 2017-06-18 07:08:31 +02:00
Author
Member

Added subscribers: @brecht, @Sergey, @PascalSchon

Added subscribers: @brecht, @Sergey, @PascalSchon
Author
Member

Okay, so a bit of testing showed that this is actually not caused by the Principled BSDF at all, it's already a problem in 2.78:

To reproduce the issue, take the default scene, remove the lamp and set the cube to diffuse (1,1,1). It will be exactly the same color as the world since its albedo is 1.
Then, set it to MultiGGX glossy with color (1,1,1) and roughness 1. Again, albedo is 1 so it's invisible.
But, when you mix the two closures with factor 0.5, it suddenly gets darker in PT, but not in BPT.

I think this is caused by the approximate PDF - while the paper points out that using an approximate PDF for MIS is fine, I'm now fairly sure that that refers to the two-sample MIS applied to light sampling vs. bsdf sampling, NOT applying one-sample MIS to closure picking. I'll look into getting this fixed.

Okay, so a bit of testing showed that this is actually not caused by the Principled BSDF at all, it's already a problem in 2.78: To reproduce the issue, take the default scene, remove the lamp and set the cube to diffuse (1,1,1). It will be exactly the same color as the world since its albedo is 1. Then, set it to MultiGGX glossy with color (1,1,1) and roughness 1. Again, albedo is 1 so it's invisible. But, when you mix the two closures with factor 0.5, it suddenly gets darker in PT, but not in BPT. I think this is caused by the approximate PDF - while the paper points out that using an approximate PDF for MIS is fine, I'm now fairly sure that that refers to the two-sample MIS applied to light sampling vs. bsdf sampling, NOT applying one-sample MIS to closure picking. I'll look into getting this fixed.
Lukas Stockner changed title from Principled BSDF Weighting Issue with MultiGGX to BSDF Weighting Issue with MultiGGX 2017-06-18 08:04:19 +02:00
Author
Member

Okay, some more testing clearly shows that the approximate PDF causes the issue.

I've also found a missing factor in the current approximation that improves the situation somewhat, see P500.
But, while it fixes what definitely is a bug, it may also change render results compared to 2.78, which is why I didn't commit it yet. Any thoughts on how to handle this?

Also, of course it doesn't fix the underlying issue. In theory it would help to not include MultiGGX closures in the MIS weighting, but in practice I'd expect the noise impact to outweigh the correctness improvement.
Another improvement would be possible for the PDF approximation itself, which currently is fairly simple (singlescattering GGX + diffuse term to account for the GGX darkening). However, since the general PDF depends on four dimensions (phi of incoming and outgoing direction as well as theta difference and roughness), finding a perfect fit is fairly unlikely...

Considering this problem, for 2.79 I'd recommend making singlescattering GGX the standard for the Principled BSDF. That way, it should also be possible to use more accurate sampling weights without changing the result.

Okay, some more testing clearly shows that the approximate PDF causes the issue. I've also found a missing factor in the current approximation that improves the situation somewhat, see [P500](https://archive.blender.org/developer/P500.txt). But, while it fixes what definitely is a bug, it may also change render results compared to 2.78, which is why I didn't commit it yet. Any thoughts on how to handle this? Also, of course it doesn't fix the underlying issue. In theory it would help to not include MultiGGX closures in the MIS weighting, but in practice I'd expect the noise impact to outweigh the correctness improvement. Another improvement would be possible for the PDF approximation itself, which currently is fairly simple (singlescattering GGX + diffuse term to account for the GGX darkening). However, since the general PDF depends on four dimensions (phi of incoming and outgoing direction as well as theta difference and roughness), finding a perfect fit is fairly unlikely... Considering this problem, for 2.79 I'd recommend making singlescattering GGX the standard for the Principled BSDF. That way, it should also be possible to use more accurate sampling weights without changing the result.

Changing the default to single scatter GGX is fine with me.

Changing the default to single scatter GGX is fine with me.

This issue was referenced by blender/cycles@0c2fd7c364

This issue was referenced by blender/cycles@0c2fd7c3641f9db3c7eb43a55aaafa75792d8144

This issue was referenced by 8cb741a598

This issue was referenced by 8cb741a598d6898328e0666c2cafddaaf9d830fd

Added subscriber: @SteffenD

Added subscriber: @SteffenD
Author
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#51836
No description provided.