Page 1 of 1

Attn Paul: Visibility culling

Posted: Sun May 23, 2004 6:52 am
by Tom Hatfield
You're quite possibly more familiar with the DM code than any of us. Is there any visibility culling technique used in DM/CSB to cull tiles that are blocked by walls? If so, would you be kind enough to give a brief explanation of how it works? Is there any ray-casting going on, or did they just render the whole scene back-to-front?

Posted: Sun May 23, 2004 3:42 pm
by Paul Stevens
Pretty simple back-to-front. They may skip a couple
of cells that are blocked by walls in front. The function
DrawViewport() does the work and is relatively simple.
It calls individual functions for each cell.

Posted: Sun May 23, 2004 8:15 pm
by Tom Hatfield
Cool, thanks. I'm just trying to get info for a clone project. As it stands, I'll be using a scanline triangle fill algorithm to determine cells that fall within the viewing frustum. I'll probably want some kind of raycaster to throw out cells that are completely hidden behind walls, but I'm still working on that.