Occlusion culling for spinning sphere dataset

167 Views Asked by At

I am currently working on an assignment in which I have to implement a CPU-only rasterizer for sphere datasets. The datasets are static and therefore don´t change in runtime, even though the whole set can rotate in front of the camera.

The idea now is to implement some occlussion culling method so the spheres occluded by other spheres from the camera´s point of view don´t make it to the next stage of the rasterizer, (testing against z-buffer and shading of pixels) wasting CPU time.

I´ve been looking at possible ways to achieve this. First I thought about a Hierarchical Z-Buffering implementation which maintains the scene model in an octree. However, since the datasets spin around, I would need to recompute the octree every frame which could be pretty expensive. Am I right?

I am not sure whether spatial hashing or some cheaper to compute hierarchical organisation of the spheres dataset could be more beneficial in this scenario. Any thoughts on this? Please, note that this has to be fully implemented on CPU.

1

There are 1 best solutions below

0
On

front-to-back extents checking.

If the sphere's don't intersect, consider them disks.