Shader Enviroment

".shader_enviroment" tags are the primary shaders used in BSPs for most traditional, static, opaque materials. Examples include metal walls, ground textures, cliffs, etc. This type of shader is normally never used in GBXModels (due to incompatibilities such as the specular popping through BSP fog, or lack of support for bump maps when used on GBXModels), though it can be used if certain features are desired. Most features inside the tag are all explained by Guerilla via examples, charts, and mouse-over tool-tips. Some functions in this shader are similar to other shaders (most notably ".shader_model"), though some options may seem similar and be very different. Most functions are self-explanatory, though some of the trickier options have been described below.

''NOTE: Shaders can only look as good as the bitmaps used within them. Any shader can look great as long as you put enough time into it. You may go through tens to hundreds of revisions to a shader to perfect it, don't be discouraged by this fact.''

RADIOSITY PROPERTIES
These settings control how light is given and received by a surface during radiosity of the BSP. "Simple parameterization" is used to correct a rare glitch when lightmaps UVs are erroneously built (usually occurs on ground maps that cover large areas). "Detail level" determines the resolution of the lightmap; higher means better quality, but radiosity takes longer. ("Turd" quality should only be selected if you absolutely do not care about the quality, as it effectively averages what the surface should be and uses just that.) "Tint color" is used to recolor light that may pass through this material, if used for things like grates or chain-link fences (much like the effect of light passing through stained-glass)(utilizes "alpha-tested" setting). Any changes here require re-running radiosity to take affect. ###INSERT PICTURES COMPARING HIGH AND LOW QUALITY###

PHYSICS PROPERTIES
This determines what effect is produced when you interact with this surface via walking/driving on, or shooting at.###INSERT PICTURES OF SNOW IMPACTS/STONE IMPACTS###

ENVIRONMENT SHADER
These are miscellaneous options. "Alpha-tested" allows an alpha channel in the bump map to determine binary transparency for things like metal gratings or chain-link fences. "True atmospheric fog" is a redundant option in-case the shader is being used on a GBXModel, as it corrects the fog-popping issue. ###INSERT PICTURES GRATINGS/CHAIN-LINK FENCES AND OF FOG-POPPING###

ENVIROMENT SHADER TYPE
These alter the normal method of calculating a specular map (normally, it is simply the alpha channel of the base map). "Blended" allows for specularity to be implemented on an intermixed ground map, IE mixing grass/dirt with a metal tile floor. "Blended base specular" is a functionally redundant option, though sometimes it can be utilized to improve metallic/specular materials. All of these functions are calculated by taking alpha channels from various base, detail, and bump maps and combining them with a function such as multiply (where black=0, grey{128,128,128}=0.5, white{255}=1).

LENS FLARES
The only thing you need to know about this (other than what's already obvious) is that the location of each lens flare is calculated when the structure of the BSP is being built. Any changes here require a complete rebuild of the BSP to take affect!

SHADER EXTENSION
This section of the shader is only available to OS users.

DIFFUSE PROPERTIES
This section is primarily for manipulating detail maps. There is a primary, secondary, and micro detail map. Normally, all three can be used at the same time for things like cliff walls, where you want certain detail levels to exist when the player is a certain distance away (far away, slightly near, and extremely near). The idea being you only see the detail map that is appropriate for the proximity the player is to it. To have greater control over this feature, set the bitmap tag of the detail maps so they turn gray in their mip-maps (setting the bitmap tag to "detail map" does this automatically). When the shader is set to "blended" mode, the primary detail map shows up where the alpha channel of the base map is white; the secondary shows up where it's black; micro detail map ignores alpha channels and goes everywhere. The functions are best as they are, though changing them is useful for metallic/specular materials. Material color completely recolors the entire material with a tint (some form of weak multiplication), and can be useful if trying to save bitmap space where the only difference between two base bitmaps is a slight color tint, as suggested.

BUMP PROPERTIES
Bump maps create the illusion of depth when a dynamic light is cast on it. Specularity can help highlight the bump map without the aid of dynamic light. When Gearbox ported Halo to PC, they dramatically reduced the effectiveness of this feature.

TEXTURE SCROLLING ANIMATION
For things like waterfalls and conveyor belts, this option scrolls the entire material in a specified direction/speed. More functions do exist besides sliding, but have few uses.

SELF-ILLUMINATION PROPERTIES
Specified pixels in the material can be chosen to ignore radiosity and glow in the dark. There are three potential channels that can all follow their own function (glowing pattern) as defined by the glow map (often referred to as an illumination map ). The alpha channel controls the plasma animation via greyscale gradients.



SPECULAR PROPERTIES
Specularity is how glossy or wet looking a material can appear. This effect is exaggerated by the bump map. This is realized in two ways, looking directly at the material (perpendicular) and viewing the material at a side glance (parallel). Combined these two properties create an effective illusion. The colors picked for each viewing angle should be similar in intensity (or "dullness" like a pastel), often complimentary in color. The greater the contrast in all the parameters of each, the greater the look of "glossy wetness". Bungie did an excellent job picking out values that work well, reference their work whenever possible. The "overbright" and "extra-shiny" options can be valuable for metallic surfaces, their results vary depending on the bitmaps used (the specular map is extremely important to get just right). If you set the specularity too high, the material will look like smooth plastic.

REFLECTION PROPERTIES
As far as Halo is concerned, anytime you hear "reflection" instead think "cubemap". The option for "dynamic mirror" is listed here, changes require re-building structure of BSP. The surface of a dynamic mirror must be 100% planar and cannot face another dynamic mirror (creating an infinite reflection, which BLAM! can't handle). The options work similarly to the specular properties and usually compliment each other to get truly wet/glossy/shiny/metallic materials.

~Sali <3