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


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 }

GlassBSDF{ RGB = 0.8, 0.8, 0.8 }


To Do

Brecht, could you please look on this? Thanks!

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?

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 Van Lommel (brecht) closed this task as "Archived".Sep 28 2012, 5:20 PM