A PointLight with very hard edges

Is there a means of creating a light with a very hard falloff, and if so, how would I go about doing so?

To elaborate:
I want a light – preferably a PointLight – that has a significant effect in only a fairly small region, but which is nevertheless fairly bright within most of that region; imagine a fuzzy ball of light, with negligible effect outside of that ball and noticeable falloff only towards the edges. I’ve been playing with the quadratic term provided to “setAttenuation”, but thus far haven’t managed to produce the effect that I intend.

This is the formula used by the shader:

lattenv = 1/(latten.x + latten.y*ldist + latten.z*ldist*ldist);

where latten.x, latten.y, latten.z are the parameters in PointLight.setAttenuation()

You can use this spreadsheet to visualize the effect before even running any Panda script (even has a graph):
docs.google.com/spreadsheet/ccc … sp=sharing

I hope I’ve set it right so that people can actually edit that sheet.

Thank you for that. :slight_smile: