On Sunday 07 November 2004 21:24, Vivian Meazza wrote:
> Fred wrote:
> > >>Lighting is important. How can one use FG for night
> > >>training at the moment if you can't see the ground
> > >>properly? Why even bother with runway and taxiway
> > >>lights then?
> > >>I would love to see decent lighting added.
> > >
> > >There isn't much we (as modellers) can do about this. =(
> >
> > If modelers don't put emissive colors on their 3D instruments, or where
> > they want to have light, lighting is not going to happend, and plane
> > interiors will desperately stay dark at night. What they can't do is to
> > have real emissive casting light and shadows on thing, but at least they
> > can try to fake it.
> Emissive colours on textures? I don't know how to do that. But I was
> thinking of semi-transparent faces with an emissive color behind. When I
> finish with carriers/arrester wires I'll see how realistic that might be.
> There would be a vertex bill, of course.
> Vivian

That won't work.
Todays rendering technic that is used in normal 3d hardware
can't do emissive textures, Objects that are bright and illuminated by a real 
light source can't illuminate other objects, this is called local lightning 
model, which means that light does only interact directly with only one 
object and this now illuminated object can't illuminate other objects.
Illuminating objects can only be done with real lights sources, but in OpenGL 
and DirectX and on todays hardware there are normally only 8 lightsources 
This is not enough for a town but there are some tricks, see below.
The other lightning model is called global lightning, this one can illuminate 
other objects by illumintated objects but the only render technic that can do 
that is Radiosity and Raytracing.

So let's go back to our standard rendering method.
To generate the feel of more than 8 lights you can do the following tricks:

1. Use a lightmap. This is a second texture blended over the material texture 
which controlls where the texture is bright and where it is dark.
But to be able to do that you will need multitexturing support, this is AFAIK 
not supported by Plib at the moment and needed badly. This method is very 
similar to your idea but without the need of transparent textures.
We'll need to wait until this feature is supported by Plib.
This feature is also very handy to brighten up other objects like buildings 
and urban ground textures.

2. You can use pixelshades to make a texture darker or brighter.
But this is AFAIK also not supported by Plib at the moment.

3. You can turn of the lightning model for a particular texture or object, 
then a texture or object can look like a light but it is not a real light 
because it can't illuminate other objects -> local lightning model.
This is done on the lights of the b105 helicopter for example. 

These are all tricks i know so far to emulate real light sources.

Best Regards,
 Oliver C.

Flightgear-devel mailing list

Reply via email to