Info overlay: Difference between revisions
DoctorGurke (talk | contribs) m (overlay limit has been recently increased for gmod as well) |
(RenderOrder; Changed ordering of sections - Ended up removing "Entity Description" while adding "Advanced Information") |
||
Line 1: | Line 1: | ||
{{Point ent|info_overlay|internal=1}} | {{Point ent|info_overlay|internal=1}} Its a much more powerful version of a standard [[decal]]. Against decals, overlays can be: resized, rotated, scaled, and distorted. <div style="float:right">[[Image:Overlays_gap.jpg|400px]]</div> | ||
Overlays should be created using the [[Hammer Overlay Tool]], which will also set the <code>sides</code> keyvalue accordingly. If you need the overlay to span multiple faces, open the overlay's properties in [[Hammer Object Properties Dialog#SmartEdit|SmartEdit mode]], choose '''Brush Faces''' and then <Ctrl>-Click in the camera window to add more faces. | |||
{{warning|If you carve, clip, or otherwise change the shape of a brush, you will have to update an overlay with the new brush face(s) id. Use the [[Hammer_Check_For_Problems_Dialog|Check for Problems]] tool to see which overlays are missing faces.}} | |||
== Advanced Information == | |||
In Source, decals and overlays are not actually "painted" on surfaces. They are simple planes that overlaps from a close distance brushes surfaces. This is to keep in mind when you deal with overlays that will be projected on differents faces that are not coplanar. A little gap will be visible between faces as you can see on the picture below. 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 [[Lighting#Dynamic_shadows|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. | |||
== Caveats and Bugs == | == Caveats and Bugs == | ||
Line 19: | Line 23: | ||
*If an overlay is set on a spot which has several (over 64) faces near by, the overlay will count these even if the faces arent set to the overlay. This will then cause VSBP to crash on compile with '''"Abnormal Exit in VBSP ParseLog causght! Catch: in vbsp_finish!"''' | *If an overlay is set on a spot which has several (over 64) faces near by, the overlay will count these even if the faces arent set to the overlay. This will then cause VSBP to crash on compile with '''"Abnormal Exit in VBSP ParseLog causght! Catch: in vbsp_finish!"''' | ||
{{tip|On spots like this it is recommended to use [[infodecal]] - entity instead. Another solution is to seperate that spot from other, by creating a new brush, curving it, and putting new overlay on it.}} | {{tip|On spots like this it is recommended to use [[infodecal]] - entity instead. Another solution is to seperate that spot from other, by creating a new brush, curving it, and putting new overlay on it.}} | ||
== Keyvalues == | == Keyvalues == | ||
Line 29: | Line 28: | ||
{{KV|Material|material|The [[material]] to overlay.}} | {{KV|Material|material|The [[material]] to overlay.}} | ||
{{KV|Brush faces|sidelist|Faces on which the overlay will be applied.}} | {{KV|Brush faces|sidelist|Faces on which the overlay will be applied.}} | ||
{{KV|RenderOrder|integer|Higher values render after lower values (on top). This value can be 0–3.}} | {{KV|RenderOrder|integer|Higher values render after lower values (on top). This value can be 0–3. {{ExpandBox| | ||
* 0: Default | |||
* 1: Medium | |||
* 2: High | |||
* 3: Very High | |||
}}}} | |||
{{KV|U Start, U End|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.}} | {{KV|U Start, U End|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.}} | ||
{{KV|V Start, V End|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.}} | {{KV|V Start, V End|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.}} |
Revision as of 15:09, 16 October 2021
Template:Point ent Its a much more powerful version of a standard decal. Against decals, 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.

Advanced Information
In Source, decals and overlays are not actually "painted" on surfaces. They are simple planes that overlaps from a close distance brushes surfaces. This is to keep in mind when you deal with overlays that will be projected on differents faces that are not coplanar. A little gap will be visible between faces as you can see on the picture below. 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.
Caveats and Bugs
- Info_Overlays will only work on world brush, displacement or func_detail, not any entity type.
- The material name can only be 256 characters long at maximum.
- There can be a maximum of 512 overlays in a single map. This limit was raised to 1024 for CS:GO and Garry's Mod.
- If an overlay is set on a spot which has several (over 64) faces near by, the overlay will count these even if the faces arent set to the overlay. This will then cause VSBP to crash on compile with "Abnormal Exit in VBSP ParseLog causght! Catch: in vbsp_finish!"

Keyvalues
- Name ([todo internal name (i)]) <targetname>
- Name of the overlay. Used to access the overlay with an env_texturetoggle.
- RenderOrder ([todo internal name (i)]) <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, U End ([todo internal name (i)]) <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, V End ([todo internal name (i)]) <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) ([todo internal name (i)]) <vector>
- Offset of the surface from the position of the overlay entity.
- Start Fade Dist ([todo internal name (i)]) <float>
- Distance at which the overlay starts to fade (<0 = use fademaxdist).
- End Fade Dist ([todo internal name (i)]) <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.
Choices - 0: Default ("Low" for
mincpulevel
, "High" formaxcpulevel
) - 1: Low
- 2: Medium
- 3: High
- 0: Default ("Low" for
- 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.
Choices - 0: Default ("Low" for
mingpulevel
, "Very High" formaxgpulevel
) - 1: Low
- 2: Medium
- 3: High
- 4: Very High
See also: cpu_level / gpu_level convars- 0: Default ("Low" for