Why Doesn't It Leak?

Discussion in 'Mapping Questions & Discussion' started by Beetle, Nov 11, 2013.

  1. Beetle

    Beetle L9: Fashionable Member

    Positive Ratings:
    Why does Hammer allow you to cover an entire map with a trigger brush and it won't leak as long as the origin is inside the map and it doesn't overlap other parts of the map that are completely detached from the main one? Like, I'm able to cover the whole map with the brush and CLEARLY go out into the void with it.

    Though it doesn't cause leaks or any other noticeable error, Is it bad?
  2. UKCS-Alias

    aa UKCS-Alias Mann vs Machine... or... Mapper vs Meta?

    Positive Ratings:
    Its not bad. Its kinda like some other props that are far too large for the map. They still render fine. Its just like a large bounding box on a prop.
    • Thanks Thanks x 1
  3. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Positive Ratings:
    It is the nature of what a leak is, and why they exist. The compiler needs to determine what is the inside and what is the outside of a level, and it does so by looking at the entities.

    Enclosed space that contains entities? World space, compile it.
    Enclosed space that contains no entities? Void space, cull it from the map. (even if it doesn't touch the "outside", if there are no entities it is still void)

    When it finds an entity in unenclosed space, it gets confused and the resulting leaf structure cannot be used for visibility calculation.

    Brush entities exist as two separate but associated components. One is the entity, which exists at a specified location in the map. The other is the brush, which is stored away from normal brushes as a "model". The entity half specifies (by number) which model it is associated with (you can see this if you look at the entity data in a compiled BSP). If you -onlyents to remove a brush entity, you will see the disastrous results from this, as the model data is not updated but all the entities are, thus shifting each brush entity to be associated with a different model (trigger brushes as solid doors, doors being death pit hurts).

    Where I am going with this is: only the origin needs to be inside because that is actually where the entity exists, it does not "fill" the infinite number of locations within the brush. The brush and the entity are not one in the same, that's why it doesn't leak.
    • Thanks Thanks x 3