Noon sun light

I want to light up my level with noon sun light. When I go to blender and light up my level with a Sun light with the maximum intensity which is 10.00 I get a sun light which looks like it’s Five o’ clock in the evening. Also my level is a common size level, like the size of every level you would play on super mario 64 or the legend of zelda ocarina of time, you know a common size level.

So, how do put a sun light (directional light in Jmonkey) that illuminates my level properly?

Moreover, I don’t want to use an ambient light because it doesn’t create shadows on the normals of the geometries which doesn’t look like a real sun.

Your DirectionLight setup code looks fine to me from here. I may change my opinion when you post it.

Here’s the level. Just load it and let me know:

Level 1

I thought you created your DirectionalLight in code. I don’t really want to debug how the blender importer or whatever wants to import lights (if it even does).

Maybe someone else will help you.

@pspeed Here it is, this is the same as before but in code:

    [java] DirectionalLight sun = new DirectionalLight();
    sun.setColor(ColorRGBA.White);
    sun.setDirection(new Vector3f(-.5f,-.5f,-.5f).normalizeLocal());
    rootNode.addLight(sun);[/java] 

Right now I’m guessing the solution is that I have to use a directional light along with an ambient light in order to properly light up my scene. But I’ll await here for more educated answers.

In order to emulate a sun in jME the easiest way is to combine a DirectionalLight and an AmbientLight. You also probably want to add a shadowprocessor for the DirectionalLight.

I am not sure if this works and can’t try it out right now but you could also try to create a color with values > 1f. Should make the color brighter then usual, so you can have brighter light if it uses that color.

As mentioned, without an ambient light then things facing away from the sun will be totally black. So you probably want some ambient.

And yes, doubling the light color can be a good way to make the lit surfaces extra bright. ColorRGBA.White.mult(2) for the win.

Also useable for die of blindness style bloom effects with a light using 100f ^^

I just wanna say that even though in any game engine we need to use two light to make things work which is counter intuitive, it is really cool how customizable this makes it. :smiley:

@Pixelapp said: I just wanna say that even though in any game engine we need to use two light to make things work which is counter intuitive, it is really cool how customizable this makes it. :D

We need two lights because all computer lighting at this level is fake. In real life we don’t need an ambient light because the ambient light comes from bouncing off of all the other surfaces in a complex ballet of light and shadow.

Another way of solving this is putting a dim blue directional light coming from the bottom, supposedly it simulates the light from the atmosphere being reflected from the ground.

Regarding bright lights, its actually intended to be allowed (was not allowed in jME1/2). If you add an HDRRenderer to your scene, it will automatically adjust the exposure to ensure the scene looks correct even with bright lighting.