Caulk

From The DarkMod Wiki
Revision as of 00:00, 12 April 2020 by Geep (talk | contribs) (Reformat and editing)
Jump to navigationJump to search

Introduction and Main Uses

The word "caulk" can be used in two senses:

  1. as a texture, which appears magenta in DR, but is not drawn in-game. Like other textures, it can be applied to the faces of brushes (worldspawns), func_statics, and so on.
  2. as a worldspawn brush with the caulk texture applied to one or typically all surfaces.

It is the second meaning in which caulk actually most useful:

  • for sealing areas of your map against the void;
  • for defining and sealing, in conjunction with visportals, individual vis leaf areas of your map. These are important for avoid unnecessary, performance-sucking rendering, and to provide more-plausible sound propagation. For more about this, see Visportals and Sound Propagation: Part 1.

Other transparent "no draw" textures do not have the sealing property that caulk has. Caulk's transparency allows the portalsky to be seen through it, as well as any func_statics that touch your current vis leaf. That means you can cut a func_static house in half with a caulk brush, and still see both sides of it. Using portalsky this would not traditionally be possible. (It now depends on portalsky mode--see [1].)

Other Uses of Caulk

Other secondary potential uses, of caulk as a texture, follow.

Hiding Unseeable Tris

Caulk can be used to hide:

Image 1. Caulk applied to a func_static window.
  • back-surface polygons (tris) of a prop object, such as a door or window as in Image 1. There, surfaces touching the wall are caulked, so are not drawn in game, saving tris. Such caulking is worth the effort only if you plan massive cloning of that object;
  • worldspawn brush surfaces entirely covered by detail work like patches.
    Image 2. Caulk applied to a unseeable worldspawn brush surface.
    See Image 2. The player can never see the caulked surface because it's hidden by the func_static vault. This not only saves tris (which is not really important), but also removes the sparkling of the other texture at the highest point of the vault.

Avoiding Z-Fighting

Caulking helps in certain circumstances, e.g., with a vault as seen in Image 2. The caulked worldspawn surface does not "sparkle" or z-fight through the highest point of the vault, where the vault patch and the worldspawn brush are at equal height.

As a DR Mapper Convenience

Some mappers like to caulk the exterior surfaces of their maps.

Image 3. Benefits of caulking as a mapping tool.

While unnecessary for game play (since the engine does this automatically), it benefits editing. By using the DR Caulk filter, the mapper can easily switch off the exterior surfaces and see inside the map to get a better vantage point. See image 3. The top image shows how mapping works for mapper who do not caulk the exterior. It is difficult to get a good overhead view of the work, and the mapper has to either hide the exterior brushes or fly inside the map. The middle image shows how mapping works for mapper who do caulk the exterior, when the caulk filter is not active. The bottom image show how the mapping works when the caulk filter is activated. The mapper has a superior overhead view into the work.

Be aware that similar result can be achieved by non-caulk-user by:

  • adding a custom DR "Portal Sky" filter
  • using DR Layers.

Expand the section below to read an early analysis that considered the performance impact.