Ambient light is a phony.

Started by
26 comments, last by cowsarenotevil 20 years, 7 months ago
I am planning to use something like irradiance environment-maps for the ambient lighting in my engine. Whether that''d be good or not, i don''t know. But i think it would look cool in outdoor scenes. And it is relatively cheap compared to radiosity .

It is only a texture lookup. As texcoord the normal in worldspace is used. And the irradiance environmap would be a downsampled and blurred version of the environment map.

Sounds cool, doesn''t it? But i would like to hear if this could replace the constant ambient term.

Advertisement
hWnd, if you go one step further, and store this irradiance map in high dynamic range format, then you''d have a HDRI irradiance map. The visual results are indeed very good for outdoor, as well as for static indoor environments. Look in the FAQ, there are a couple of links to Paul Debevec''s HDRI implementation. You can also download some test HDRI maps there.

You can easily extend this technique by a radiosity system later on, if you want. But in this case, the high dynamic range is important, as a simple 8bit RGB environment map doesn''t mix well with a radiosity algorithm.
OK thanks Yann, I will give it a try! If floating-point buffers are not available, I can still fall back to standard A8R8G8B8.
Take this real time example scene I was playing with:


I have a red and blue diffuse light(drawn in with MSPaint ), and then to simulate light bouncing off, I added another purple diffuse light(also drawn in with MSPaint). I tried replacing the 3rd diffuse light with purple ambient light, but I couldn''t get a good effect at all. I think well-placed diffuse lights usually give a better effect than ambient light, but maybe I''m just no good at getting the values right.
-~-The Cow of Darkness-~-
No, I think you''re right - well placed diffuse light sources do a better job than a simple ambient term.

However, setting up a simple ambient term is much easier than setting up "well placed" diffuse lights.

Also, if the diffuse lights cast shadows then it kinda ruins the effect btw.

Remember that website on radiosity (hugo elias'')
http://freespace.virgin.net/hugo.elias/radiosity/radiosity.htm

He shows his example of the difference between radiosity and no radiosity.
Notice in the "no radiosity" example he actually adds a directional light so you can at least see the geometry instead of just black with a little red.
If he had added just an ambient term it would have looked solid dark red (no way to see the pillar''s edges against the walls) and solid dark gray for the walls.


A directional light does wonders if you don''t want a very dark scene area. So yeah, in cases where you''d use an ambient term, a single directional light (not very bright) would probably look better.

You might think about a directional light source (no shadow calculation) instead of many point lights (cheaper calculations too) because it would be much easier on the artists.

-Michael
Now I''m getting really interested in radiosity. I think I''m going to write a per-vertex radiosity renderer now, and see if I can optimize it enough to make it real-time, and if not, I''ll make it edit the model that it loads to store the lighting values. Does that sound like an idea?
-~-The Cow of Darkness-~-
I''ve never programmed anything with radiosity in it but I''ve done quite a bit in 3ds with lighting to know that even semi-accurate radiosity is a serious proformance killer. I''ve always wanted to know what kinda of calculations you need to represent radiosity in programming. Anyone know of any places to find info on this?
---------------------------------------------Warning: This post may contain traces of Q-Basic
Hugo Elias' Radiosity Tutorial. Must Read!

Cows:
Realtime VertexRad is easy enough to achieve, provided you don't mind sticking with the simplest geometry - meaning a square room is simply a vertex in each corner. 8 vertices per room is dead easy to get realtime, but it looks awful 99% of the time. To get anything remotely good looking, you need to tessellate your geometry to the same sort of level as you would if you were lightmapping. Not only does this then bring the calculation time into line with a lightmapped solution, it also increases the vertex count, thus stressing the GPU more. Of course, once the VRad has been calculated, you can certainly store the resulting color values to be loaded at run time.

My conclusion is that VRad isn't going to be useful until CPU and GPU speeds increase significantly, along with the data rate between the two (for transferring huge quantities of vertex data). By this time, lightmapping will be obselete (for the most part), and someone (probably YannL ) will have come up with a shiny new lighting system to wow us all with.

EDIT: damn clicky! when am i ever gonna learn?!


[edited by - blacksheep on September 4, 2003 4:57:02 AM]

This topic is closed to new replies.

Advertisement