Zero lights vs zero-intensity light

I’ve encountered a strange artifact.

I’ve introduced a simple sphere (metallic = 0, roughness = 1). I’ve added an hdr environment that definitely adds illumination to the sphere. Here’s what’s odd.

I’m exploring the question of is 100% of the illumination coming from the environment map. I’ve removed lights from the renderer (via [vtkRenderer::RemoveAllLights]9https://vtk.org/doc/nightly/html/classvtkRenderer.html#aa49f2f2122bdde42bc6afd02fe70c2fb). When rendering I get the following representative image:


Image 1: All lights removed

However, if I add a single light whose intensity is set to zero, I get a slightly darker sphere.


Image 2: Single zero-intensity light

Am I doing something wrong? Is there a preferred basis for doing environment-only illumination?

Addendum: when I changed the roughness to 0.5, I think I detected the difference. Calling RemoveAllLights() is insufficient to remove all lights. A default light gets added back in. The pair of images above become the following pair with roughness equal to 0.5.

Note the light specular spot in the first image where there would ostensibly be zero lights.


Image 1: Only calling remove all lights. We still have the default light creating a white specular dot in the center of the sphere.


Image 2: Zero-intensity light added.

You need to call vtkRenderer::AutomaticLightCreationOff() instead of removing lights.

Always one more function. I should just read through the header and mentally file every API.

Thanks!

1 Like