2014-08-11 20:15:20|?次阅读|上传:huigezrx【已有?条评论】发表评论

关键词:游戏, 虚拟现实, Unity3D|来源:唯设编程网

5)Grass 草

Reference Manual > Terrain Engine Guide > Grass


The Paint Foliage button Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)allows you to paint grass, rocks, or other decorations around the Terrain. To paint grass, choose Edit Details button->Add Grass Texture. You don't need to create a mesh for grass, just a texture.

画枝叶按钮允许你在地形上绘制草、岩石或其它装饰。绘制草,选择Edit Details button->Add Grass Texture(编辑元件按钮->添加草纹理).你不需要为草建立网格,仅是一个纹理。

Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)
The Add Grass Texture dialog 添加草纹理对话框

At this dialog, you can fine-tune the appearance of the grass with the following options:


Detail Texture 细节纹理

The texture to be used for the grass. 纹理用来做草

Min Width  最小宽度

Minimum width of each grass section in meters. 在米的每个草区域内最小宽度

Max Width 最大宽度

Maximum width of each grass section in meters.在米的每个草区域内最大宽度

Min Height 最小高度

Minimum height of each grass section in meters. 在米的每个草区域内最小高度

Max Height 最大高度

Maximum height of each grass section in meters. 在米的每个草区域内最大高度

Noise Spread


The size of noise-generated clusters of grass. Lower numbers mean less noise.


Healthy Color


Color of healthy grass, prominent in the center of Noise Spread clusters.


Dry Color


Color of dry grass, prominent on the outer edges of Noise Spread clusters.


Grayscale Lighting


If enabled, grass textures will not be tinted by any colored light shining on the Terrain.


Lightmap Factor


How much the grass will be influenced by the Lightmap.




If checked, this grass will always rotate to face the main Camera.


After you've clicked the Add button, you'll see the grass appear selectable in the Inspector.


Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)
The added grass appears in the Inspector 添加的草出现在检视面板中

Painting Grass 画草

Painting grass works the same as painting textures or trees. Select the grass you want to paint, and paint right onto the Terrain in the Scene View


Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)
Painting grass is easy as pie 绘制草饼是容易的

Note:When you have a brush selected, move your mouse over the Terrain in the Scene View and press F. This will center the Scene View over the mouse pointer position and automatically zoom in to the Brush Size distance. This is the quickest & easiest way to navigate around your Terrain while creating it.

注意:当你有一个选择的画刷,在场景视图中的地形上移动你的鼠标并按F键。这将把鼠标指针的位置移动到场景中心显示,并自动放大的画刷大小的距离。 在创建地形时,This is the quickest & easiest way to navigate around your Terrain while creating it.这是最快和最简单的方法来浏览你的地形。

Editing Grass 编辑草

To change any import parameters for a particular Grass Texture, select it choose Edit Details button->Edit. You can also double-click it. You will then see the Edit Grass dialog appear, and be able to adjust the parameters described above.

更改特定草纹理任意重要参数,选取它,选择Edit Details button->Edit.(编辑元件按钮->编辑),你也可以双击它,你将看到编辑草的对话框出现,然后调整上述的参数。

You'll find that changing a few parameters can make a world of difference. Even changing the Max/Min Width and Height parameters can vastly change the way the grass looks, even with the same number of grass objects painted on the Terrain.


Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)
Grass created with the default parameters 以默认参数建立的草

Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)
The same number of painted grass objects, now wider and taller  相同数量绘制的草对象,现在宽和高相同。

发表评论0条 】