Lights too dark

I'm currently playing with the lights for my terrain, but all the results are much too dark :frowning:

How can I change it? I want a very bright sun, the whole scene looks very dark whith this!



      DirectionalLight light = new DirectionalLight();
      // Enable the light
      light.setEnabled(true);
      light.setShadowCaster(true);
      light.setDiffuse(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
      light.setAmbient(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));

      lightState.detachAll();
      lightState.attach(light);

      light.setDirection(new Vector3f(1, -0.5f, 1));

titi said:

I'm currently playing with the lights for my terrain, but all the results are much too dark :(
How can I change it? I want a very bright sun, the whole scene looks very dark whith this!


      DirectionalLight light = new DirectionalLight();
      // Enable the light
      light.setEnabled(true);
      light.setShadowCaster(true);
      light.setDiffuse(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
      light.setAmbient(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));

      lightState.detachAll();
      lightState.attach(light);

      light.setDirection(new Vector3f(1, -0.5f, 1));




Add:

light.setAttenuate(true);
light.setConstant(.01f);
light.setLinear(.001f);
light.setQuadratic(.001f);


Well thanks, but I don't see any effects if I add those lines  :?

What's wrong?

I'm sorry–you have a DirectionalLight there. Attenuation does nothing to those. I am unsure of how to help you.

Oh, wait. Change the material states of your objects to be brighter when light hits them.