Search code examples
game-engine3d-rendering

Does a 3D engine needs to analyse all the map objects before rendering


Does a 3D engine needs to analyse every single object on the map to see if it's gonna be rendered or not. My understanding is that a line from the center of projection to a pixel in the view plan, the engine will find the closest plan that intersect with it, but wouldn't that mean that for each pixel the engine needs to analyse all objects in the map, is there a way to limits the objects analysed.

Thanks for your help.


Solution

  • Such procedure are called frustum-culling algorithm.

    You can also find more information about it here :-

    Beware, what you seek for is not the same as "occlusion culling" (another related link "Most efficient algorithm for mesh-level, optimal occlusion culling? ) ", which is another optimization when an object is totally hidden behind another one.

    Note that most game-engine render by object (a pack of many triangles - via draw calls, roughly speaking ), not by tracing each pixel (ray-tracing) as you might understand.

    Ray-tracing is too expensive in most real-time application.