Well let us start with CSG.
CSG creates all brushes, vertex, faces, point entities, face normals...ect This is why it must be first before the rest. These things are the base of all maps without them nothing else can be done.
________________________________________________________The main purpose of the
BSP procces is creating the four hulls the game needs. Hulls 0-3.
Hull 0 is the colusion hull, the clip nodes. It determines whats solid and whats not.
In it's prossec bsp split faces into regions, each of these region, each one of these regions is a clip node that derermine that it's solid or not.
The other hulls are visual and determine what faces are on the inside and what are on the outside. BSP determines that by the location of the entities. Entities should be inside the hull so this is a very useful way to know whats the inside or out side. If there are no entities in the hull then BSP can't calculate at all. An entity outside the hull makes BSP think the void is the hull, so it will create a leak, since it wont be able to determine whats the void and whats the inside of the level.
A leak in hull 0 means BSP can't finish all the hull because there is a small hole, smaller then the player, it cannot determine wether it is solid or not. But it can still complete the other hulls to determin whats the inside and whats the outside. The old Q-tools could still run rad and vis with this leak, in ZHLT this behevior was removed to make the mapper fix the leak. Even if the map wont be fullbright the fps will drop.
A leak in other hulls mean the compiler can't even determine whats the inside of the room and whats the outside. In that kind of case the hole is larger then the player and the map wont run usally.
Vis and rad need BSP's 1-3 hull calculations in order to oporate.
_______________________________________________________VIS is an extremely important procces and should always run.
It's purpose is to detemine from each spot what objects can be seen, things that can't be seen wont be rendered. Running will raise the preformence alot, without it all the map will be rendered at once.
The vis creates leafs and portals to help him calculate. Portals are the edges of the bsp clip nodes.
Leafs are lines that are drawn from each clip node to another, if that line is broken by a solid brush the other node cannot be seen from that point and hence wont be rendered. If there is a straight unbroken leaf between two nodes, even the edge of the nodes' portal, even if in most parts of the nodes that other node can't be seen, it will be rendered.
This is where hint brushes come it. They create a portal and split those nodes, and in this way you can discard a node that normally will be render from another spot. This is how they raise the preformence. A node covered by another world brush will be discarded since it couldn't be seen from any point.
It ignores entities, this is important cause it wont draw portals and split faces they cover.
As you probebly know calculating and drawing leafs from each portal to another is hard work and takes the compiler a long time.
________________________________________________________RAD simply uses vis's calculations to calculate the light, where everything will be lit and where it will be dark. It calculates everything concerning lighting, all the little special affects like bounce ,and most important what blocks lights, thats why it needs vis to tell it from where each node can be seen. RAd also determines from each light source where the light is broken by by a brush, he uses the same method vis does, leafs.
Making opaque entities(blocks light) makes rad work harder since vis ignores them in it's calculates, rad needs to calculate some of them by his own.
This is it. An explenation on the HL compiling procces, and a little on leaks.