# Zero lights vs zero-intensity light

**URL:** https://discourse.vtk.org/t/zero-lights-vs-zero-intensity-light/12457
**Category:** Development
**Created:** [October 9, 2023, 4:54pm UTC](https://discourse.vtk.org/t/zero-lights-vs-zero-intensity-light/12457 "2023-10-09T16:54:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Sean\_Curtis](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sean_curtis/32/718_2.png) [@Sean\_Curtis](https://discourse.vtk.org/u/Sean_Curtis)
#### Post date: [October 9, 2023, 4:54pm UTC](https://discourse.vtk.org/t/zero-lights-vs-zero-intensity-light/12457/1 "2023-10-09T16:54:00Z")

</div>

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](https://discourse.vtk.org/uploads/default/original/2X/7/7389bcda6d10eed87ba235130b388745378d2a80.jpeg)  
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](https://discourse.vtk.org/uploads/default/original/2X/2/261e0d58b24b182c94ffbd77f318478835844bf3.jpeg)  
Image 2: Single zero-intensity light

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

---

<div class="post-metadata">

### Author: ![Sean\_Curtis](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sean_curtis/32/718_2.png) [@Sean\_Curtis](https://discourse.vtk.org/u/Sean_Curtis)
#### Post date: [October 9, 2023, 5:00pm UTC](https://discourse.vtk.org/t/zero-lights-vs-zero-intensity-light/12457/2 "2023-10-09T17:00:55Z")

</div>

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](https://discourse.vtk.org/uploads/default/original/2X/3/34450823ba4455d14443d925e2a88583ecf84b0c.jpeg)  
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](https://discourse.vtk.org/uploads/default/original/2X/e/e3544efd97be49b34ff2edb3dc25792285eb8e2e.jpeg)  
Image 2: Zero-intensity light added.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [October 9, 2023, 5:10pm UTC](https://discourse.vtk.org/t/zero-lights-vs-zero-intensity-light/12457/3 "2023-10-09T17:10:37Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Sean\_Curtis](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sean_curtis/32/718_2.png) [@Sean\_Curtis](https://discourse.vtk.org/u/Sean_Curtis)
#### Post date: [October 9, 2023, 5:11pm UTC](https://discourse.vtk.org/t/zero-lights-vs-zero-intensity-light/12457/4 "2023-10-09T17:11:56Z")

</div>

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

Thanks!
