Light limitations

From FSDeveloper Wiki
Jump to: navigation, search

This article has been written by Christian Stock on the AvSim forum. It is kept here for knowledge gathering purposes. It has been written for Fs2002, so not everything is still valid in Fs2004 and FsX.

One thing I want to briefly discuss, is the common misconception about light.

Many scenery designers complain that they can't have real light, so that it'll illuminate ground objects and passing aircraft. THIS IS NOT POSSIBLE IN REALTIME AS YET! End of this year we'll get a few games (DOOM3) that will be able to do such a thing in closed environments (speak hallways, small sized rooms), and with a limited amount of light sources. Doing such a thing in an open environment with possibly 100 light sources from various aircrafts and lamps is impossible (unless a frame rate like one frame every few minutes/hours won't bother you).

It very much looks to me as if the sun is a normal hardware light in FS2002. A hardware light as such cannot cast any shadows. You can see that on the terrain, there are no real shadows (eg hills don't cast shadows on other hills). How much light a polygon gets simply depends on the orientation towards the light source (eg polygons facing away from the sun are dark).

Objects can casts shadows from the sun, but that's done with projective shadows. Every objects that has shadows enabled throws a shadow onto the terrain, but NOT onto other objects. This is computational expensive, so slow machines should swith shadows off. The more polygons you have the more framerate impact, this is why a low poly LOD model for shadows (as discussed earlier) is a good idea.

FS2002 also uses ambient light (basically a minimum light level), so the backsides of objects and hills aren't completely black.

The new FS2002 light effects such as landing lights are projected lightmaps, if I'm guessing right. They work similar to projected shadows, so only work on terrain, but not on other objects.

FS2002 may use more than 1 hardware light, since there is an option to use 8 lights in the graphics settings. 8 lights is a common maximum on opengl graphics cards. What the other 7 lights are used for I don't know...

I hope that explains current limitations on lighting. In short, if you want to have light, you have to use 'lightmaps', ie textures that have light drawn onto them. Some time will pass until we see full dynamic light in MSFS...

I'd like to see dynamic light (with real shadows) at work on terrain and airport environments, but then again I'd also like to own my own personal helicopter...