Two equivalent shader which use "add shader" yield different results
Closed, ArchivedPublic

Description

The two equivalent shaders described below yield different results.
The bug is reproduced on both 2.63a and r48298 SVN, with CPU rendering.

The shader at the left of the attached image:
AddShader {
GlassBSDF{ RGB = 0.8, 0.0, 0.8 }
GlassBSDF{ RGB = 0.0, 0.8, 0.0 }
}

Right:
GlassBSDF{ RGB = 0.8, 0.8, 0.8 }

sergey (Sergey Sharybin) added a comment.Via Old WorldJun 29 2012, 11:11 AM

Brecht, could you please look on this? Thanks!

y-fujii (Yasuhiro Fujii) added a comment.Via Old WorldJul 2 2012, 12:12 PM

Additional information:

0. This problem seems to be independent from following condition.
- IOR value
- bounce limit
- connection order of the add shader input.

1. Mix shader also has this problem.

2. Glossy BSDF also has this problem.
- Glass BSDF, sharp distribution: incorrect, magenta-tinted (attached image)
- Glossy BSDF, sharp distribution: incorrect, magenta-tinted but incorrect region is small.
- (Glass|Glossy) BSDF, (Beckmann|GGX) distribution, roughness = 0.0: incorrect, green-tinted
- (Glass|Glossy) BSDF, (Beckmann|GGX) distribution, roughness = 0.01: correct, good convergence

Is this bug due to numerical instability?

brecht (Brecht Van Lommel) added a comment.Via Old WorldSep 28 2012, 5:20 PM

Looked into this, and it's actually noise that you are seeing here. If you see the minimum bounces higher, it will converge faster and you can see it becoming less purple, but still very slow. The high IOR and number of bounces mean that the path tracer has difficulty finding all paths, this would work better with e.g. a bidirectional path tracer.

There might be a way to make the sampling more clever here, and in this simple case we could do an optimization to merge the two closure, but would not consider this a bug, rather a todo item.

brecht (Brecht Van Lommel) closed this task as "Archived".Via Old WorldSep 28 2012, 5:20 PM

Add Comment