Advice for enhancing the lighting

Started by
11 comments, last by angelmu88 11 years, 12 months ago
Hi everyone!
I need some advice on my illumination. I’m making a graphic engine for a school project, after some tedious work with shadow maps I’d like to finish the lighting part. I’m not happy with the overall lighting results. To me, illumination seems very “artificial”, specially at night.
Here you are some pictures:
Day
http://img341.imageshack.us/img341/1144/imageday.jpg
Night
http://img18.imageshack.us/img18/4765/imagenight.jpg

I have no time for programming a global approximation like SSAO, I know this is a big limitation, but I’ve been thinking of a color correction post effect or maybe tweaking the “ambient+diffuse+specular” addition.
If you look at the pictures I’m using:
A directional light for the sun and the moon, with a (1.0f,1.0f,1.0f) color for the sun and a (0.3 0.3 0.4) color for the moon [darker and bluish]. Ambiental component also changes depending on the time of the day (a little bit darker at night). I’m using only ambient and diffuse component for most of the terrain. Anyway for those objects that use specular component, neither diffuse nor specular component are weighted, I mean I’m adding (difuse*texture + specular, instead of diffuse*testure*0.8 + specular*0.2).
Could you give me some advice for enhancing the result?
Here are some pictures of what I would like to get (of course I want something similar I know many of these games use some global illumination algorithm for ambient component calculation):
Night:
Visage half life 2 mod (it uses color correction for that eerie aspect):
http://media.moddb.com/cache/images/mods/1/15/14238/thumb_620x2000/hovgard3.jpg
Alan wake:
http://i0b.3djuegos.com/juegos/1023/alan_wake/fotos/analisis/alan_wake-1211281.jpg
Day:
Half life 2 lost coast:
http://tothegame.com/res/game/5099/feature/2006-09-27/screen7_large.jpg
My 3D graphic engine: http://graphicprogramming.wordpress.com/rebirthengine/
My blog: http://graphicprogramming.wordpress.com/
Advertisement
Look into distance fog/atmospheric scattering. If you have a depth map laying around, you can do it as a postprocessing effect, otherwise you can just throw it into the end of the vertex/pixel shader.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.

Look into distance fog/atmospheric scattering. If you have a depth map laying around, you can do it as a postprocessing effect, otherwise you can just throw it into the end of the vertex/pixel shader.


That can be useful for distant objects like the mountains, but if you look at this scene, I still have the same problem:
http://img856.imageshack.us/img856/9140/nearscene.jpg
My 3D graphic engine: http://graphicprogramming.wordpress.com/rebirthengine/
My blog: http://graphicprogramming.wordpress.com/
It is not only light but although the absence of light which creates a moody atmosphere.

For outdoor scene I would always sugguest to add shadows for the primary light source(sun/moon). To increase the quality of illuminition furthermore, try to add some kind of AO(SSAO), HDR, fog, atmospheric scattering and bloom.

It is not only light but although the absence of light which creates a moody atmosphere.


That's why I had thought of a color correction. With a color correction I can extract some color from the scene (like when we reduce the brightness).
Besides, I'm going to add shadows casted by sun and moon, but I thinks that's not enough. There's something in the overall color that doesn't look realistic to me.
Problem with color correction is that I haven't found a good one for my terrain.
My 3D graphic engine: http://graphicprogramming.wordpress.com/rebirthengine/
My blog: http://graphicprogramming.wordpress.com/
Hi,

So where are the shadows? I get impression that you have implemented shadow mapping, but I can't see any in the screen shots. Shadows = absence of light. Even with one simple projected shadow map from the main light source may give you a huge visual improvement.

Cheers!

Hi,

So where are the shadows? I get impression that you have implemented shadow mapping, but I can't see any in the screen shots. Shadows = absence of light. Even with one simple projected shadow map from the main light source may give you a huge visual improvement.

Cheers!


I've implemented shadows for all kind of lights except for directional (even for omnidirectional). I'm implementing cascaded shadow maps for directional light, giving the size of the terrain, but I haven't finished yet, that's why you can't see shadows in that scene (because there aren't wacko.png ). I know I am a bit stubborn, but I don't think shadows are the solution. I'm tweaking the light color a bit more right now (instead of using simply (1.0f, 1.0f, 1.0f) for daylight ).
My 3D graphic engine: http://graphicprogramming.wordpress.com/rebirthengine/
My blog: http://graphicprogramming.wordpress.com/
Is your ambient lighting only from a single colour? You could try using multi-directional ambeint, e.g. Half-Life uses 6 directions, so it's like a 1px cube-map for ambient lighting.float3 ambDir1 = float3(0,1,0);
float3 ambCol1 = float3(0.1, 0.1, 0.3);//blueish ambient light from above
ambient = saturate(dot(normal, ambDir1)) * ambCol1 + ...;
Another simple ambient light is a two-colour sky/horizon:ambient = lerp(horizonCol, skyCol, saturate(normal.y));

Is your ambient lighting only from a single colour? You could try using multi-directional ambeint, e.g. Half-Life uses 6 directions, so it's like a 1px cube-map for ambient lighting.float3 ambDir1 = float3(0,1,0);
float3 ambCol1 = float3(0.1, 0.1, 0.3);//blueish ambient light from above
ambient = saturate(dot(normal, ambDir1)) * ambCol1 + ...;
Another simple ambient light is a two-colour sky/horizon:ambient = lerp(horizonCol, skyCol, saturate(normal.y));


That could be nice!
I've seen in some games or engies like in the Syrim creation kit that tey also use multi-directional ambient, but I had no idea of what was the meaning of that term.
Problem is what colour should I use for every direction? like you said I can use a blueish from above, maybe something similar to white from below? Half life maybe computes it values on the go, with a dynamic algorithm like spherical harmonics, don't you think so?
Thanks
My 3D graphic engine: http://graphicprogramming.wordpress.com/rebirthengine/
My blog: http://graphicprogramming.wordpress.com/

[quote name='Hodgman' timestamp='1335192699' post='4934110']
Is your ambient lighting only from a single colour? You could try using multi-directional ambeint, e.g. Half-Life uses 6 directions, so it's like a 1px cube-map for ambient lighting.float3 ambDir1 = float3(0,1,0);
float3 ambCol1 = float3(0.1, 0.1, 0.3);//blueish ambient light from above
ambient = saturate(dot(normal, ambDir1)) * ambCol1 + ...;
Another simple ambient light is a two-colour sky/horizon:ambient = lerp(horizonCol, skyCol, saturate(normal.y));


That could be nice!
I've seen in some games or engies like in the Syrim creation kit that tey also use multi-directional ambient, but I had no idea of what was the meaning of that term.
Problem is what colour should I use for every direction? like you said I can use a blueish from above, maybe something similar to white from below? Half life maybe computes it values on the go, with a dynamic algorithm like spherical harmonics, don't you think so?
Thanks
[/quote]

Ok, I've just taken a look at skyrim creation kit, and the six values seem to be fixed depending on four part of the day (day, night, sunset, and sunrise) maybe I can use those same values.
My 3D graphic engine: http://graphicprogramming.wordpress.com/rebirthengine/
My blog: http://graphicprogramming.wordpress.com/

This topic is closed to new replies.

Advertisement