Caulk: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Introduction: Added note on http://bugs.thedarkmod.com/view.php?id=4635 -- portalsky now behaves more like caulk depending on mode
Geep (talk | contribs)
Rewrite and extension
Line 1: Line 1:
== Introduction ==
== Introduction ==
The word "caulk" can be used in two senses:
# 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.
# as a worldspawn brush with the caulk texture applied to one or typically all surfaces.


''Caulk actually is very useful for sealing areas of your map against the void.  Caulk is transparent, and shows the portalsky 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 be posssible. [This now depends on portalsky mode--see [http://bugs.thedarkmod.com/view.php?id=4635].]''
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]].


The rest of this article details using caulk to hide unnecessary tris, which is far less useful.
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 [http://bugs.thedarkmod.com/view.php?id=4635].)


Caulk is a texture which gets not drawn in-game, but seals against the void. Its main use is to save a few polygons (tris), avoid z-fighting in certain situations and it can also be a mapper convenience tool. Usually people apply caulk on surfaces the player can never see in any circumstances. Caulking surfaces reduces the amount of tris, and thus improves performance in some cases. See attached image 1 for an example use of caulk. [[Image:caulk_image.png|200px|thumb|right|Image 1. Caulk applied to a func_static window. Note that the surfaces touching the wall are caulked. These surfaces are not drawn in game, saving tris.]]  Testing has revealed that the caulking your map does not have a significant impact on performance.
== Other Uses of Caulk ==
Other potential uses, of caulk as a texture, are:
* to hide unseeable back-surface polygons (tris) of an object for performance - worth the effort only if planning extensive cloning of that object;
* to avoid z-fighting in certain situations;
* as a mapper convenience tool, namely, one way to make it easy to see into your map from the void, using the built-in DR Caulk filter.
Expand the section below to read early analysis that considered these uses.
<div class="toccolours mw-collapsible mw-collapsed" style="width:100%; overflow:auto;>


=== Caulk for Performance - Summary ===
To save a few polygons (tris), one can apply caulk on surfaces the player can never see in any circumstances. Caulking surfaces reduces the amount of tris, and thus improves performance in some cases. See attached image 1 for an example use of caulk. [[Image:caulk_image.png|200px|thumb|right|Image 1. Caulk applied to a func_static window. Note that the surfaces touching the wall are caulked. These surfaces are not drawn in game, saving tris.]]  Testing has revealed that the caulking your map does not have a significant impact on performance.


=== When not to use Caulk ===
=== When not to use Caulk ===
Line 32: Line 45:
It is not, according to these results, worthwhile to caulk existing maps, or to spend a lot of time caulking. Every saved tris help, of course, so the most beneficial course of action flow would be that the mappers integrate caulking in their ongoing work flow. If the mapper builds a func_static window he is going to clone and put everywhere, it is beneficial to use a few seconds to apply caulk on the source func_static and then get the caulking tris saving effect on all the clones. This does not add much work for the mapper, but will easily help the mapper to save the amount of tris in the range of thousand or two per medium sized scene where the windows and other cloned (but caulked) objects are present.
It is not, according to these results, worthwhile to caulk existing maps, or to spend a lot of time caulking. Every saved tris help, of course, so the most beneficial course of action flow would be that the mappers integrate caulking in their ongoing work flow. If the mapper builds a func_static window he is going to clone and put everywhere, it is beneficial to use a few seconds to apply caulk on the source func_static and then get the caulking tris saving effect on all the clones. This does not add much work for the mapper, but will easily help the mapper to save the amount of tris in the range of thousand or two per medium sized scene where the windows and other cloned (but caulked) objects are present.


Also, some mappers prefer to caulk the exterior surfaces of their maps, even this is absolutely useless because the engine does this automatically. The benefit of this strategy is an editor thing: using the DR caulk filter the mapper can easily switch off the exterior surfaces and view easily inside the map to get a better vantage point. See image 3. The upmost 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 caulk filter not active. The lowest image show how the mapping works when the caulk filter is activated. The mapper has a superior overhead view into his or her work. Similar result could be achieved by non-caulk-user by DR layers. [[Image:caulk_image3.png|200px|thumb|right|Image 3. Showing benefits of caulking as a mapping tool.]]
Also, some mappers prefer to caulk the exterior surfaces of their maps, even this is absolutely useless because the engine does this automatically. The benefit of this strategy is an editor thing: using the DR caulk filter the mapper can easily switch off the exterior surfaces and view easily inside the map to get a better vantage point. See image 3. The upmost 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 caulk filter not active. The lowest image show how the mapping works when the caulk filter is activated. The mapper has a superior overhead view into his or her work. Similar result could be achieved by non-caulk-user by adding a custom DR "Portal Sky" filter, or by using DR layers. [[Image:caulk_image3.png|200px|thumb|right|Image 3. Showing benefits of caulking as a mapping tool.]]


== Conclusion ==
== Conclusion ==
Mappers should not see extra trouble to get their work caulked since solid performance increases do not occur with the levels of tris saved by caulking. However, thousands of tris can be saved by simple workflow consideration, when working with objects which are cloned in large amounts. Caulking can also be a handy mapping aid.
Mappers should not see extra trouble to get their work caulked since solid performance increases do not occur with the levels of tris saved by caulking. However, thousands of tris can be saved by simple workflow consideration, when working with objects which are cloned in large amounts. Caulking can also be a handy mapping aid.
</div>


{{editing}}
{{editing}}
[[Category:Mapping Tutorials]]
[[Category:Mapping Tutorials]]

Revision as of 22:01, 11 April 2020

Introduction

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 potential uses, of caulk as a texture, are:

  • to hide unseeable back-surface polygons (tris) of an object for performance - worth the effort only if planning extensive cloning of that object;
  • to avoid z-fighting in certain situations;
  • as a mapper convenience tool, namely, one way to make it easy to see into your map from the void, using the built-in DR Caulk filter.

Expand the section below to read early analysis that considered these uses.