unity3d 地形5.6烘焙地形的2U在哪调

This is an introductory description of lightmapping in Unity. For more advanced topics see the
Unity has a fully integrated lightmapper –
by Illuminate Labs. 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 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.
Preparing the scene and baking the lightmaps
Selecting Window –& Lighting from the menu will open the Lightmapping window:
Make sure any mesh you want to be lightmapped has proper UVs for lightmapping. The easiest way is to choose the Generate Lightmap UVs option in .
In the Object pane mark any Mesh Renderer, Skinned Mesh Renderer or Terrain as static – this will tell Unity, that those objects won’t move nor change and they can be lightmapped.
To control the resolution of the lightmaps, go to the Bake pane and adjust the Resolution value. (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).
Press Bake
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!
Tweaking 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.
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.
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.
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 still only 3 cubes and a light!
Lightmapping In-Depth
For more information about the various lightmapping-related settings, please refer to the .
Did you find this page useful? Please give it a rating:
GI Visualizations in the Scene view
Lightmap Parameters}

我要回帖

更多关于 unity地形贴图 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信