Archived

This topic is now archived and is closed to further replies.

MickeyMouse

frustum culling in quake

Recommended Posts

hi! just a question. why quake''s have only something like PVS (Potentially Visible Set of polygons) and no matter what''s your position in certain sector it''s engine always displays same set of polygon? i ask about this cause i think this could be a little faster (if i undestand it right) to implement some kind of frustum culling through portals between connected sectors - this way we wouldn''t draw many triangles which don''t fit in our view through portals (i mean this what we can see through door, window etc...) uhh...sorry if i didn''t explain this clear enough, hope some of you got an idea

Share this post


Link to post
Share on other sites
My guess is it''s the tradeoff between figuring out what polygons are visible in the view frustrum versus using a quciker culling algorithim that MAY calculate some polygons u don''t need.... that''s just my guess.


If john carmack did it the way he did, chances are it''s the quickest way of doing it

Share this post


Link to post
Share on other sites
my solution is to divide whole world into sectors, each of them having it's own bsp tree or octree and at the same time to have PVS - this way you draw at most same amount as you would draw using only PVS, but using some kind of culling based on bsp you easily realise which triangles are not visible at all

bsp based culling is very fast...
when being in sector A checking whether some triangles of sector B are visible through portal connecting them is very fast too (i can see about 40 multiplications)..
40 assuming portals are quads which is not bad approximation

so why not to do it? hmmm

[edited by - MickeyMouse on March 19, 2002 7:08:58 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by MickeyMouse
hi!
just a question.
why quake''s have only something like PVS (Potentially Visible Set of polygons) and no matter what''s your position in certain sector it''s engine always displays same set of polygon?

i ask about this cause i think this could be a little faster (if i undestand it right) to implement some kind of frustum culling
through portals between connected sectors - this way we wouldn''t draw many triangles which don''t fit in our view through portals (i mean this what we can see through door, window etc...)

uhh...sorry if i didn''t explain this clear enough, hope some of you got an idea



Quake (in quake 3, at least) _does_ frustrum cull, but only at the BSP level. Spinning in place will result in some triangles not being drawn, even if you don''t move out of that ''sector.'' This happens whenever a BSP node''s bounding box ends up entirely outside of your camera''s viewing frustrum.

I think you''re talking about the kind of clipping to portals culling that full portal engines do. Quake doesnt do this because it''s computationally expensive, and Id wanted it to run on as old of a machine as possible. The PVS is really a precalculated portal clip. They just clip against a big region and store it when the map is compiled, instead of clipping dynamically with one specific position at run time.

The reason for this is that it''s typically cheaper to let your hardware sort out a few extra triangles than to calculate a perfect portalization in software.

Share this post


Link to post
Share on other sites