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

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

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

1)Using Terrains使用地形

Reference Manual > Terrain Engine Guide > Using Terrains

参考手册—>地形引擎指南—>使用地形

Creating a new Terrain 建立一个新的地形

A new Terrain can be created from Terrain->Create Terrain. This will add a Terrain to your Project and Hierarchy Views.

从菜单 Terrain->Create Terrain 建立一个新的地形。这将添加一个地形到你的项目中以及在层次面板中显示。

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

Your new Terrain will look like this in the Scene View:

你的新地形在场景中看起来向这个样子:

Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)
A new Terrain in Scene View 一个新地形在场景视图中。

If you would like a differently sized Terrain, choose Terrain->Set Resolution from the menu bar. There are a number of settings that related to Terrain size which you can change from this dialog.

如果你项一个大小不同的地形,从菜单栏选择Terrain->Set Resolution。在该对话框中,有很多有关地形大小的设置,在此可以设置地形的数据。

Navigating the Terrain 地形导航(定位地形)

Terrains work a bit differently than other GameObjects. Most notably, there is no Transform Gizmo that allows you to position the Terrain. Instead, you use Brushes to paint and manipulate your Terrain. If you do want to reposition a Terrain, you can modify its Transform Position values in the Inspector. This allows you to move your Terrain around, but you cannot rotate or scale it.

地形操作与其它游戏物体有一个不同点。特别显著的是它没有变换的辅助工具(Gizmo)允许你定位地形。相反,你使用画刷去画和操作你的地形。如果你想重新定位你的地形,你可以在检视面板(Inspector)修改它的 Transform Position 值。这允许你移动你的地形,但你不能旋转或缩放它。

While your Terrain is selected in the Hierarchy, you can gracefully navigate the terrain with the F (focus) key. When you press F, wherever your mouse is positioned will be moved to the center of the Scene View. This allows you to touch up an area, and quickly zoom over to a different area and change something else. If your mouse is not hovering over an area of the Terrain when you press the F key, the entire Terrain will be centered in your Scene View.

当你在层次面板(Hierarchy)中选择你的地形,你可以使用F键导航(定位)你的地形。当你按F键,无论你的鼠标位置在何处,它将移动到场景的中心。(提示,前提是你的鼠标在场景视图中)。这允许你到一个区域,并快速变焦到不同区域以及改变一些其它的东西。若你的鼠标位置没有停在地形中一个区域上面,当你按F键时,整个地形将显示在场景视图的中心。(提示,当地形有多个区域时,按F键可以测试一下结果)

Editing the Terrain 编辑地形

With the Terrain selected, you can look at the Inspector to see some incredible new Terrain editing tools.

选择地形,你可以在检视面板看到一些难以置信新的地形编辑工具。(这句话好像是对老的Unity用户说的)

Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide)
Terrain Editing Tools appear in the Inspector 地形编辑工具显示在检视面板中。

Each rectangular button is a different Terrain tool. There are tools to change the height, paint splat maps, or attach details like trees or rocks. To use a specific tool, click on it. You will then see a short description of the tool appear in text below the tool buttons.

每一个长方形按钮就是一个不同的地形工具。有些工具是改变高度、画长条木板地图,或则是类似对树、岩石附加细节工具。使用此特定工具,就点击它。你将看到这个工具一个小的描述文本显示在该功能工具按钮的下面。

Most of the tools make use of a brush. Many different brushes are displayed for any tool that uses a brush. To select a brush, just click on it.

大多数的工具利用一个刷子。多数不同的刷子显示为任何工具使用一个刷子。选择一个刷子,只要点击一下它。(这句话的意识是使用一把刷子,根据选择不同类型变成不同的刷子使用)

You will use all of these brushes in the Scene View to paint directly onto your Terrain. Simply choose the tool and brush you want, then click & drag on the Terrain to alter it in real-time. To paint height, textures, or decorations, you must have the Terrain selected in the Hierarchy View.

你将使用所有的这些刷子在Scene View场景视图)中直接画你的地形。简单的选择你想还要的工具和刷子,然后在地形上点击和拖拽就能实时改变。你必须在层次视图Hierarchy View中选择地形,去画高、纹理或修饰。

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:地形引擎指南