Point Light Produces a Visible Cone

Hi, I am a bit confused over what I thought would be the simple task of adding some point lights to a scene. I would expect them to produce an even circle of light around their origin (over flat ground), but instead I see a very distinct triangle or cone of color emanating from the point. I’ve uploaded a screenshot to better describe the result.

Here’s how I’m adding them:

self.plight = PointLight(‘plight’)
self.plight.setColor((1, 2, 1, 1))
self.plnp = render.attachNewNode(self.plight)
render.setLight(self.plnp)

I think I’m missing something more fundamental about how a light interacts with the scene, but I’m not sure where to start. Any help is appreciated!

If you disable one of the lights, does the apparent colour of the floor change?

If so, then I suspect that the lights are affecting the entire floor to a degree that leaves it seeming flat-shaded, and that the the cones that you’re seeing are their specular highlights shining along the floor between you and them.

I added multiple lights mostly to test/illustrate the problem, but no, disabling all but one of the lights in my scene sadly does not help.

That said, I do think your explanation is correct. The beam of light is always from the light source toward the camera (rotating the camera rotates the cones). Can you elaborate on the specular highlights shining on the floor between them and the camera? Were I to keep my floor relatively flat, how would I get around or minimize this?

What you are seeing is the specular highlight, not the regular diffuse reflection.

What have you set the light’s attenuation to? For a realistic effect you need to set it to an inverse falloff, see the manual for the right parameters to do that.

It might also be worth playing with your floor’s specularity/“shininess” value–zeroing that or setting it to its maximum (I’m not sure of which, offhand) might remove the highlight or constrain it to an area closer to the source.

It sounds like the problem isn’t primarily that there’s a specular reflection, but rather that there’s no diffuse reflection. Adjusting the shininess value will only change the size of the specular highlight.

I have played around with attenuation parameters, and those will change the cones’ reach and distance but they still consistently stretch from the point toward the camera. I have yet to produce the effect “above” the light source (on the flat plane).

*edit: I see that I am interested in the diffuse reflection as opposed to the specular highlight. Should I be examining material properties to troubleshoot?

Like most, if not all, 3D game rendering stuffs, Panda3D’s lights don’t actually “illuminate” things. They mostly act like “Hey floor, I am a light, now you lit up!” Then the floor says, “Oh okay, I lit up now!”

So it means that you should try to adjust the materials of your model, in your case, the floor. The floor should at least have a diffuse color to be lit up, and it should has a less specular factor if you don’t like the cone. For example, if you use Blender2.8, on the Material Properties, the Base Color is the Diffuse Color on 2.7. Blender also set the Specular to 0.5, which is actually high, so you may want to turn it down a bit.

1 Like

I am in fact using Blender 2.8, and your advice was exactly what I needed. Turning down the Specular property on the floor’s material did the trick. Thanks!