I’m starting to investigate using UE4 for GearVR, and as part of that I did some performance testing that I thought I’d share since it may help others.
When I first started I just threw a scene together without really thinking of costs, I just wanted to get something on device so I could start testing. Very quickly I noticed that our Draw time (cpu render thread) was way too high, which would seem to indicate a draw call issue. So I took a step back and started a more rigorous performance test with the following characteristics:
- UE4 version: 4.11p8
- Device: Galaxy S6, consumer GearVR headset
- Packaging set to make shipping builds
- ASTC Compression for textures
- All objects in scene are static
- Postprocessing volume to disable all postprocessing effects
- Lightmass importance volume around objects
- Lightmaps provide all lighting via 1 static point light
- No skysphere or backdrops, plain black background
- All actors are basic cube with Basic Shape Material applied
From there, I started with 10 static cubes in the scene, and increased it in increments of 10 for each subsequent test. I then recorded the average Game and Draw thread times from the info displayed by ‘stat unit’. I’ve excluded the game time result from the table below because they didn’t vary significantly as the actor count changed (it was in the 2-2.5ms range for all tests).
[table=“width: 500, align: left”]
# Actors Draw (ms) 10 2.8 20 3.5 30 4.5 40 5.5 50 6.4 60 7.3 70 8.4 80 8.8 90 9.1 100 9.8 110 10.2 120 11.0
Out of curiosity after I finished this test I used the experimental ‘merge actors’ tool to merge all of the 120 cubes into a single mesh. Draw call time for that was ~1.8ms.
So, I had a few takeaways and questions after running this test:
First and foremost, does this look roughly like the expected draw call time required? Are there any changes I should be making to my test that would have a material effect on overall draw call time?
I know the GearVR best practices doc says don’t exceed 100 draw calls in any view, but if 100 draw calls is going to take ~10ms of time I feel like I need to aim much lower. Each game will be different in terms of needs and goals, but if these numbers are representative of performance I feel like we should probably be aiming for closer to 50 draw calls max in a view, so there’s time left for cpu/gpu.
Please send me any suggestions/tips/ideas you might have. I’m happy to re-run all the tests and update the thread with new information!