2014-08-11 20:15:20|?次阅读|上传:huigezrx【已有?条评论】发表评论
关键词:游戏, 虚拟现实, Unity3D|来源:唯设编程网
Reference Manual > Terrain Engine Guide > Lightmaps
参考手册—>地形引擎指南—>光照映射
You can create and use a Lightmap, based on the Lights in your Scene. You should almost always use Lightmaps. A Lightmapped terrain looks substantially better than Vertex lit. On top of that a Lightmapped terrain also runs faster than a Vertex lit terrain!
在你的场景灯光的基础上,你可以创建和使用光照映射。你应该总是使用光照映射。一个光照映射地形看起来大大好过顶点照射。另外一个光照映射地形运行速度也比顶点照射地形快。
A mountain view without a Lightmap 没有光照映射的山脉视图
The same mountain, now using a Lightmap. Much better! 同样的山脉,使用光照映射,好多了!
Creating a Lightmap 建立一个光照映射
To create a Lightmap, make sure you have at least one Directional Light in your scene. Then choose Terrain->Create Lightmap from the menu. Here you can set various options like the Resolution of the Lightmap, choose the Lights used in the Lightmap, Shadows, and Shadow Sampling.
创建一个光照映射,在你的场景中确认至少已经有一个方向光(Directional Light)。然后,从菜单选择Terrain->Create Lightmap(地形->建立光照映射)。这里你可以设置不同的选项,如光照映射分斌率、选择光照映射使用的灯光,阴影和阴影取样。
Toggling Lightmap 切换光照映射
To enable or disable the active Lightmap, select your Terrain and click the Terrain Settings tab. In Lighting popup, choose Lightmap or Pixel lighting mode.
启动或禁止激活光照映射,选取你的地形并点击地形设置选项卡,在照明弹出里,选择光照映射或像素照射模式。
Note: You must use a Directional Light to create the lightmap. Point and Spot Lights will not be taken into account when creating the lightmap.
注意:你必须使用一个方向光去建立一个光照映射。当建立光照映射,点光源和聚光灯将不被考虑。