Simple Culling Idea

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
User avatar
paul424
Gnome
Posts: 314
Joined: Thu May 24, 2012 7:16 pm
x 13

Simple Culling Idea

Post by paul424 »

Hello, I have an idea regarding how culling could be done in 3d graphics, I don't know whtether it was somewhere already implemented ...
The idea is simple , based on the notion of a drawn object's Inscribed sphere' and Circumscribed sphere . Note : this requires objects sorting , by their distance from the camera. The mechanism protects only from object overdrawn , not missing the culling frustum ....

Given the set of entities to be drawn , say E1, E2 ... EN we use precomputed Inscribed sphere [IS] and Circumscribed sphere [CS] of each one to perform culling . Whenever an object passes our test the radious and position of the object's IS on the screen are stored . Noticed that the projection of the Sphere onto the plane is always a circle ! The culling test is : For and Entity to be drawn check whether it's {CS] does include inside some already existing circle created from the IS'es .
This is only one instruction ( dist( E1 - E2) < | R1 - R2 | ) ! Although the resulting method's ( including sorting which itself is O(nLNn) right ? ) complexity is something like O(n^2) .... this seems to be good method when there are many dynamic entities on the screen , which cannot be culled ( and traced ) easily otherwise .... ( hmm somethimg like space shooter or 3D Asteroids ) ....
What do you think of that /?
Post Reply