View Full Version : making objects in frustrum invisible

04-11-2004, 05:37 PM
I am making an fps and I have already implimented frustrum culling and added an octree. What I was wondering was, is there some kind of algorithm to display only the visible objects in the frustrum. Like when I am looking I can only see a certain number of walls, and the ones behind don't need to be rendered. Is there something I can do to impliment this? Thank you for your help!

04-11-2004, 05:57 PM
This is a huge area of research currently, and there are some great ideas out there. One of the most popular methods is creating a bsp leaf visibility matrix. If you don't know what that is, then run like mad over to Id software's web site, and grab the Quake3 tools, and study the vis files. It's alot to take in if you're new to this stuff, but it is more than worth the effort.
Id has always been fantastic about sharing their source, and you would do well to learn from it. The idea is to precompute a leaf to leaf visibility table, that can be used at runtime. This table is arranged so that you can input the leaf the camera is in, and the table tells you the leaves that are visible. Very, very, cool.

Another related method is portal rendering. I believe the Unreal engine uses this method, based on leaf zones. I don't think they have public source for that though, but the idea is simple, if you understand bsp trees.

With an octree, all this might be a tad tricky, to put it lightly. Though, it would be a great research project!