- Home /
2d fake 3d objects cheaper in terms of drawcalls/ performance?
Hi,
I have a 3d flight sim game, I am looking at making it more efficient, I have many trees and bushes on the terrains, it makes performance bad..
I am looking at creating 2d fake 3d objects , to make performance faster in terms of drawcalls/ performance, will it actually help? If I have 1000's of 3d bushes, if they are instead 2d images on a plane it would be much better right?
What is the best approach to this? Any advise would be much appreciated.
Answer by Michael CMS · Aug 15, 2014 at 10:13 AM
Replacing 3D objects with 2D is done via sprites / billboards. Basically you will have a quad with a texture on it that will always face the position of your player.
Yes, your approach will improve performance, but not in terms of draw calls . You are optimizing the amount of geometry you are sending to the GPU , but your overdraw will increase (since all the sprites will be rendered with transparency ). Your draw calls should remain constant, since you are drawing all bushes in one pass regardless if they're 3D or 2D (you don't change shaders for different bushes/trees, do you ? :) ).
If you are bottlenecking at geometry , then the approach you mentioned will improve performance. However I'd suggest using a LOD approach first to see if that doesn't help you out (basically change the amount of polygons of the bushes according to the distance to the player : the bigger the distance the lower the amounts of polygons needed for the model).
Regarding the sprites / billboards : This practice makes sense for some 3D games , where the player is limited in his movement to a certain height. Considering you will fly over those trees, as well as being on-level with them, this will get more complicated.
You will probably need to change the rendered texture on the quad according to the angle of your plane with respect to the normal of the surface the object is placed on .
Or I guess using LOD and Occlusion culling would help a lot, I am not using that at the moment... any recommendations for a good free or cheap plugin that can handle this in Unity Free?