The Optimization Process

Tutorial

·

intermediate

·

+0XP

·

30 mins

·

(319)

Unity Technologies

The Optimization Process

The process of taking a piece of software and improving its performance is called optimization. In this tutorial, we review the steps we take when optimizing our 3D mobile applications.

1. What is the Optimization Process?

Optimization is the process of taking a piece of software and modifying it to improve performance. For mobile applications, this typically means modifying the application to make it run faster on mobile devices with limited resources.

In this course, we will be focusing on optimizing 3D art assets: our models, textures, materials, shaders, and lights.

For example, a mobile game you’re working on could be exhibiting low frame rates, might appear jumpy, make your phone warm, and use up considerable battery life. These issues could be caused by a complex model or an unoptimized shader. This can give a bad impression and make the game difficult to play. Profiling and optimizing games to improve performance can often lead to a better, smoother experience.

When optimizing 3D art assets, we will use an iterative process that guides you through finding and removing performance problems.

The optimization process consists of the following steps:

  1. Profile, or take measurements, of your application with a profiler.
  2. Analyze the data to locate the bottleneck.
  3. Determine the relevant optimization to apply.
  4. Verify that the optimization works.
  5. If the performance is not acceptable, return to Step 1 and repeat the process.

The following is an example of the optimization process applied to the mobile game above:

  1. You're testing your game and notice graphical hitches or subpar performance. While your game is running on your test device, you can use the Unity profiler to take measurements to find the problem.
  2. Analyzing the measurements from the profiler can help you isolate and identify the source of the performance problem. You might, for example, notice large spikes in vertices being rendered in the Rendering profiler module after your main character comes into view.
  3. After noticing the large spikes and testing for other situations, you determine that the game could be rendering too many vertices when certain models come into view.
  4. You update your team and advise that some of your 3D models could use LODs to reduce the number of vertices in your meshes when viewed from far away.
  5. After applying the LODs on the models, you test the game again to verify that the optimization worked!

If you do this and your application still doesn’t perform as expected, you can restart the process by profiling the application again to find out what else is causing problems.

2. Conclusion

At a certain point in your game's development, you can expect to repeat the optimization process a number of times. Optimization is an iterative process that can help you find performance problems in a number of different areas. In the next Tutorial, we will explore the different tools available to you when profiling your mobile application.

Complete this tutorial