Unity3D基础教程2-7:地形引擎指南

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

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

3)Textures 纹理

Reference Manual > Terrain Engine Guide > Textures

参考手册—>地形引擎指南—>纹理

Decorate the landscape of your terrain by tiling Terrain Textures across the entire terrain. You can blend and combine Terrain Textures to make smooth transitions from one map to another, or to keep the surroundings varied.

在整个地形上平铺Terrain Textures地形纹理)来美化你的地形。你可以混合并结合地形纹理去平滑变化从一个映射到另一个映射,或保持各种各样的环境。

Terrain Textures are also called splat maps. What this means is you can define several repeating high resolution textures and blend between them arbitrarily, using alpha maps which you paint directly onto the Terrain. Because the textures are not large compared to the size of the terrain, the distribution size of the Textures is very small.

地形纹理也称为长条木板地图。 What this means is you can define several repeating high resolution textures and blend between them arbitrarily, using alpha maps which you paint directly onto the Terrain.这意味着你可以定义多个重复的高分辨率纹理和它们之间的任意混合,使用alpha(阿尔法)地图直接在你的地形上画图。 Because the textures are not large compared to the size of the terrain, the distribution size of the Textures is very small.由于纹理与地形的大小相比不大,分布的纹理尺寸非常小。

Note: Using an amount of textures in a multiple of four provides the greatest benefit for performance and storage of the Terrain alpha maps.

注意:最好的有益处理和存储地阿尔法地图地形是使用四个提供在一个管道多数量的纹理。

To being working with textures, click on the Paint Textures button Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)in the Inspector.

处理纹理,在检视面板中点击Paint Textures(绘制纹理)按钮。

Adding a Terrain Texture 添加一个地形纹理

Before you can begin painting Terrain Textures, you will add at least one to the Terrain from your Project folder. Click the Options Button->Add Texture....

在你开始绘制地形纹理之前,你至少应添加加一个地形从你的项目文件夹中。点击 Options Button->Add Texture....(选项按钮->添加纹理...

Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)

This will bring up the Add Terrain Texture dialog. 这将弹出一个添加纹理的对话框

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

From here, select a tileable texture in the Splat property. You can either drag a texture to the property from the Project View, or choose one from the drop-down.

从这里,在长条木板属性中选择一个平铺的纹理,你也可以从项目面板视图中拖拽一个纹理到该属性中,或从下来单中选择一个。

Now, set the Tile Size X and Tile Size Y properties. The larger the number, the larger each "tile" of the texture will be scaled. Textures with large Tile Sizes will be repeated fewer times across the entire Terrain. Smaller numbers will repeat the texture more often with smaller tiles.

现在,设置平铺X和平铺Y的属性。数字越大,每个平铺的纹理就对应的按比例放大。大的平铺尺寸的纹理将在整个地形中重复少的次数。通常少数的平铺尺寸小的纹理将重复纹理多次。

Click the Add Button and you'll see your first Terrain Texture tile across the entire Terrain.

点击 增加 按钮,你将看到第一个地形纹理平铺到整个地形。

Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)

Repeat this process for as many Terrain Textures as you like. 多地形纹理的重复处理直到你满意为止。

Painting Terrain Textures 绘制地形纹理

Once you've added at least two Terrain Textures, you can blend them together in various ways. This part gets really fun, so let's jump right to the good stuff.

一旦你至少增加了两个地形纹理,你可以以不同的方式把它们混合在一起。这部分很有趣,让我们马上进入主题。

Select the Terrain Texture you want to use. The currently selected Terrain Texture will be highlighted in blue.

选择你想用的地形纹理。当前选择的地形纹理将以蓝框线高亮显示。

Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)

Select the Brush you want to use. The currently selected Brush will be highlighted in blue.

选择你想用的画刷。当前选择的画刷将以蓝框线高亮显示。

Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)

Select the Brush Size, Opacity, and Target Strength.

选择画刷的大小,不透明度,和目标强度

Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)

Click and drag on the terrain to draw the Terrain Texture.

在地形上点击和拖动去绘制地形纹理

Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)

Use a variety of Textures, Brushes, Sizes, and Opacities to create a great variety of blended styles.

使用多种的纹理,画刷,大小和不透明度去建立一个多种有趣的混合风格。

Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)

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键。这将把鼠标指针的位置移动到场景中心显示,并自动放大的画刷大小的距离。 在创建地形时,这是最快和最简单的方法来浏览你的地形。

发表评论0条 】
网友评论(共?条评论)..
Unity3D基础教程2-7:地形引擎指南