ef2-ubertools-gdk/Documentation/content/ldesign_lighting.html
2003-08-18 00:00:00 +00:00

487 lines
31 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ÜberTools Game Development Kit</title>
<link rel="stylesheet" href="style.css">
<script type="text/javascript">
/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}
function SwitchMenu(obj){
if(document.getElementById){
var el = document.getElementById(obj);
var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
if(el.style.display != "block"){ //DynamicDrive.com change
for (var i=0; i<ar.length; i++){
if (ar[i].className=="submenu") //DynamicDrive.com change
ar[i].style.display = "none";
}
el.style.display = "block";
}else{
el.style.display = "none";
}
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<a name="top"></a>
<table width="702" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><img src="../images/header.jpg" width="702" height="101" border="0"></td>
</tr>
<tr>
<td width=158 valign="top"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" class="menu">
<!-- Keep all menus within masterdiv-->
<div id="masterdiv">
<img src="../images/navigation.jpg" width="158" height="27"><br>
UberTools GDK
<div class="menutitle" onclick="SwitchMenu('sub0')">&raquo; Introduction &amp; Contents</div>
<span class="submenu" id="sub0">
&nbsp;&nbsp;&nbsp;&nbsp;<a href="../start.html">Introduction</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="../start.html#2">Utilities</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="../start.html#3">Source Files</a><br>
</span>
<br>Level Design<br>
<div class="menutitle" onclick="SwitchMenu('sub1')">&raquo; Setting Up UberRadiant</div>
<span class="submenu" id="sub1">
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_setup.html">That Scary Error Msg</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_setup.html#2">General Tab</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_setup.html#3">Display Tab</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_setup.html#4">User Interface Tab</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_setup.html#5">Keyboard Shortcuts Tab</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_setup.html#6">Colors Tab</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_setup.html#7">Game / Paths Tab</a><br>
</span>
<div class="menutitle" onclick="SwitchMenu('sub2')">&raquo; Building Your First Room</div>
<span class="submenu" id="sub2">
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_firstroom.html">Editor Interface Basics</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_firstroom.html#2">Choosing Your Textures</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_firstroom.html#3">Building The Room</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_firstroom.html#4">Adding a Light</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_firstroom.html#5">Adding a Player Start</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_firstroom.html#6">Compiling Your Level</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_firstroom.html#7">Viewing the Level</a><br>
</span>
<div class="menutitle" onclick="SwitchMenu('sub3')">&raquo; Constructing Terrain</div>
<span class="submenu" id="sub3">
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_terrain.html">Setting up the Tools</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_terrain.html#2">Creating Terrain</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_terrain.html#3">Modifying the Textures</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="radiant_terrain.html#4">Adding More Terrain</a><br>
</span>
<div class="menutitle" onclick="SwitchMenu('sub4')">&raquo; Additional Reference</div>
<span class="submenu" id="sub4">
&nbsp;&nbsp;&nbsp;&nbsp;<a href="ldesign_lighting.html">Lighting System</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="ldesign_terrain.html">Terrain Texture Blending</a><br>
</span>
<br>Scripting<br>
<div class="menutitle" onclick="SwitchMenu('sub5')">&raquo; Scripting Tutorials</div>
<span class="submenu" id="sub5">
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_syntax.html">Scripting Syntax</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_waves.html">Spawning Waves</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_flying.html">Creating Flying Creatures</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_tripwires.html">Setting Up Tripwires</a><br>
</span>
<div class="menutitle" onclick="SwitchMenu('sub6')">&raquo; Global Script Synopsis</div>
<span class="submenu" id="sub6">
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts.html">Introduction</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts_accelmove.html">global_accelerated</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts_accelmove.html">Movement.scr</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts_archetype.html">global_archetype.scr</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts_array.html">global_array.scr</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts_cinefx.html">global_cinematicFX.scr</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts_common.html">global_common.scr</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts_debug.html">global_debugUtils.scr</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts_flyin.html">global_flyin.scr</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts_math.html">global_math.scr</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts_ploadout.html">global_playerLoadout.scr</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts_soundpan.html">global_soundPan.scr</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts_spawnwave.html">global_spawnWave.scr</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts_transport.html">global_Transport.scr</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="scripting_globalscripts_tripwire.html">global_tripwire.scr</a><br>
</span>
<div class="menutitle" onclick="SwitchMenu('sub7')">&raquo; Classes Reference</div>
<span class="submenu" id="sub7">
&nbsp;&nbsp;&nbsp;&nbsp;<a href="allclasses_g.html">Game Module</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="allclasses_cl.html">Client Module</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="allclasses_cg.html">Client Game Module</a><br>
</span>
<br>Older Documentation<br>
<div class="menutitle" onclick="SwitchMenu('sub8')">&raquo; Heavy Metal FAKK2</div>
<span class="submenu" id="sub8">
&nbsp;&nbsp;&nbsp;&nbsp;<a href="fakk2_camera.html">Camera Documentation</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="fakk2_clientsidecmds.html">Client Side Commands</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="fakk2_gui.html">GUI Documentation</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="fakk2_ingameutils.html">In-Game Utilities</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="fakk2_max2skl.html">MAX2SKL Reference</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="fakk2_shadermanual.html">Shader Manual</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="fakk2_soundsystem.html">Sound System</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="fakk2_tiki.html">TIKI Model System</a><br>
</span>
<br>Other<br>
<div class="menutitle" onclick="SwitchMenu('sub9')">&raquo; Web Links &amp; Credits</div>
<span class="submenu" id="sub9">
&nbsp;&nbsp;&nbsp;&nbsp;<a href="other_links.html">Web Links</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="other_credits.html">Credits</a><br>
</span>
</div>
</td>
</tr>
</table></td>
<td width="13" background="../images/vert_line.jpg"><img src="../images/vert_line.jpg" width="13" height="1"></td>
<td valign="top" width="533"><p class="header"><br>
Lighting System Specifications </p>
<p class="subheader">Introduction</p>
<p> The static lightmap generation system has been redesigned and reengineered
from the ground up to accommodate the growing need for better lighting
in Ritual&#8217;s games. These changes have required code changes to the
map compiling utility (q3map.exe), the map editor (q3radiant.exe), and
the core game engine itself. This document is meant to serve three purposes:
first, to extend the TDD (Technical Design Doc) as it relates to the specific
features of the lighting system; second, as a tutorial for level designers
and lighting specialists; third, as a canonical reference resource for
future lighters, engineers, and programmers alike.</p>
<p class="subheader">General Principles</p>
<p> In designing each aspect of the new lighting system, input was gathered
from a number of contributors both inside Ritual and out. The resulting
design was a consolidation of all of these inputs and, for the most part,
accommodates the desires of each (at least in spirit if not in specific
implementation details). Efforts have been made to create the system in
such a way that it is flexible enough to encompass different methods and
techniques into a generalized system that can service the needs of everyone
involved.</p>
<p>The most obvious philosophical change in lighting paradigms is that map
lighters now have a much greater amount of control over various aspects
of the light. A light&#8217;s brightness is now independent of its falloff
geometry, which in turn is broken up into several individually controllable
aspects. Each of these aspects will be covered in detail throughout the
course of this document.</p>
<p>Another important philosophical design decision of the new lighting system
can be summarized by the phrase: &#8220;realism is good; total control
is better&#8221;. Lighting engineers now have the ability to (reasonably)
reproduce realistic behavior in their lights; however, they also have
the ability to explicitly change any aspect of a light such that it will
behave in a less realistic but more desirable fashion.</p>
<p class="subheader">The Lighting Process</p>
<p> The following is a step-by-step process of how lighting works in the
TikiEngine.</p>
<p><b>Step 1: Placement of light entities in Radiant</b><br>
The lighting engineer uses the map editor to create, copy, and modify
light sources in a map. Lights are previewed visually in the editor, both
in the orthogonal (2d) and perspective (3d) views. OpenGL is used to render
spotlights as cones, point-lights as spheres, and so on. The lighting
engineer tweaks each of the lighting keys (discussed later) until (s)he
gets the desired light shape and properties. The map is then saved.</p>
<p><b>Step 2: Compilation of static lightmap data using q3map</b><br>
The lighting engineer then generates the static lightmap data for the
map by running the map compiler on the level, using the command:</p>
<blockquote>
<p class="menu"> q3map &#8211;all &lt;mapname&gt;</p>
</blockquote>
<p>Or by running each stage of q3map as a separate task:</p>
<blockquote>
<p class="menu"> q3map &lt;mapname&gt;<br>
q3map &#8211;vis &lt;mapname&gt;<br>
q3map &#8211;light &lt;mapname&gt;</p>
</blockquote>
<p>At this stage, the q3map tool calculates the lightmap data for the entire
level by applying the following steps:</p>
<ol>
<li> For each surface in the world, a sample point is generated for every
16 world units, forming a coarse grid overlaying the entire surface
area of the world.<br>
<br>
</li>
<li> For each sample point, every light source in the map is checked to
see if it contributes any light to that sample point. If the sample
point is outside a point-light&#8217;s (or spotlight&#8217;s) maximum
radius (called &#8220;falloff_end_dist&#8221;), that light is not considered
for that sample point.<br>
<br>
</li>
<li> For point-lights, the amount of light added to the lightmap at each
sample point is calculated using the following steps: <br>
<br>
<ul>
<li>a. If the sample point is inside the inner radius of the light
(called &#8220;falloff_start_dist&#8221;), the light is applied
to the sample point at the light&#8217;s maximum brightness.<br>
<br>
</li>
<li>b. If the sample point is outside the inner radius of the light,
the amount of light is somewhere between 0 and maximum brightness;
the exact value depends on the distance the sample point is away
from the inner radius as well as the nature of the falloff curvature
(&#8220;falloff_curvature&#8221;), which can be anywhere from a
straight-linear drop-off to a steep, inverse-squared drop-off.<br>
<br>
</li>
</ul>
</li>
<li> For spotlights, the amount of light added to the lightmap at each
sample point is calculated using the following steps:<br>
<br>
<ul>
<li> a. If the sample point is inside the area of the inner cone (&#8220;angle_hotspot&#8221;),
it is lit normally as if the light were a normal point light.<br>
<br>
</li>
<li>b. If the sample point is outside the inner cone but still within
the outer cone (&#8220;angle_penumbra&#8221;), it is partially lit
in proportion to its closeness to the inner cone.<br>
<br>
</li>
<li>c. If the sample point lies outside the outer cone, it is not
lit by the spotlight at all (unless the &#8220;spherical_ambient&#8221;
key is nonzero for that light).<br>
<br>
</li>
</ul>
</li>
<li> For sunlight, the amount of light added to the lightmap at each sample
point is calculated using the following steps: <br>
<br>
<ul>
<li>a. A ray is traced from the sample point backward along the direction
of the sunlight vector. If the ray collides with a sky brush or
sky portal before any other solid object, that sample point is fully
lit by the sunlight source.</li>
</ul>
</li>
</ol>
<p><b>Step 3: The map is rendered by the engine using textures and lightmap
data.</b><br>
When drawing a surface of the world, the engine generally makes (at least)
two rendering passes. The first pass is the opaque application of the
surface&#8217;s texture. The second pass is the application of the lightmap
data that was precalculated during the q3map &#8211;light stage. The lighting
pass is done using the lightmap&#8217;s RGB value as a color filter against
pixels in the texture at each pixel on the surface; each of the lightmap&#8217;s
RGB components is multiplied by the pixel&#8217;s matching component to
produce the net resulting color component. Thus, a lightmap of (1.0, 0.5,
0.0) on a medium-grey texel (0.6, 0.6, 0.6) will produce a resulting pixel
value of (0.6, 0.3, 0.0).</p>
<p class="subheader">Light Source Types</p>
<p> There are several different types of light sources available to lighting
engineers. All types are represented by a single &#8220;light&#8221; entity;
however, some types require additional objects in order to be properly
defined:</p>
<p><b>Type 1: Point Lights</b><br>
A point light is the most common type of light. It is the simplest to
define, the easiest to visualize in the editor, and the fastest to calculate
during the q3map &#8211;light phase of map precompilation. </p>
<p>Point lights emit light outward spherically from their origin, affecting
all surfaces within their outermost radius (or &#8220;falloff_end_dist&#8221;,
discussed below). They cast static shadows onto the lightmap when a line
of sight ray between the point light source and the surface sample point
is obstructed by another object.</p>
<p><b>Type 2: Spotlights</b><br>
A spotlight is the next most common type of light. It bears all the properties
of a point light; however, a spotlight confines its area of affect into
a cone along the direction of the spotlight. This direction is determined
by associating the light with a target &#8211; usually an info_null &#8211;
that has a &#8220;targetname&#8221; key matching the light&#8217;s own
&#8220;target&#8221; key. In order to turn a point light into a spotlight,
simply associate it to a target entity in this manner.</p>
<p><b>Type 3: Sunlights</b><br>
Sunlights are essentially point lights that are infinitely far away. They
are constructed in a manner similar to a spotlight (i.e. using an info_null
as a target entity). To make a spotlight into a sunlight, simply check
the box in the Light Properties dialog labeled &#8220;Directional (parallel)
light source&#8221;. </p>
<p>Once a light becomes a sunlight, its actual position becomes completely
meaningless. The light now simply serves as a prototype for defining a
light source infinitely far away (such as the sun or moon). All sky brushes
and sky portals in the level will now act as parallel emitters for this
sunlight; in other words, light of the type specified will be cast in
parallel lines along the vector specified by the light&#8217;s target
entity from every point on the surface of every sky brush or sky portal.</p>
<p class="subheader">Lighting Keys</p>
<p> In the map editor, a light source is represented as an entity. Each
entity has a number of key-value pairs (or epairs) which store the various
properties of that light. The following is a description of each of the
newly-added epair keys:</p>
<p><b>&#8220;brightness&#8221;</b><br>
Called Overall Brightness in the Light Properties dialog, this determines
the maximum brightness multiplier for the light at its brightest point
(i.e. its origin). If &#8220;brightness&#8221; is 1.0, the light makes
any surface inside its inner radius appear fullbright (assuming the light
is pure white). If &#8220;brightness&#8221; is 0.5, the light&#8217;s
brightest spot is only 50% as bright as a normal light at any given point.
Note, however, that its geometry &#8211; including inner and outer radius,
falloff curvature, etc. &#8211; will be completely unchanged.</p>
<p>Note also that if &#8220;brightness&#8221; is negative, the light is
subtractive rather than additive; i.e. it actually removes light from
surrounding surfaces rather than adding light to them.</p>
<p>The &#8220;brightness&#8221; key may hold any value between &#8211;1.0
and 1.0.</p>
<p><b>&#8220;dot_product_weight&#8221;</b><br>
Called Dot Product Effect in the Light Properties dialog, this determines
the degree to which the dot product (angle of incidence) will affect a
light&#8217;s effect on a surface. When &#8220;dot_product_weight&#8221;
is 0.0, the angle of the surface being lit is not taken into account at
all (other than the fact that surfaces facing completely away from the
light are never lit). When &#8220;dot_product_weight&#8221; is 1.0, the
amount of light received on a given surface is proportional to how perpendicular
/ straight-on that surface is to the source of the light. A value of 0.0
produces unrealistic (but easy-to-control) quake-like lighting; a value
of 1.0 produces realistic lighting with more complex subtleties. In general,
a value somewhere in-between these two extremes is desirable. The default
value is 0.5.</p>
<p><b>&#8220;_color&#8221;</b><br>
The color of the light emitted by a light source. This key has a 3-float
vector for its value, such as &#8220;1.0 0.5 0.0&#8221; (an orange color).
The &#8220;_color&#8221; key is set by choosing a color in the entity
color-picker (default &#8220;K&#8221; in Radiant), although it may also
be edited by hand. Clicking on the color sample in the Light Properties
dialog also opens the color picker for all currently selected objects.</p>
<p>Note that lights may never have a color that is not component-saturated;
in other words, all light colors must have at least one component (either
Red, Green, or Blue) that is set to 1.0. Non-saturated colors are automatically
saturated by Radiant (if set through the color picker) and by q3map at
load-time.</p>
<p><b>&#8220;falloff_curvature&#8221;</b><br>
Called Falloff Curvature in the Light Properties dialog, this determines
the steepness of the falloff in intensity as it decreases from maximum
at the inner radius (&#8220;falloff_start_dist&#8221;) to the zero at
the outer radius (&#8220;falloff_end_dist&#8221;). A &#8220;falloff_curvature&#8221;
of 0.0 represents a gentle linear falloff; a value of 1.0 represents a
steep, rapidly-decreasing (inverse-squared) falloff. As with &#8220;dot_product_weight&#8221;,
&#8220;falloff_curvature&#8221; is easiest to control (and least realistic)
at 0.0 and is most realistic (but more subtly complex to control) at 1.0.
The default value is 0.5.</p>
<p><b>&#8220;falloff_start_dist&#8221;</b><br>
Called Falloff Start Distance in the Light Properties dialog. This is
the inner radius; that is, the distance &#8211; in world units &#8211;
away from the light source within which any surface is fully lit by the
light. Note that although this means &#8220;fullbright&#8221; in some
cases, other factors are considered as well: the color of the light, the
dot product of the light&#8217;s angle hitting the surface (if enabled),
and so on. The &#8220;falloff_start_dist&#8221; value of a currently selected
light is represented graphically in both 2d and 3d views in Radiant as
translucent spheres of the (normalized) color of the light. (Note: make
sure &#8220;Show actual colors in XY&#8221; is checked ON in Edit-&gt;Preferences.)</p>
<p>For spotlights, this represents the height of the inner cone, as is consistent
with spherical lights (considering the cone as a segment of a sphere).</p>
<p>The hotkeys to quickly adjust &#8220;falloff_start_dist&#8221; for all
selected lights is (by default) : ALT + CTRL + [ to decrease, ALT + CTRL
+ ] to increase.</p>
<p><b>&#8220;falloff_end_dist&#8221;</b><br>
Called Falloff End Distance in the Light Properties dialog. This is the
outer radius; that is, the distance &#8211; in world units &#8211; away
from the light source outside of which any surface is totally unaffected
by the light. The &#8220;falloff_end_dist&#8221; value of a currently
selected light is represented graphically in both 2d and 3d views in Radiant
as translucent spheres of the (normalized) color of the light. (Note:
make sure &#8220;Show actual colors in XY&#8221; is checked ON in Edit-&gt;Preferences.)</p>
<p>For spotlights, this represents the height of the outer cone, as is consistent
with spherical lights (considering the cone as a segment of a sphere).</p>
<p>The hotkeys to quickly adjust &#8220;falloff_end_dist&#8221; for all
selected lights is (by default) : ALT + SHIFT + [ to decrease, ALT + SHIFT
+ ] to increase.</p>
<p><b>&#8220;angle_hotspot&#8221;</b> (spotlights only)<br>
Called Hotspot Angle in the Light Properties dialog, this field is used
only by spotlights. The &#8220;angle_hotspot&#8221; value of the light
determines the total angle, in degrees, of the inner cone of the spotlight.
Any point within this inner cone is lit as though the light source were
a normal spherical point light. Likewise, any point within this inner
cone AND within the inner radius (as determined by &#8220;falloff_start_dist&#8221;)
is fully lit by the light.</p>
<p>The hotkeys to quickly adjust &#8220;angle_hotspot&#8221; for all selected
lights is (by default) : ALT + CTRL + &lt; to decrease, ALT + CTRL + &gt;
to increase.</p>
<p><b>&#8220;angle_penumbra&#8221;</b> (spotlights only)<br>
Called Penumbra Angle in the Light Properties dialog, this field is used
only by spotlights. The &#8220;angle_penumbra&#8221; value of the light
determines the total angle, in degrees, of the outer cone of the spotlight.
Any point outside this outer cone is completely unlit / unaffected by
the spotlight (unless &#8220;spherical_ambient&#8221; is nonzero &#8211;
see below). Points that fall outside the inner cone (&#8220;angle_hotspot&#8221;)
but inside the outer cone (&#8220;angle_penumbra&#8221;) are partially
lit by the spotlight, with a lateral linear falloff from normal brightness
(at the edge of the inner cone) to total darkness (at the edge of the
outer cone).</p>
<p>The hotkeys to quickly adjust &#8220;angle_penumbra&#8221; for all selected
lights is (by default) : ALT + SHIFT + &lt; to decrease, ALT + SHIFT +
&gt; to increase.</p>
<p><b>&#8220;spherical_ambient&#8221;</b> (spotlights only)<br>
Called Spherical Ambient in the Light Properties dialog, this field is
used only by spotlights. The &#8220;spherical_ambient&#8221; value of
the light determines the fractional amount of the spotlight&#8217;s intensity
that is conveyed outside the outer (&#8220;angle_penumbra&#8221;) cone.
A value of 0.0 (default) indicates that the spotlight emits no light outside
its outer cone. A value of 0.5 indicates that surfaces outside the spotlight&#8217;s
cone are lit as if by a normal, spherical point light of half the intensity
of the spotlight (but with the same basic geometry, in terms of &#8220;falloff_start_dist&#8221;,
&#8220;falloff_end_dist&#8221;, and &#8220;falloff_curvature&#8221;).
A value of 1.0 (maximum) makes the spotlight behave exactly like a normal
spherical point light, since points outside the cone are lit with an equal
amount of intensity as the points inside the cone.</p>
<p class="subheader">Miscellaneous Notes Regarding Lighting Keys</p>
<ul type="square">
<li>Sunlights ignore the following keys: falloff_curvature, falloff_start_dist,
falloff_end_dist, hotspot_angle, hotspot_penumbra, spherical_ambient<br>
<br>
</li>
<li>Point lights ignore the following keys: hotspot_angle, hotspot_penumbra,
spherical_ambient<br>
<br>
</li>
<li>falloff_start_dist can never be greater than falloff_end_dist; similarly,
falloff_end_dist can never be less than falloff_start_dist. (Note that
the distinction between these two statements refers to two different
types of clamps, depending on which value is being changed to exceed
the other.) The Light Properties dialog will automatically stretch the
other field to accommodate the one being moved in excess of these limits.<br>
<br>
</li>
<li>Likewise, angle_hotspot can never be greater than angle_penumbra,
and vice-versa. Also enforced by the Light Properties dialog.<br>
<br>
</li>
<li> The keys light, style, falloff, minlight, radius, angles, spot_angle,
spot_dir, and other legacy quake-style lighting epair keys are now obsolete
and are completely ignored by the compiler.<br>
<br>
</li>
<li> Sunlights automatically enforce a dot_product_weight of 1.0. </li>
</ul>
<p>&nbsp;</p></td>
</tr>
<tr>
<td colspan="3"><img src="../images/footer.jpg" width="702" height="36" border="0" usemap="#Map"><br>
<img src="../images/hor_line.jpg" width="702" height="1"></td>
</tr>
<tr>
<td colspan="3" class="legal"><table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td class="legal"> Copyright &copy;2003 Ritual Entertainment, Inc. All rights reserved.<br>
Please do not email Ritual Entertainment with questions about the
UberTools Game Development Kit. It is provided as is and is not supported by Ritual Entertainment.</td>
<td><a href="http://www.ritual.com/tech/overview.html" target="_blank"><img src="../images/uber_logo.jpg" width="43" height="56" hspace="4" border="0"></a></td>
<td><a href="http://www.ritual.com" target="_blank"><img src="../images/ritual_logo.jpg" width="100" height="56" hspace="4" border="0"></a></td>
</tr>
</table>
<p align="center">&nbsp;</p></td>
</tr>
</table>
<map name="Map">
<area shape="rect" coords="601,10,693,28" href="#top">
</map>
</body>
</html>