| News | Tutorials | Coding | Reviews | Resources |
Leafs are something that all mappers should understand as they are an important factor in making a map without problems( who hasn't got the WARNING:leaf portals saw into leafs or the Max_Leaf_Faces error).Leafs come in to play in both the BSP and VIS compling. BSP(Binary Space Portal) splits each level into leafs(a convex hull->player space) and portals.This is then written to your *.prt file. The joint area between 2 leafs is called a portal. The way in which the level is split into leafs is very important,how can you effect this?..by using hint brushes (which will be discussed in another tutorial).All you need to know now is that during the compile process VIS finds the visibilty of different areas of your map by doing the following,
eg.(PLAN view)
-The red boxes
are the leafs.
Well this means that you have a leaf that isn't convex. David Hyde once gave the analogy 'It's equivalent to looking out the window of a room and seeing back into the room' and this pretty much explains it.
What can i do? This can be a very difficult problem to solve as you can't track it down normally as it more to due with portals than anything else.You basically have an over complex area thats generating this warning(check cyclindrical and vertex manipulated brushes first) and you can either simplify it, delete it or just turn it into a func_wall. What about the MAX_LEAF_FACES error?This results from an over detailed brush and the same solutions apply as above. Want to go into more detail?This is an extra/optional part of this tutorial which goes into more detail of how the leaf/portal system works.Take for example the following simple map,
BSP separates this map into 3 leafs (cells) and 2 portals which the next diagram(the PLAN view) demonstrates,
The red boxes are the leafs while the blue boxes are the portals.The generated *.prt file looks like,
The following information can be extracted from the *.prt,
If you don't fully understand these leaf/portal concepts yet have a read of this article on 3D graphics. |