Wow, after decifering numerous tutorials and explainations of "hint" brushes, I think I now fully understand them. Basically the game engine breaks up and renders sections of the map. These sections are then used to render polygons on screen. So basically the game looks at the games premade boxes to render. And if anywhere in my current box I can see another box, the game enigne will render the other box and its contents. So basically these hint brushes are used to divide up the visability zones of your game and thus make less boxes visable from your players view.
So in summary and maybe to make myself clearer:
The game engine breaks the bsp file into triangles and visability sections.
The visibility section that the camera is in is always rendered.
Any other visibility section that can be seen from your current visable section will also be rendered.
This rendering of other visability zones is not determined by where the camera is but by where the camera could be in the visability zone.
So lets say you have a long hallway with a room at both ends.off to the right. So its a c shape
Code: Select all
Diagram
_____
[ ___]
[ ]
[ ]___
[_____]
Logically the game engine breaks it down into 3 visability sections as so:
Code: Select all
Diagram A
_____
[ |__]
[ ]
[ ]___
[__|__]
Note the long vertical room of visibilty, and the two small rooms of visibility. Now this isnt always the way that the engine will divide up the space. It is unknown if the engine will cut it like above or like this:
Code: Select all
Diagram B
_____
[____]
[ ]
[__]__
[____]
How the engine devides up these rooms is key to rendering the other rooms.
Now lets lable the hallway on the left A the top room B and the bottom room c.
This section will explain hint brushes according to diagram A.
While in the top room(b) from any place you can only see into the hallway(A). Right?
While in the bottom room no matter where you are placed, you can only see into the hallway.
Now in the hallway, you have the possibility to see into the top room(b) or the bottom room(c).
So, what will the game render besides the hallway when you are in it? You can possibly see into the two other visibily rooms B and C remember.
When given this problem the game sees what rooms are possible to see from any point in your current room. So in other words, both rooms will be rendered.
So waht about Diagram B?
In diagram B no matter what room you are in you can posibly see into all of the other rooms. So the engine will simply render all of the rooms at the same time.
How can I fix diagram B?
You will have to see the tutorials online for this: I cant show it in code diagrams.
Here are the full diagrams that made everything click for me.
http://developer.valvesoftware.com/wiki/Visleaves
http://developer.valvesoftware.com/wiki/Hint_brush
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.