Challenge - Bake the Scene Lighting

Tutorial

·

intermediate

·

+10XP

·

15 mins

·

(31)

Unity Technologies

Challenge - Bake the Scene Lighting

In this tutorial, you will bake the scenes lighting to increase performance of the project.

Languages available:

1. Profiling the Scene

1. Use the Profiler to identify an issue with Batching
a. Open the Profiler in Unity, by going to Window > Analysis > Profiler.
b. Play the game and observe the performance profile
c. Use the Rendering Profiler and the GPU Profiler to identify areas for optimization

5d3516f0-c1ce-4be5-a653-f8b2264a9760_image2.png

d. Record the profile data to use as a baseline (never optimize without a baseline)

eb73aade-3f8d-4fb7-9a22-7461743e1fcc_image10.png

2. Setting up Batching and Light Baking

1. Configure Static Batching and Light Baking
a. Configure Static and Dynamic batching in Player Settings

1889d8b3-823e-471d-9239-a4435043c0f1_image6.png

b. Mark stationary objects Static. All of the Module GameObjects can be marked static

258f1468-7bc4-4f77-b48e-fe44e740214e_image12.png

c. Configure the scene lights for Baking.

b3869fa6-48fe-4007-80e4-1a5a32779779_image14.png

Pro Tip: You can use the Light inspector to quickly find and manipulate all of the lights in the scene. ( Window > Rendering > Light Explorer )

563b93af-9d0b-4b25-8ee5-3a1e20497a92_image5.png

d. Use the Lighting Window to bake the scene’s lighting

3c897955-d2c8-4fb8-8c8e-606c5016227d_image13.png

3. Comparing the Result

1. Use the Profiler to analyze the results
a. Open the Profiler in Unity, by going to Window > Analysis > Profiler.
b. Play the game and observe the performance profile|
c. Compare to your benchmark

Complete this tutorial