Skip to main content
gamedev.net
🔒 Locked

Occlusion algorithm

Started by DumbBill Feb 23, 2003 at 2:11 PM 4 replies 1.5k views
Original Post
DumbBill
DumbBill
Greeetings. I have just added view-frustum culling to my simple renderer using an octree scene graph, and it seems to be working ok. But (whether it is not totally correctly implemented I don''t know) for some reason I am not experiencing a fantastic speed-up. One way round this would be to use occlusion culling to get rid of many more nodes, but I am a little stuck on where to start. Does anyone have any code for a similar thing? Direct3D preferably, but OpenGL would do. If not, some tutorials would be nice.... I just can''t seem to figure the rendering of the occluders bit... where do you render them? into the Z-buffer? how??? (perhaps I''m being dumb, but my head is just hurting a lot with all this new notation..... arghhhh.) Any help would be muchly appreciated...
-=Code=-
-=Code=-
Hey there,

Try looking at www.gamasutra.com in the programming section for fast outdoor occlusion culling article, or something of that name, which discusses the techniques you are probably referring to.

arnero
arnero
hirachical viewing frustrum culling reduces geometry
occlusion culling reduces fillrate

So I ask, what limits your brute force implementation?
I mean could you please list fps for different resolutions?
Yann L
Yann L
quote:

occlusion culling reduces fillrate


Occlusion culling reduces both geometry and fillrate. But besides that, DumbBill, he is right that you need to know your bottlenecks. Although generally I would tend to say that there is something wrong with your code, if you don''t feel a difference between frustum culled and brute force (normally, the difference is huge), but there are situations, where no speedup will occur. Especially low-poly count scenes, here the overhead of culling might outweight the overhead of just rendering the additional faces and let the hardware clip it. How much faces is your scene ? Pick a certain test frame. How much faces are in the view ? And what is the speedup you gain on that particular frame ?

You said, you were using an octree. How do you organize and render geometry ? Do you traverse each an every polygon, or do you send a vertex buffer/array per octree node ?

About occlusion mapping, you could check out this paper. But I would seriously consider fixing the frustum culling first, if I were you.

/ Yann
gamelife
gamelife
an article on gamasutra site: occlusion culling algorithms

quote:
How do you organize and render geometry ? Do you traverse each an every polygon, or do you send a vertex buffer/array per octree node ?


If faces in an octree node are associated with different render states/textures, is it better to first traverse all octree nodes and group faces with same render state together?
Ingenu
Ingenu
Yes it is.
State change is what slow down graphic cards the most.
(and a few tech, like stencil shadow volumes which are fast on only the latest hardware [GFFX, R300])


-* So many things to do, so little time to spend. *-
-* So many things to do, so little time to spend. *-

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.