- Home /
Reduce draw calls with static / dynamic batching
Hello guys,
I'm trying to reduce the draw calls (around 4000 at the moment) for some of my scenes. Even though I red different answers and topics, I still don't understand how to get it work.
I have Unity PRO and I have access to both dynamic and static batching. I understand that dynamic batching it's not working as it should ? Anyway to test if it even works (like, should I see a reduction in draw calls when I start the scene ?) Regarding the static batching, I tried clicking on the 'Static' option for each of my objects in the game, but I see no improvement when I start it in player.. Do I have to parent my objects to another object and make static that one ? Do I have to attach a certain script or activate some more options in Unity ?
I really need help here, as even though 4000 draw calls have no problem on my computer, it is not working smooth on other computers.
Thank you.
$$anonymous$$ore info about your scene will be great.
Please add stuff like: number of objects (and their mesh details), number of materials, shaders used etc.
All of these effects the batching.
Answer by Sisso · Jul 25, 2013 at 01:00 PM
There is many rules that must be followed if you want to use batching, probably you are not following some of them (scale, material, shadow, vertex number, etc).
Take carefull look in docs and search some tutorials:
http://docs.unity3d.com/Documentation/Manual/DrawCallBatching.html
It is always good to create a empty scene with simple objects and try to understand what situations you can use and can not use batching.
In the end, you can always directly merge some models by script or 3d program and reduce the number of calls.
Good idea with the test scene. Dorpeleg asked more details about the scene. I'm using the following packs to create my scenes :
https://www.assetstore.unity3d.com/#/content/7101
https://www.assetstore.unity3d.com/#/content/1021
Also, multiple directional lights affect the draw calls ?
The fact that you showed us the pack doesn't help very much because we don't know how your scenes are built.
Everything effects drawcalls.
If you have lights, yes.
If you have shadows, even more.
I have both shadows and lights. I understand I have to work on these 2. $$anonymous$$y question is, with static batching how I know it works ? Does it show in the player stats when you start the player or it is working always, even without starting the scene ?
I'm asking because my values for draw calls are the same with the player started or without (even though I have static batching on)
Just Read the entire link @Sisso provided.
And really check how your scene is built.
I don't think that the values you see while the game is not running are updated.
I talked with the graphic guy. What I said was wrong, we are using very few dynamic batching stuff. Because its limitations it is only good for simple stuff (no skinned mesh) or prepared assets (like use texture atlas).
Your answer
Follow this Question
Related Questions
difference between static and Dynamic Batching 1 Answer
Batching Nightmare, What affects dynamic Batching!? 0 Answers
draw call batching with tint color 2 Answers
why wont Static mesh always batch with same material? 0 Answers
Batching objects problem 1 Answer