Info overlay: Difference between revisions
m (Updated keyvalues) |
SirYodaJedi (talk | contribs) |
||
(77 intermediate revisions by 33 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{Source topicon}} | ||
== | <div style="float:right">[[File:Overlays_gap.jpg|400px|thumb|Mind the gap.]]</div> | ||
{{this is a|point entity|internal=1|name=info_overlay}} 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 <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. | |||
== 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 [[Lighting#Dynamic_shadows|dynamic shadows]] and others projected textures on surfaces. | |||
=== Distorting overlays === | |||
== 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 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. | 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, an [[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 == | == Keyvalues == | ||
{{KV|Name|targetname|Name of the overlay. Used to access the overlay with an [[ | {{KV|Name|intn=targetname|targetname|Name of the overlay. Used to access the overlay with an {{ent|env_texturetoggle}} or {{ent|material_modify_control}}.}} | ||
{{KV|Material|material|The [[material]] to overlay.}} | :{{note|Naming an overlay will cause creation of {{ent|info_overlay_accessor}}, which counts as an [[edict]].}} | ||
{{KV|Brush faces|sidelist|Faces on which the overlay will be applied.}} | {{KV|Material|intn=material|material|The [[material]] to overlay.}} | ||
{{KV|RenderOrder|integer|Higher values render after | {{KV|Brush faces|intn=sides|sidelist|Faces on which the overlay will be applied.}} | ||
{{KV|U Start | {{KV|RenderOrder|intn=RenderOrder|integer choices|Higher values render after ("on top of") lower values. This value can be 0-3. }} | ||
{{KV|Overlay Basis Origin | {{KV|U Start|intn=StartU|float}} | ||
{{KV|Overlay Basis U | {{KV|U End|intn=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.}} | ||
{{KV|Overlay Basis V | {{KV|V Start|intn=StartV|float}} | ||
{{KV|Overlay Basis Normal | {{KV|V End|intn=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.}} | ||
{{KV|Start Fade Dist|float|Distance at which the overlay starts to fade (<0 = use fademaxdist).}} | {{KV|Overlay Basis Origin|intn=BasisOrigin|vec3|Offset of the surface from the position of the overlay entity.}} | ||
{{KV|End Fade Dist|float|Maximum distance at which the overlay is visible (0 = don't fade out).}} | {{KV|Overlay Basis U|intn=BasisU|vec3|Direction of the material's X-axis.}} | ||
{{KV|Overlay Basis V|intn=BasisV|vec3|Direction of the material's Y-axis.}} | |||
{{KV|Overlay Basis Normal|intn=BasisNormal|vec3|Direction out of the surface.}} | |||
{{KV|Overlay Point 1|intn=uv0|vec3}} | |||
{{KV|Overlay Point 2|intn=uv1|vec3}} | |||
{{KV|Overlay Point 3|intn=uv2|vec3}} | |||
{{KV|Overlay Point 4|intn=uv3|vec3}} | |||
:Distance from origin to each of the four corners of the overlay, in units. | |||
:{{tip|To edit the size of the overlay manually using these KVs: | |||
:# Disable [[SmartEdit]], | |||
:# Edit the values of the KVs, | |||
:# Apply changes to entity properties, | |||
:# Hit {{key|Ctrl|Z}} then {{key|Ctrl|Y}} to refresh the size of the overlay in the 3D view if it doesn't do so automatically.}} | |||
{{KV|Start Fade Dist|intn=fademindist|float|3=Distance at which the overlay starts to fade (<0 = use fademaxdist).}} | |||
{{KV|End Fade Dist|intn=fademaxdist|float|3=Maximum distance at which the overlay is visible (0 = don't fade out).}} | |||
{{KV SystemLevelChoice}} | |||
== Limitations/Bugs == | |||
{{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. This is fixed in {{hammer++|4}}.}} | |||
{{warning|info_overlays will only work on [[world brush]]es (including [[func_detail]] and [[func_ladder]]), and [[displacement]]s; they cannot be used on [[brush entities]] or [[models]].{{workaround|To simulate overlays on brush entities, create a nonsolid [[func_brush]] with the same shape as the entity to be decaled, texture it with an a [[$decal]] material (and nodraw), and [[parent]] it to the entity to be decaled.}} }} | |||
{{warning|There can be a maximum of 512 overlays in a single map. This limit was raised to 8192 for {{gmod|4}} and {{Mapbase|4}}, and 1024 in all other games since {{csgo|4}}. | |||
{{tip|This is a compiler limit, not an engine one, and can be bypassed with a modified VBSP, such as {{mapbase|4|addtext='s}}. Named overlays will still count towards [[entity limit]]s, but unnamed overlays will not.}} }} | |||
{{warning|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.}} }} | |||
== See also == | |||
* {{ent|infodecal}} | |||
* {{ent|info_overlay_transition}} | |||
[[Category:Source]] | |||
[[Category:Material System]] |
Latest revision as of 18:08, 6 May 2025
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.
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, an 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.
Note:Naming an overlay will cause creation of info_overlay_accessor, which counts as an edict.
- Brush faces (sides) <sidelist>
- Faces on which the overlay will be applied.
- RenderOrder (RenderOrder) <integer choices>
- Higher values render after ("on top of") lower values. This value can be 0-3.
- 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 (BasisOrigin) <vector3>
- Offset of the surface from the position of the overlay entity.
- Overlay Basis U (BasisU) <vector3>
- Direction of the material's X-axis.
- Overlay Basis V (BasisV) <vector3>
- Direction of the material's Y-axis.
- Overlay Basis Normal (BasisNormal) <vector3>
- Direction out of the surface.
- Overlay Point 1 (uv0) <vector3>
- Overlay Point 2 (uv1) <vector3>
- Overlay Point 3 (uv2) <vector3>
- Overlay Point 4 (uv3) <vector3>
- Distance from origin to each of the four corners of the overlay, in units.
Tip:To edit the size of the overlay manually using these KVs:
- Disable SmartEdit,
- Edit the values of the KVs,
- Apply changes to entity properties,
- Hit Ctrl+Z then Ctrl+Y to refresh the size of the overlay in the 3D view if it doesn't do so automatically.
- 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.
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
Limitations/Bugs











