 Spotlights |
Spotlight aiming
Spotlights are normal light entities, restricted to casting light out in a
basic cone shape. The old Qrad3 requires two separate entities to create
a spotlight. The first is the light itself, where the width of the cone can
be set by the "cone" key. The second is the info_null, which is used to aim
the spotlight. The info_null is given a "targetname", and the light's
"target" key is set to the same name, making the light point at the
info_null.
If you have an excessive number of entities, or just prefer things less
cluttered, you may want to use one of ArghRad's alternate methods of aiming
spotlights. These can aim lights by angle, vector, or coordinate, with only
a single light entity.
"_spotangle" "# #", "_mangle" "# #"
("_spotangle" and "_mangle" are identical) This first new aiming method
accepts two angles for its value. The first angle, yaw, goes from 0 to 360
degrees around the z axis, like the "angle" value used in many other
entities. The second, pitch, is the up/down angle. It goes from -90,
straight down, to 90, straight up.
Example:
{
"classname" "light"
"origin" "64 64 64"
"light" "200"
"cone" "10"
"_spotangle" "45 -60"
}
"_spotvector" "# # #"
The second new method for aiming spotlights, is by a direction vector. A
direction vector is a single x,y,z coordinate that defines an angle pointing
from the origin (0,0,0) towards that coordinate. To use this method, set
the three "_spotvector" numbers to the vector's x, y, and z values.
Example:
{
"classname" "light"
"origin" "64 64 64"
"light" "200"
"cone" "10"
"_spotvector" "-1 2 0"
}
"_spotpoint" "# # #"
The third new aiming method is by global coordinate. You specify three
numbers, the x,y,z map coordinates that you want the light to point at. It
is similar to aiming by info_null, without the actual info_null entity.
Example:
{
"classname" "light"
"origin" "64 64 64"
"light" "200"
"cone" "10"
"_spotpoint" "128 80 192"
}
"_focus" "#"
"_focus" is a special key that allows you to set the attenuation of light
from the center of the spotlight, outward. It can be used to make spotlights
without the often-seen jagged edges. It should be given a value of 1 or
greater, the higher the number, the faster the light fades out (the smaller
the cone).
This option works independantly of the spotlight's "cone". This means that
"_focus" uses it's own scale, and does not depend on the size of the cone.
So, when using "_focus", it is probably best to set the value for "cone" to
its max size of 90.
Example:
{
"classname" "light"
"origin" "64 64 64"
"light" "200"
"_spotangle" "0 -30"
"cone" "90"
"_focus" "5"
}
|