Artefacts on render passes Shadow and Diffuse Direct when rendering image texture with zero value in a channel
Open, ConfirmedPublic

Description

System Information
Windows 7 Ultimate, 64-bit SP1
GeForce GTX 750 Ti

Blender Version
version: 2.79 (sub 1), branch: master, commit date: 2017-10-10 07:26, hash: 8d73ba5, type: Release
build date: Tue 10/10/2017, 10:00 AM

Short description of error
Artefacts on render passes Shadow and Diffuse Direct when rendering image texture with zero value in a channel. The scene is lighted with 3 spots each absolute red, green and blue.

Exact steps for others to reproduce the error

  • Create a texture image file with absolute 0 spots in one channel. Or use this one:
  • Create a scene with 3 spots lights, each colored with an absolute red, green and blue color.
  • Add a random object with uvs
  • Assign the texture image file to the object (Tested with Principled BSDF, Diffuse BSDF, Toon BSDF).
  • Add Diffuse Direct and Shadow pass.
  • Render, get this:

Additionnal infos

  • Other channels render correctly
  • Scene is lighted only with direct lights, bounces are set to 0.
  • Clamping lowest values to 1 in the texture map resolves the artefact partially.
  • Also shortly tested on unix system.
  • Blender file:

Details

Type
Bug
Bruno Ortolland (Noss) renamed this task from Artefacts on render passes Shadow and Diffuse Direct when rendering image texture with zero value in a channel. to Artefacts on render passes Shadow and Diffuse Direct when rendering image texture with zero value in a channel.
Brecht Van Lommel (brecht) triaged this task as Confirmed priority.Wed, Oct 18, 11:48 PM

I can confirm the issue, though I'm not sure we can come up with a good solution for this.

If some part of a shader reflects no light (either entirely or for a single channel), we do not compute that reflection. It would be a waste of computation and have no clear physical meaning. This means we then can't recover a pass like diffuse direct for such areas. We have some tricks for trying to do it anyway, but that fails when combined with colored lights.

A solution could be to automatically set zero color channels to some small non-zero value, with the justification that such color would be unlikely to be found in reality and that such "extreme" colors just happen to be set because it's easy in color pickers. But I expect we'd get bug reports about that behavior as well.