Fixed Light Range


sorry, i think this question is asked before but i don't find the thread. so, how can i fix the light range of a PointLight? i need a light that has a fixed strenght for 100meters (or some other unit, does no matter here) and than it's over??

It should highlight the terrain for a fixed range and everything else is dark or in shadow or something else. The goal is to mark the terrain around a node in a fixed radius

thank you


each Light has a method setAttenuation(), which you may use to achieve this.

But the attenuation is calculated by a formula… it’s components are the linear-, quadratic-, and constant-attenuation.

take a look here


yeah, i've seen that.

but this do not fix the range of the light to X (X=number). The light should have the full power for X and then the light is cut off.


ah i see… i missed the

has a fixed strenght for 100meters

This is definitely impossible with the attenuation.

Sorry, but i dunno how to achieve that.  :expressionless:

OpenGL Does have this functionality:


                           params is a single integer or floating-point value that specifies

                           the maximum spread angle of a light source.

                           Integer and floating-point values are mapped directly.

                           Only values in the range [0,90] and the special value 180

                           are accepted.

                           If the angle between the direction of the light and the direction from the

                           light to the vertex being lighted is greater than the spot cutoff angle,

                           the light is completely masked.

                           Otherwise, its intensity is controlled by the spot exponent and the

                           attenuation factors.

                           The initial spot cutoff is 180,

                           resulting in uniform light distribution.

It is also exposed in LWJGL in the calss org.lwjgl.opengl.GL11. The thing is that this is not used in jME as far as I know. It should be easy to add this functionality I think.

Nevermind… I messed up

another idea would be to use a projected texture to highlight the area