Lighting in terrains

Lighting in terrains

Post by Morfea » Sun, 19 May 2002 05:47:23



Can anyone give me some advice on lighting for an open space terrain? I've
seen plenty of tutorials on OpenGL lighting, but they cover things like how
OpenGL lighting works, materials, etc.

I'd like some advice as to where to put lights, what kind of lights, etc.

I'm producing a terrain based on a height field, and so far I haven't been
able to produce anything even semi-realistic. I'm not interested in
producing high-quality graphics or anything, but I'd like to at least get
the shading right!

Any ideas or pointers would be much appreciated!

Thanks,
Morfeas
--
www.freecfm.com/m/morfeas

 
 
 

Lighting in terrains

Post by Florian S » Mon, 20 May 2002 03:57:54



> Can anyone give me some advice on lighting for an open space terrain?
> I've seen plenty of tutorials on OpenGL lighting, but they cover things
> like how OpenGL lighting works, materials, etc.

> I'd like some advice as to where to put lights, what kind of lights, etc.

> I'm producing a terrain based on a height field, and so far I haven't
> been able to produce anything even semi-realistic. I'm not interested in
> producing high-quality graphics or anything, but I'd like to at least get
> the shading right!

> Any ideas or pointers would be much appreciated!

> Thanks,
> Morfeas

Lightmaps are your friend in general. For terrains I would use
vertex-lighting.

--
Add the next two proper digits to the e-mail to mail me.

 
 
 

Lighting in terrains

Post by John Canno » Mon, 20 May 2002 10:44:45


I've found that once you do terrain level-of-detail (especially when using
chunked LOD) vertex lighting introduces unsightly lighting pops. If terrain
lighting is static then I would suggest using lightmaps for terrain.

John.



> > Can anyone give me some advice on lighting for an open space terrain?
> > I've seen plenty of tutorials on OpenGL lighting, but they cover things
> > like how OpenGL lighting works, materials, etc.

> > I'd like some advice as to where to put lights, what kind of lights,
etc.

> > I'm producing a terrain based on a height field, and so far I haven't
> > been able to produce anything even semi-realistic. I'm not interested in
> > producing high-quality graphics or anything, but I'd like to at least
get
> > the shading right!

> > Any ideas or pointers would be much appreciated!

> > Thanks,
> > Morfeas

> Lightmaps are your friend in general. For terrains I would use
> vertex-lighting.

> --
> Add the next two proper digits to the e-mail to mail me.

 
 
 

Lighting in terrains

Post by John Canno » Mon, 20 May 2002 11:32:43


Opengl lighting will get you some distance but if you want shadowing and
indirect illumination you need to add in occlusion and a slightly better
lighting model.

A nice compromise between standard direct lighting (1st order) and a
radiosity solution (higher order) can be found in "Real-Time Photorealistic
Terrain Lighting" at
http://www.gdconf.com/archives/proceedings/2001/hoffman.doc. Some might find
it a bit mathematical. It describes a single infinite light source such as
the sun. It calculates lighting on the terrain from direct sunlight
(infinite light source 1st order contribution - OpenGL lighting plus
occlusion map or just static lightmap) and direct skylight (area light
source 1st order contribution - not OpenGL) and indirect light reflected off
the terrain (higher order contribution - not OpenGL). The first two are
relatively easy, but the last one (indirect light off terrain) is where the
compromise comes into play to avoid having to calculate a radiosity solution
(ie to avoid having to iteratively converge on the solution).

If this is overkill you can just neglect the indirect lighting and also even
replace the skylight contribution with a global ambient lighting term and
you should still get nice looking diffusely shaded terrain with shadows
(which is really a minimum if you want terrain to look like it's shaded
correctly). If you want more than a single infinite light source (such as
sun) then you could introduce point light sources and cast rays from light
source to lightmap terrain points during pre-compilation in order to get 1st
order lighting with shadows (the ray gets collision-detected with terrain
and any static objects on terrain). I use a lightmap resolution of 1 texel
per metre which is also my highest resolution terrain grid spacing. The
bilinear filtering of the lightmap texture tends to reduce aliasing.

John.


Quote:> Can anyone give me some advice on lighting for an open space terrain? I've
> seen plenty of tutorials on OpenGL lighting, but they cover things like
how
> OpenGL lighting works, materials, etc.

> I'd like some advice as to where to put lights, what kind of lights, etc.

> I'm producing a terrain based on a height field, and so far I haven't been
> able to produce anything even semi-realistic. I'm not interested in
> producing high-quality graphics or anything, but I'd like to at least get
> the shading right!

> Any ideas or pointers would be much appreciated!

> Thanks,
> Morfeas
> --
> www.freecfm.com/m/morfeas

 
 
 

Lighting in terrains

Post by jo » Mon, 20 May 2002 16:52:24


On Sun, 19 May 2002 11:44:45 +1000, "John Cannon"

I'll second that comment about popping with real lighting (as opposed
to texture light/shadows) with roam. Unless you want the clouds to
move and to cast changing shadow patterns it isn't worth it. Maybe
next year :)

joe

>I've found that once you do terrain level-of-detail (especially when using
>chunked LOD) vertex lighting introduces unsightly lighting pops. If terrain
>lighting is static then I would suggest using lightmaps for terrain.

>John.




>> > Can anyone give me some advice on lighting for an open space terrain?
>> > I've seen plenty of tutorials on OpenGL lighting, but they cover things
>> > like how OpenGL lighting works, materials, etc.

>> > I'd like some advice as to where to put lights, what kind of lights,
>etc.

>> > I'm producing a terrain based on a height field, and so far I haven't
>> > been able to produce anything even semi-realistic. I'm not interested in
>> > producing high-quality graphics or anything, but I'd like to at least
>get
>> > the shading right!

>> > Any ideas or pointers would be much appreciated!

>> > Thanks,
>> > Morfeas

>> Lightmaps are your friend in general. For terrains I would use
>> vertex-lighting.

>> --
>> Add the next two proper digits to the e-mail to mail me.

 
 
 

1. Any tip for terrains ??

I did some HFs using terraform (linux) and gimp.
When I use AA the terrains sometimes seems too glossy, working
without AA works fine.

I would like to give the terrain a realistic appearence; rough, stony
and sandy but not too complex.

Does anyone in the group have some tips about terrains ?

2. "Canvas does not allow drawing"... with no canvas!

3. light help wanted-strobing lights/streaming lights??

4. Hardware acceleration???

5. Making Terrains in Bryce?

6. ATI Mobility and OpenGL development

7. Grayscale images to StrataVision Terrains?

8. Subsections of large Doc??

9. How to generate terrains for Strata

10. 3d Fractal Terrains

11. terrains

12. Lights, lights,and not enough light.

13. *TIP* Making contour line terrains.