Getting started with unity 3D lightmapping QuickStart

This an introductory description of lightmapping in Unity. For more advanced topics seein-depth description of lightmapping in Unity

This is a guide to unity lightmap. For more advanced features, see in depth description of lightmapping in unity.

Unity has a built-in lightmapper: it’sBeastby Illuminate Labs. Lightmapping is fully integrated in Unity. This means that Beast will bake lightmaps for your scene based on how your scene is set up within Unity, taking into account meshes, materials, textures and lights. It also means that lightmapping is now an integral part of the rendering engine – once your lightmaps are created you don’t need to do anything else, they will be automatically picked up by the objects.

Unity’s built-in lightmap baking tool is beast of illuminate labs. Baking light mapping process is perfectly integrated into unity. This means that using beast, you can bake your scene according to your mesh objects, material maps and light properties, so as to get a perfect light map. It also means that the lightmap will be part of the rendering engine. As long as you bake the lightmap once, you don’t need to do anything else. The lightmap is automatically assigned to the object

Preparing the scene and baking the lightmaps

SelectingWindow – Lightmappingfrom the menu will open the Lightmapping window:

Select window – lightmapping from the menu bar to open the lightmap tool window

Make sure any mesh you want to be Lightmapped has proper UVs for lightmapping. You can also select the generate lightmap UVs option from the mesh import settings panel to generate a set of UVs for locating the lightmap

In the object pane mark any mesh render or terrain as static – this will tell unity, that those objects won’t move nor change and they can be Lightmapped.
in the object panel, set the objects to be baked as static, so unity will know which objects need to be baked

To control the resolution of the lightmaps, go to theBakepane and adjust theResolutionvalue. (To have a better understanding on how you spend your lightmap texels, Look at the small lightmap display window within the scene view and select show resolution )( In the scene view panel, check the show resolution option in the small window lightmap display to help you view the map resolution settings more intuitively

Press bake
Click bake (baking)

A progress bar appears in unity editor’s status bar, in the bottom right corner

When baking is done, you can see all the baked lightmaps at the bottom of the lightmap editor window

Scene and game views will update – your scene is now lightmapped!

The scene and game windows will be updated. Now you can see the lightmap effect in your scene

Tuning bake settings

Final look of your scene depends a lot on your lighting setup and bake settings. Let’s take a look at an example of some basic settings that can improve lighting quality.

The final rendering of the scene depends on your more settings for lighting and baking options. Let’s look at a small example of improving the quality of light through basic settings

This is a basic scene with a couple of cubes and one point light in the centre. The light is casting hard shadows and the effect is quite dull and artificial.

This is a simple scene with a set of cubes and a point light at the center of the scene. The light produces hard shadows that look rather insipid and unnatural

Selecting the light and opening the Object pane of the Lightmapping window exposes Shadow Radius and Shadow Samples properties. Setting Shadow Radius to 1.2, Shadow Samples to 100 and re-baking produces soft shadows with wide penumbra – our image already looks much better.

Select the light to open the object panel and expand the shadow range and shadow sampling attributes. Setting the shadow range to 1.2, shadow sampling to 100, re baking will produce a soft shadow with a wide penumbra range. Our pictures look really much better

With Unity Pro we can take the scene one step further by enabling Global Illumination and adding a Sky Light. In the Bake pane we set the number of Bounces to 1 and the Sky Light Intensity to 0.5. The result is much softer lighting with subtle diffuse interreflection effects (color bleeding from the green and blue cubes) – much nicer and it’s s till only 3 cubes and a light!

Using the professional version of unity can turn on the global lighting and skylight for baking, and the picture effect can be greatly improved. On the bake panel, set bounce to 1 and sky light intensity to 0.5. It can bake out the soft light source with subtle change of reflection effect( Color spillover from green and blue boxes)

Lightmapping in depth

For more information about the various lightmapping-related settings, please refer to thein-depth description of lightmapping in Unity.

For more information about lightmapping settings, see in depth description of lightmapping in unity

Let’s share my teacher Dashen’s AI course. Zero base! Easy to understand! Funny! And yellow jokes! Hope you can join our AI team! https://blog.csdn.net/jiangjunshow

Similar Posts: