Tag Archives: tutorials

Outdoor lighting and fake G.I. in Quake with examples.

Had some more experiments with outdoor lighting in Q1BSP using Tyrlight  and here are the examples and explanation for those who might be new to this.

Usually you light an outdoor scene by using a sunlight (“_sunlight” “n” worldspawn key) which is cast from sky brushes at some angle (defined by “_sun_mangle” “x y 0” worldspawn key, where “x” is angle around the Z-axis  from 0 to 360 and “y” is the pitch angle from 90 = up to -90 = down). And to light everything not hit by sunlight a global minlight ( “light” “n” worldspawn key) is often used – which only rises a minimum value. It is very quick to set up but looks super dull and absolutely flat.

Alternatively you can try to fake global illumination (GI) using about a dozen of  local minlights: small value (~10~20) point lights with “delay” “4” or “3”  key (infinite cast range) and evenly place them all around your scene near the sky. It’s a well-known trick sometimes used in 3d graphics. Doesn’t take long to set up, faster to compute than true GI/radiocity and gives good results.

gi-mapp

But if you simply use “delay” “4” lights it still looks very flat, especially from the side not lit by sunlight, because the lights only rise the minimum level, not adding up. (sunlight in this example was increased to compensate for the lack of additive lights)

dp20130423165136-00 dp20130423165149-00

With “delay” “3” lights  you get far better results with prominent shadows but still kinda flat:

dp20130423165446-00  dp20130423165510-00

And the best and most realistic look is achieved by using “delay” “4” lights but compiling with -addmin command line option. It makes allthe minlights additive resulting in smooth gradient shading with shadows and even highlights, resembling diffused lighting/radiocity/GI in more advanced compilers and light renders:

dp20130423170055-00 dp20130423170433-00

And of course don’t forget to use -extra4 -soft 1 command line options  for the maximum quality of lightmaps.
TyrLight by  Kevin Shanahan (AKA Tyrann)  http://disenchant.net/utils/  It has documentation that lists and explains all the options and parameters, if something is unclear.
I hope this was useful and we’ll never see maps with just sunlight/minlight.

dp20130423213212-00

Tagged , , ,
Design a site like this with WordPress.com
Get started