mirror of
https://github.com/UberGames/GtkRadiant.git
synced 2024-12-19 00:41:35 +00:00
8037810110
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@177 8a3a26a2-13c4-0310-b231-cf6edde360e5
135 lines
7.2 KiB
HTML
135 lines
7.2 KiB
HTML
<html>
|
||
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
|
||
<meta name="ProgId" content="FrontPage.Editor.Document">
|
||
<title>Lighting the Terrain</title>
|
||
</head>
|
||
|
||
<body background="../pics/background.jpg" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
|
||
|
||
<b><font SIZE="5">
|
||
<p align="center">Lighting the Terrain</p>
|
||
<div align="right">
|
||
<table border="1" cellspacing="1" width="100%" bordercolor="#808080" bgcolor="#000000" cellpadding="10">
|
||
<tr>
|
||
<td width="100%"><font FACE="Times New Roman">
|
||
<p> Terrain maps also require some rethinking about the way you light maps.</p>
|
||
</font><b><i><font SIZE="4">
|
||
<p>Vertex Only</p>
|
||
</font></i></b><font FACE="Times New Roman">
|
||
<p> If you are making a large terrain map, you should plan on making your terrain
|
||
textures be lit by vertex lighting only. Lightmaps can quickly become far too
|
||
large for the game to handle.</p>
|
||
<p>Make sure your large terrain textures contain the following parameters:</p>
|
||
<b>
|
||
<p>Surfaceparm nolightmap</b> //signifies vertex lighting only.</p>
|
||
<b>
|
||
<p>Q3map_novertexshadows</b> //this is what keeps those caulk vis blockers from
|
||
causing ugly shadows to form on your terrain.</p>
|
||
<p> If you are using q3map_sun in your sky …</p>
|
||
<b>
|
||
<p>Q3map_forcesunlight</b> //this makes the light emitted by a q3map_sun
|
||
parameter affect the vertex lit surface.</p>
|
||
</font><b><i><font SIZE="4">
|
||
<p>Light Sources</p>
|
||
</font></i></b><font FACE="Times New Roman">
|
||
<p> For outdoor maps, the obvious source of lighting ought to be the sky. The
|
||
skies in the mpterra maps began with skies used in more conventional Team Arena
|
||
maps, but were modified to better suit the needs of the terrain worlds.</p>
|
||
<blockquote>
|
||
<blockquote>
|
||
</font><font FACE="Symbol" SIZE="2">
|
||
<p>· </font><b><font FACE="Times New Roman">Slow Down Those Clouds.</font></b><font FACE="Times New Roman">
|
||
One thing to consider is slowing down the rate of cloud movement. What looks
|
||
OK in smaller maps looks wrong in vast panoramas.</p>
|
||
</font><b><font FACE="Symbol" SIZE="2">
|
||
<p>· </font><font FACE="Times New Roman" color="#FFFFFF">Strong Sunlight is
|
||
Good.</font></b><font FACE="Times New Roman" color="#FFFFFF"> For team maps,
|
||
you want to try and keep the light relatively the same in both base areas, so
|
||
if you have mountains or large base structures, having the light come in at a
|
||
nearly vertical angle is good, but less dramatic.
|
||
</font></p>
|
||
<b><font FACE="Symbol" SIZE="2">
|
||
<p><font color="#FFFFFF">· </font> </font><font FACE="Times New Roman">Ambient Light is Not
|
||
So Bad.</font></b><font FACE="Times New Roman" color="#FFFFFF"> Since the
|
||
beginning of Q3A map development we’ve said things like “Ambient Lighting
|
||
is bad”. Well, the problems caused by ambient lighting are still there
|
||
(flattening of shadows and colors), but with the distance of the play areas
|
||
from the sky surface (in some maps), adding an ambient really helps bring up
|
||
the overall light value in the map. Start low, maybe around an ambient value
|
||
of 5 and creep upwards until the map looks right. It is VERY IMPORTANT that
|
||
you give your ambient light a color. If you leave it white, you get ugly pink
|
||
light instead of white. Even specifying white makes it look wrong. Best
|
||
suggestion is to sample the sky texture color and translate that into an rgb
|
||
formula for your ambient. One warning
|
||
though … if you include “interior spaces” in your maps, the ambient
|
||
light will affect those areas too. You will not get the deep dark shadows you
|
||
may want in there.
|
||
</font></p>
|
||
<font FACE="Symbol" SIZE="2">
|
||
<p><font color="#FFFFFF">· </font> </font><font color="#FFFFFF"><b><font FACE="Times New Roman">Sky Shader Trick #1: Lose the
|
||
Backsplash</font></b></font><font FACE="Times New Roman"><font color="#FFFFFF">. The attributes of the sky
|
||
shader can have a significan</font>t effect on the amount of time it takes to perform
|
||
a light compile on a map. You have to think of the sky as a huge area light.
|
||
However, unlike light emitting textures (like your average light fixture), the
|
||
sky doesn’t need to be illuminated itself. Therefore, you can eliminate the
|
||
backsplash light feature which is the default status of the q3map_surfacelight
|
||
parameter. Your sky shader should have the parameter q3map_backsplash with a
|
||
value of -1. Removing backsplash light doesn’t affect the appearance of the
|
||
sky, but does remove a significant amount of compiling overhead when the
|
||
-light algorithm is used (the normal way you light things).</p>
|
||
</font><font FACE="Symbol" SIZE="2">
|
||
<p>· </font><b><font FACE="Times New Roman">Sky Shader Trick#2: Big
|
||
Subdivisions.</font></b><font FACE="Times New Roman"> Q3Map automatically
|
||
subdivides the sky into triangle quads. The more triangle quads, the more
|
||
light emitting surfaces you have on your sky (if q3map_surfacelight is used).
|
||
The light compile calculates for every one of these light emitting surfaces.
|
||
Increase the size of the subdivision and you get less light emitters and a
|
||
faster compile.</p>
|
||
</font><font FACE="Symbol" SIZE="2">
|
||
<p>· </font><b><font FACE="Times New Roman">Sky Shader Trick #3: -V-light.</font></b><font FACE="Times New Roman">
|
||
This is a fast lighting algorithm. It’s especially fast for calculating sky
|
||
lighting. It loses a little precision, but it can greatly speed up the time it
|
||
takes to light a map. Even if you decide to use a normal light operation for
|
||
your final map, using -vlight for interim compiles can mean a lot less time
|
||
spent waiting on the compiler to see your results.</p>
|
||
<b>
|
||
<p> </p>
|
||
</blockquote>
|
||
</blockquote>
|
||
</b></font><b><i><font SIZE="4">
|
||
<p>The Light Grid</p>
|
||
</font></i></b><font FACE="Times New Roman">
|
||
<p> This is discussed in detail under terrain-related Worldspawn features. One of
|
||
the things that can add enough memory complexity to a large terrain map, enough
|
||
to make it unplayable (read crash the game), is the light grid. Think of the
|
||
light grid as a map for determining how to light entities in the world. It’s
|
||
what makes player models appear to move in and out of shadows as they move
|
||
through the world. It’s a nice effect, but costly in memory terms. For the
|
||
largest maps in Q3:TA, we “traded down” to a less detailed light grid.
|
||
Increasing the size of grid subdivisions from 32 units to 256 units did this. We
|
||
experimented with smaller and larger grids and settled on 256 x 256 x 256 as the
|
||
best size. Smaller and the grid became large and unwieldy. Larger (especially on
|
||
the z dimension) and not enough light reached some of the entities.</p>
|
||
<p> The details of this feature are noted below under Terrain-Related WorldSpawn
|
||
Features.</p>
|
||
</font>
|
||
|
||
<p align="center"><a href="the_meta_shader.html">Back</a> - <a href="table_of_contents.html">Table
|
||
of Contents</a> - <a href="terrain_related_worldspawn_features.html">Terrain
|
||
Worldspawn Features</a></p>
|
||
|
||
<p> </td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</font></b>
|
||
<p> </p>
|
||
<p> </p>
|
||
<p align="center">-22-</p>
|
||
|
||
</body>
|
||
|
||
</html>
|