Advanced FeaturesPoint LightsPoint lights give you the most control over your lighting. With a point light, you can do anything you can do with surface and bmodel lighting. It is just sometimes more work than if you were to use the latter two. Negative light valuesIf you need to subtract light from an area without compromising the light values of your existing lights, you can use negative light values. You can do this by either entering a negative value after your "light" key, or entering negative values in one or more of the color fields after your "_color" key. If you enter a negative "light" value, the light will cast an absolute level of darkness concurrent with the negative light level. In other words, a "light" value of -100 will subtract 100 from the red, green, and blue values of all lights that infringes on the light’s range. "light" "-100"If you enter a negative color after the "_color" key, ArghRad will subtract the converted absolute value of the color you selected. For example, "light" "250""_color" "-200 50 100"will simplify to "light" "250""_color" "-1 .25 .5"So where the light intensity would be 200, it the light would subtract 200 red, add 50 green and add 100 blue. Where the light intensity would be 100, it would subtract 100 red, add 25 green, and add 50 blue. If you enter a negative light value and a negative color value, the negative color values become positive, and the positive become negative. "light" "-100""_color" "-1 .5 1"is the same thing as "light" "100""_color" "1 -.5 -1"Negative lights only affect lights of the same lightstyle. Light StylesLight styles can be set to make lights pulse, strobe, or flicker. The default value is 0, which is static light. Keep in mind that the Quake2 game engine has a limit of four lightstyles per face. If you try to squeeze too many lights with a style value into too tight a space, you will get unwanted results. See the appendix for a description of the lightstyles available. "style" "[value]"Light styles are controlled by the gamex86.dll file, and not by the radiosity program. ArghRad only interacts with lightstyles by transmitting the lightstyle number from the light entity to the .bsp file. Also, it is worth noting that only lights set to style 0 will bounce. SpotlightSpotlights are, in my opinion, the coolest addition to point entities (yes, even cooler than color!). The original method of aiming spotlights is relatively simple, but uses an info_null, which is just another entity to clutter up your screen. To aim a spotlight, you place the light entity as normal, then create an info_null at the center of where you want to aim the spotlight. Give the info_null a targetname, and then target the light to the info_null. That’s it. "classname" "light""target" "null1""_cone 10""origin" "656 1664 400""classname" "info_null""targetname" "null1""origin" "672 1696 352"Angle aimingThe following three methods of aiming a spot are a little more complicated than the method listed above, but they can be more convenient at times. Angle aiming involves aiming your spotlight using yaw and pitch. This is the same method that is used to aim info_player_intermission and the _sun_angle. Yaw is the amount of rotation on the z axis. The angles that you use to aim the direction of doors, or player/monster facing are the same the yaw. It starts with 0 on the positive x axis, and moves counter-clockwise. For example, if the y axis were north and south, and the x axis east and west, east would be 0 degrees, north 90, west 180, and south 270. Pitch is the angle on the horizon which the spot will point. A pitch of 0 will be level on the horizontal plane. As the pitch decreases, the angle will point down, and as it increases, the angle will point up. A pitch of 90 points straight up, and a pitch of -45 is halfway between straight down and horizontal. "_mangle" "[yaw] [pitch]""_spotangle" "[yaw] [pitch]"_mangle and _spotangle are aliases for the same function. Vector aimingVector aiming allows you to aim your spot based on the angle derived from two points. The first point is the origin (0, 0, 0), and the second number is defined in the value of your _spotvector key. If I were to define a _spotvector of (1, 1, 1), angle derived between the origin and the defined vector will be the angle of the spot. In this case it would be the same as a yaw of 45 and a pitch of 45. "_spotvector" "[x], [y], [z]"Point aimingPoint aiming is the same as vector aiming with one significant difference. Instead of the using the map’s origin (0, 0, 0) as the first point, it uses the light entity’s origin (the light’s position) as the first point. The angle derived by the vector coordinates is determined by the vector point relative to the light’s position. Basically, point aiming is the same as using an info_null, except you do not have to create the info_null entity. You simply input the coordinates of the point you want your spot to aim at, and your work is done. "_spotpoint" "[x], [y], [z]"ConeThe cone specifies the rate at which your spotlight will expand. The default cone value is 10. Any value larger than 10 will cause the cone to be larger, while smaller values will result in a narrower cone. "_cone" "[value]"FocusFocus works like the _angwait keyvalue pair, except only in the direction of the spotlight. It scales the intensity of the light based on the angle that it strikes the surface. The result is a smoothly fading cone, which can reduce the jagged effect that often plagues mappers. A value of 1 is default. Values greater than one will make light fade faster as the angle increases, and a value less than one will slow the fading effect. "_focus" "[value]"AttenuationThe attenuation of light is the reduction of its brightness as it logically should. As light grows distant, it fades. To emulate this, ArghRad uses the three methods of attenuation, falloff, fade, and angle fade. FalloffIn physics, light falloff is calculated by the inverse square of the distance, which means that at two units, the light is one fourth as bright as it was at one unit, at three units, it is one ninth. As you can see, the inverse square rule for light falloff can be quite severe. To compensate for the severity of inverse square falloff, there is linear falloff. With linear falloff, the reduction is reliably... well... linear. The difference between the brightness of light at one unit and two units will be the same as the difference of light at fifty one units and fifty two units. Inverse lighting falls in between inverse square and linear lighting. It is much more forgiving than inverse square light, while it is more realistic than linear lighting. At two units, light would be half of what it was at one unit, and at three, it would be one third. Note that by unit, I mean any arbitrary unit of measurement, and by brightness, I mean an arbitrary brightness level. See the appendix for a table on light falloff. "_falloff" "[value]"0 = linear (the default for point lights) 1 = inverse 2 = inverse square (surface lights) FadeSince linear falloff dims very slowly, it has a predefined maximum range. At this range, the light value fades to zero very quickly. Since inverse and inverse square falloff fade rapidly, they do not have fade ranges. Fade can be used with linear falloff to change the distance at which light will fade without affecting the rate at which the brightness decreases while inside the fade range. A value greater than one will make the distance fade out faster, while a value less than one will make it fade slower. The default value is 1. Any value entered will multiply the range by the value. For example, a value of .5 will halve the fade range. "_wait" "[value]""_fade" "[value]"Both of the above do the same thing. Angle fadeAngle fade or angle wait scales the brightness of a light based on the angle that it strikes the surface. A value greater than one will cause light to fade faster as the angle faces away from the light, while a value less than one will slow the fade as the angle faces away from the light. The default value of this key is 1. "_angwait" "[value]""_angfade" "[value]"Bmodel lightsBmodel lights allow a marriage between surface lights and point lights. It allows you to control surface lights like you would point lights, and to better control the lit surfaces of your entities. What lights?Bmodel lights are surface lights on entity brushes. An entity brush is part of a func_door, func_door_rotating, func_rotating, func_wall, and func_train. Normally, surface lighting on entities did not work properly. The results were unreliable and ineffective. With bmodel lighting, you have many more options. Why bmodel lights?Bmodel lights provide a much more reliable result than surface lighting on entities. It gives you more control than you would have otherwise. If you have an entity that uses a bmodel, you can control many surface and radiation aspects of the model that would otherwise be very difficult or impossible. What are the limitations of bmodel lighting?Bmodel lighting cannot be switchable. Switchable lights are defined during the qbsp process, so ArghRad cannot control this aspect of a lightstyle. It also does not emulate dynamic lighting on a moving bmodel. Using bmodel lighting on a func_train will not cause the radiated light to follow the train as it moves. In fact, the light radiated from the bmodel’s surfaces will remain where the bmodel was rendered after it begins to move. As this may be an unwanted result, you will want to avoid lighting a func_train. Bmodel lighting will not radiate directionally from a moving surface. If you place a light on a rotating brush, the lightmap will only define light for the starting position. In other words, bmodel lighting (like all lighting in Quake2) is not dynamic. How can I creatively use bmodel lighting?If you need to control the light radiating from a solid in your level, you can make it a func_wall and apply bmodel lighting keyvalues such as intensity, color, style, or minimum light. This should be used sparingly, however, since a func_wall is an entity and not a world brush. Also, a func_wall will cause a leak if it is not fully contained within the level. Finally, a func_wall, or any other entity, will not cast shadows, so if that is the desired effect, you may have to creatively make use of negative light values point lights. How do I disable bmodel lighting?To disable bmodel lighting, enter the option -nobmodlight at the command line before you compile. Light intensityIf a light intensity value is entered, the value will override all of the surface light values. Otherwise, it behaves as a surface light, and follows the inverse square falloff rule. "light" "[value]"Light colorThis keyvalue pair overrides the default color of the surface lights on your bmodel. If you use a color that is not similar to the texture colors, however, it will look wacky, and I will spite you while you sleep. "light" "[red] [green] [blue]"Minimum light texture brightnessThe lightmin keyvalue pair can be used to define the minimum light value of light emitting surfaces. This feature can be used to make a surface glow brighter without increasing the amount of light that it puts out (therefore not casting light on the surrounding faces). Using lightmin, you can make light eminating surfaces "glow in the dark" without having to worry about the glow spilling over to nearby faces. _lightmin uses the absolute scale, so a value of 64 would return a result minimum surface brightness of 64. "_lightmin" "[value]"Minimum lightThis is similar to the _lightmin key, except that it applies a minimum light value to the entire bmodel, instead of just to the faces marked with the light flag. There are four different ways to define minimum light. The first is with the _minlight key. This uses the conventional relative method, like -minlight. All values entered (from 0-2) are multiplied by 128 for the absolute result. "_minlight" "[value]"The _minlighta key works the same as _minlight except that it uses an absolute scale instead of the relative scale. If a value of 150 is entered, then a value of 150 will be set as the minimum brightness of the textures. "_minlighta" "[value]"The minlight function can yield somewhat patchy results, so it would be suggested that you use the newer "_ambient" function. The _ambient function uses the absolute brightness scale, so a value of 50 will return a minimum brightness of 50. "_ambient" "[value]"You are not limited to a white light for your ambient value. If you chose to define a color ambient value, you would simply define each of the colors’ brightness separately. For example, a value of 120, 80, 50 will make the red brightness minimum 120, the minimum green brightness will be set to 80, and the blue minimum will be 50. "_ambient" "[red] [green] [blue]"Light styleYou can define light styles to the light that is projected from your bmodels. To do so, it is as simple as defining a style keyvalue pair, just like you would to a point light. Refer to the Light style entry in the point light section for more details. "style" "[value]"See appendix for a table listing light styles. FocusThis works the same as the "_focus" key for spotlights. The direction of the spot, in this case, would be the direction perpendicular to the surface that is projecting the light. This does not turn your light into a spotlight, it simply controls the angular smoothing effect. Also, be aware that because of the nature of surface lights, large values may cause unanticipated results. "_focus" "[value]" |