info_overlay
info_overlay
is an internal point entity available in all Source games. It is a much more powerful version of a standard decal. Unlike regular decal entities, overlays can be resized, rotated, scaled, and distorted.
Overlays should be created using the Hammer Overlay Tool, which will also set the sides
keyvalue accordingly. If you need the overlay to span multiple faces, open the overlay's properties in SmartEdit mode, choose Brush Faces and then Ctrl-Click in the camera window to add more faces.
Contents
Limitations/Bugs
Advanced Information
In Source, decals and overlays are not actually applied directly to the brush surface. They are planes that hover over the brush, without ever touching them. This is to keep in mind when you deal with overlays that will be projected on different faces that are not coplanar. A little gap will be visible between faces that go around a corner, as seen in the picture on the right. In corners such as these inside a room, the "overlay planes" will clip into each other, showing the two overlay multiplied together if they're not entirely opaque. This cannot be avoided since Source won't work that way. (Actual painting texels would be too expensive to do.) This is the same working for fake dynamic shadows and others projected textures on surfaces.
Distorting overlays
If the overlay is not yet placed, select the overlay tool and your material, and click where you wish the center of the overlay to be. You should now see 4 white boxes at the edges of the overlay, and you may drag them about to distort it.
If you wish to distort an existing overlay, first select the overlay you wish to edit, and then select the overlay tool. Then you should be able to distort the overlay as described above. If the overlay does not respond, try deleting it and then following the above procedure.
Storing of overlays
The info_overlays are all packed into a special lump in the BSP file. To enable accesses by name, a info_overlay_accessor entity is created in the compiled map, which translates targetnames to info_overlay ID numbers. Unnamed overlays do not have an info_overlay_accessor created for them, and as such do not count towards entity limits.
Keyvalues
- Name
(targetname)
<targetname> - Name of the overlay. Used to access the overlay with an env_texturetoggle or material_modify_control.
- Material
(material)
<material> - The material to overlay.
- Brush faces
(sides)
<sidelist> - Faces on which the overlay will be applied.
- RenderOrder
(RenderOrder)
<integer> - Higher values render after lower values (on top). This value can be 0–3.
- 0: Default
- 1: Medium
- 2: High
- 3: Very High
- U Start
(StartU)
<float> - U End
(EndU)
<float> - Texture coordinates for the image X-axis. This normally starts at zero (left) and goes to 1 (right). Adjust values to change position and scaling.
- V Start
(StartV)
<float> - V End
(EndV)
<float> - Texture coordinates for the image Y-axis. This normally starts at zero (top) and goes to 1 (bottom). Adjust values to change position and scaling.
- Overlay Basis Origin (Read-Only)
(BasisOrigin)
<vector> - Offset of the surface from the position of the overlay entity.
- Overlay Basis U (Read-Only)
(BasisU)
<vector> - Direction of the material's X-axis.
- Overlay Basis V (Read-Only)
(BasisV)
<vector> - Direction of the material's Y-axis.
- Overlay Basis Normal (Read-Only)
(BasisNormal)
<vector> - Direction out of the surface.
- Overlay Point 1(Read-Only)
(uv0)
<vector> - Overlay Point 2(Read-Only)
(uv1)
<vector> - Overlay Point 3(Read-Only)
(uv2)
<vector> - Overlay Point 4(Read-Only)
(uv3)
<vector> - Start Fade Dist
(fademindist)
<float> - Distance at which the overlay starts to fade (<0 = use fademaxdist).
- End Fade Dist
(fademaxdist)
<float> - Maximum distance at which the overlay is visible (0 = don't fade out).
- Minimum / Maximum Effect Details Level
(mincpulevel / maxcpulevel)
<integer choices> (in all games since ) - Don't render for players with Effect Details levels that exceed the minimum or maximum.
|
- Minimum / Maximum Shader Details Level
(mingpulevel / maxgpulevel)
<integer choices> (in all games since ) - Don't render for players with Shader Details levels that exceed the minimum or maximum.
|