Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lowering draw calls by not drawing things that are not visible

Tags:

unity3d

I was searching for methods to optimise my game.

I was thinking if there is a way to not draw the objects that are in the camera view but are not visible to the viewer?

The thing is that i need to lower my draw calls and at any given time, there are at least 12 game objects that are not visible to the camera. Can this be done?

like image 969
Alex Avatar asked Nov 09 '12 10:11

Alex


Video Answer


2 Answers

What you are looking for is called occlusion culling and it's a built-in feature in Unity. In order to lower the number of draw calls there are some more techniques interesting for your problem:

  • Frustum culling
  • Layer specific culling
  • Texture atlasses i.e. several different objects share the same material
  • Static and dynamic draw call batching
  • LOD (level of detail)
like image 56
Kay Avatar answered Jan 01 '23 18:01

Kay


Kay is right to reduce draw call of objects which are not visible you need to use occulusion culling,

and if you still wants to reduce more draw calls you should use Free unity plugin "Draw Call Minimizer" by Purdyjo available on asset store.
and here is its unity video tutorial

like image 34
NabeelSaleem Avatar answered Jan 01 '23 19:01

NabeelSaleem