Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

Optimizing Mobile Render Time (Low Draw Calls & Vertex Count Already!)

$
0
0
I made a change to my game where all 100 objects on screen were optimized to batch together (reducing draw calls from 45 to 14) and the vertex count was reduced dramatically. Each object used to be 1630 verts and is now 600 verts. **My framerate did not improve at all.** Unity's internal profiler on iOS reveals this about my game: **BEFORE** cpu-player> min: 43.7 max: 65.3 avg: 46.3 cpu-ogles-drv> min: 9.5 max: 11.6 avg: 10.1 cpu-present> min: 0.4 max: 2.9 avg: 1.1 frametime> min: 54.6 max: 80.2 avg: 57.9 draw-call #> min: 49 max: 49 avg: 49 | batched: 1201 tris #> min: 75590 max: 75590 avg: 75590 | batched: 58946 verts #> min: 56250 max: 56250 avg: 56250 | batched: 45010 player-detail> physx: 6.7 animation: 3.7 culling 0.0 skinning: 0.0 batching: 12.7 render: 10.7 fixed-update-count: 1 .. 1 mono-scripts> update: 9.7 fixedUpdate: 0.7 coroutines: 0.0 mono-memory> used heap: 45035520 allocated heap: 74444800 max number of collections: 0 collection total duration: 0.0 **AFTER** cpu-player> min: 36.7 max: 39.8 avg: 38.5 cpu-ogles-drv> min: 4.6 max: 5.5 avg: 4.8 cpu-present> min: 0.9 max: 3.8 avg: 1.5 frametime> min: 42.9 max: 50.0 avg: 45.3 draw-call #> min: 14 max: 14 avg: 14 | batched: 1232 tris #> min: 40236 max: 40236 avg: 40236 | batched: 32560 verts #> min: 35614 max: 35614 avg: 35614 | batched: 30096 player-detail> physx: 0.4 animation: 3.4 culling 0.0 skinning: 0.0 batching: 7.2 render: 15.2 fixed-update-count: 1 .. 1 mono-scripts> update: 9.3 fixedUpdate: 0.7 coroutines: 0.0 mono-memory> used heap: 20541440 allocated heap: 29650944 max number of collections: 0 collection total duration: 0.0 You can see that the render cost is quite high in the After state. In fact, render time is reporting as **HIGHER** in an environment where draw calls and vertex count were lower! What gives? What does that **render** number refer to specifically and how do I improve it? The docs don't delve into enough detail. *For context, each object is an animated character that uses traditional parented animation instead of skinned meshes for batching purposes. Each one is composed of around 13 submeshes that are never more than 100 verts each.*

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>