Time for action – adding realism to your scene with lightmapping
Lightmapping in Unity is a quick and powerful process that can add detailed shadows and object lighting to make your game world appear even more real. To demonstrate this, we'll create a basic scene with primitive objects and preview it before and after lightmapping:
Create a new scene in Unity named
lightmappingDemo
.Create a plane positioned at
0
,0
,0
for our objects to sit on.Create three cubes and position them next to each other on the plane.
Give each cube a different material color or size.
Create a point light and position it so that it lights the three cubes and the plane.
Your fully assembled scene should look something like the following screenshot:
As you can see, none of the cubes have cast shadows yet. Directional lights can project shadows across any kind of object automatically, but point lights require lightmapping to cast shadows.
Open the Window menu on the topmost toolbar of the Unity editor and select Lightmapping...