Some problems with lighting


I tried different DirectionalLight vectors and also testing with ambient light but still no effect. My objects on map are totally black at sides where isn’t any light. Can I somehow set some illumination level to make it a bit brighter?
Here’s a screen:

Also got another problem. Here’s a screen:

As you can see the shore is totally white! It reflects soo many light!. I tried offing all filters, removing water, setting shininess of sand to 0.0 in Terrain Editor, reinstalling JME, installing newest graphic card drivers and also combinating with almost 1000 of different DirectionalLight coords but still no effect ; /

add a ambient light with a lower gray color, to simulate(fake) diffuse lighting

if that does not add liight , then check that their material is responsing to lighting (eg lighting.j3md)
and check that they are allowed to recive ambientlight.

Currently I’m using: [java]
AmbientLight al = new AmbientLight();

but no effect. Also in Scene Composer I got attached ambient light but it work only for terrain

I think Empire Phoenix is on the right track here. Not all material respond to ambient light. Are the materials in the scene (other than the terrain material) set to respond to ambient light? Do you specify (for instance) setColor(“Ambient”, ColorRGBA.White) for Lighting.jm3d materials?

I got models from blender and I didn’t set any materials for models, because the textures are working.

You probably need to set the values for the material then (in blender or jme), as this is working as inteded but not as expected then.

Is it possible in JME to set somehow that value to whole scene/models? Or do I have to do that for each geometry material lol

You can writhe a recursive method, that goes trough all nodes down do the geometrys, and then get the material, and set the paramter for it if it exists, yes.

And what value should be set in blender ?

And maybe you know what’s wrong with problem 2

Well jus set the ambient to white should do the trick, and to ensure no other strange things, set specular and diffuse to white as well.