Categories: Unity, C #, VS2015
Date Created: 2016-04-19 I. INTRODUCTION
The benefit of using a simple example rather than a real-world example is that you can quickly understand the concepts and basic setup methods associated with lighting maps and lighting effects, which avoids the distractions of other factors in the actual complex scene. Once you are familiar with these basic usages, it is still used in the actual scenario.
The result of this example is as follows:
Second, the design steps
1. New Project
Start the Unity application and create a new project named Ch1301_lightingdemo.
2. Create a scene
Open the "cameobject" → "create Cube" option in the menu bar, create 5 cubes in the scene, construct a simple scene with the toolbar (toolbar), move, rotate, scale, and so on, and edit the Cube you created, as shown in:
3. Set 5 cubes to static
With the corresponding cube selected, in the Inspector view, tick the static check box of the object to mark the cube as static, notifying unity that these objects are still objects that will not move, and that such objects will participate in the baking of the light map, as shown in:
4. Open Lighting Window
Open "Window", "Lighting" in the menu bar:
The lighting view pops up at this point.
5. Set baking options
When you select a directional light in the hierarchy view, the settings for that light appear under the Object tab in the lighting view, by configuring the relevant parameters:
To reproduce the scene, save the scene as Realtime1 first.
6. Baking
Click "Build" and it will be automatically baked.
Save the scene as Realtime2.
Press the play button to preview the lighting effect as shown in:
"Unity" 12.3 Realtime GI Example