1.地形对象Terrain
目录
[4. 绘制树和草](#4. 绘制树和草)
- 右键创建3D地形:
![](https://file.jishuzhan.net/article/1774411962294210561/83c7934621a36a2449480bfe586b2234.webp)
![](https://file.jishuzhan.net/article/1774411962294210561/e9eb482ecfcf357c52539c69494a73d4.webp)
依次对应下面的按钮
||
![](https://file.jishuzhan.net/article/1774411962294210561/e7de35502a7673adc6b3145a5656f267.webp)
2.设置地形纹理
下载资源包后,仅导入Environment
的包
![](https://file.jishuzhan.net/article/1774411962294210561/b8e8a149745a4b2a39b70ab1d5c4e1b9.webp)
步骤:
- 选择
绘制地形按钮
,下拉框选择Paint Texture
![](https://file.jishuzhan.net/article/1774411962294210561/98f197890ce5fe3b7ada80866422f708.webp)
- 在弹出的弹窗中搜索
GrassHillAlbedo
材质,并双击
![](https://file.jishuzhan.net/article/1774411962294210561/f3fc1d17ab82d630636968a6bc1456fa.webp)
3.拔高地形地貌
步骤:
- 选择第一项,拔高或者降低地形
![](https://file.jishuzhan.net/article/1774411962294210561/421f2763037322970d1253af9ea58348.webp)
- 用不同的笔刷,调整大小,按住左键拖动拔高,按住Shirt+左键降低地形
![](https://file.jishuzhan.net/article/1774411962294210561/ee2ef186b881c6cf837fc90555b3aec5.webp)
- 选择
Set Height
选项,设置高度Height为120,点击展平按钮
![](https://file.jishuzhan.net/article/1774411962294210561/236191d501c07f23d0e8b711f2754427.webp)
- 使用笔刷,绘制出一个高山和湖泊(往下挖)
![](https://file.jishuzhan.net/article/1774411962294210561/fef419790d6683b656ee16016e3a2ec4.webp)
4. 绘制树和草
步骤:
- 点击**绘制树按钮,**点击Edit Tree,选择树木的预制体
![](https://file.jishuzhan.net/article/1774411962294210561/5c8e695c2f317011fdb6055dfba14cbb.webp)
- 在地形中调整 笔刷大小、密集程度、高度范围,点击左键拖动生成
![](https://file.jishuzhan.net/article/1774411962294210561/a2ccfe9ccaaed61ae9074195f90fd5a8.webp)
![](https://file.jishuzhan.net/article/1774411962294210561/fe6d56bae98c32c46d39ed66f37aca76.webp)
- 点击**绘制细节按钮,**点击Edit Details -> Add Grass Texture,选择树草的预制体
![](https://file.jishuzhan.net/article/1774411962294210561/6ead6ac585e256a60aa2d1d2e77f9cca.webp)
- 在地形设置中,添加风吹的组件,使得树被风吹动
![](https://file.jishuzhan.net/article/1774411962294210561/f76d05dcb83107e3424968089ccf1af1.webp)
![](https://file.jishuzhan.net/article/1774411962294210561/f76d05dcb83107e3424968089ccf1af1.webp)
![](https://file.jishuzhan.net/article/1774411962294210561/48bb040993e98d091228a0e4245f97b4.webp)
5.为地形加入水
步骤:
- 将 Assets -> Standard Assets -> Environment -> Water -> Water4 Prefabs 的
Water4Simple
,拖入到场景中,并调整平面大小到合适位置,R键
![](https://file.jishuzhan.net/article/1774411962294210561/76b4767bbfbb0611052c4fc9387dee07.webp)
6.加入角色并跑步
![](https://file.jishuzhan.net/article/1774411962294210561/778808d07db03b6e4461ad85f7248c37.webp)
在上面的资源包中,导入Characters、CrossPlatformInput、Unity
的包
![](https://file.jishuzhan.net/article/1774411962294210561/2e5e583d4441d9e541bc09b3a62706f2.webp)
步骤:
- 在 Assets -> Standard Assets -> Characters -> ThirdPersonCharacter -> Prefabs 中的 ThirdPersonController拖入到场景中,调整合适大小
![](https://file.jishuzhan.net/article/1774411962294210561/6c7724c8c2932928f4b188b5e8bbea02.webp)
- 将Smooth Follow脚本挂载到摄像机上,将角色放到Target上
7.加入水声
![](https://file.jishuzhan.net/article/1774411962294210561/97baf246da5a014fa330f62e4500e2b0.webp)