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

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

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

2)Height高度

Reference Manual > Terrain Engine Guide > Height

参考手册—>地形引擎指南—>高度

Using any of the Terrain editing tools is very simple. You will literally paint the Terrain from within the Scene View. For the height tools and all others, you just have to select the tool, and click the Terrain in Scene View to manipulate it in real-time.

使用任何地形编辑工具是非常简单的。从场景视图内部你将照字面意义画地形。对于高度工具和其它的工具,你只要选择工具,然后在场景视图中的地形里点击就可以实时操作生成。

Raising & Lowering Height 升高和降低高度

The first tool on the left is the Raise Height tool Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide).

左边第一个工具是提高高度工具。

With this tool, you paint brush strokes that will raise the height of the Terrain. Clicking the mouse once will increment the height. Keeping the mouse button depressed and moving the mouse will continually raise the height until the maximum height is reached.

用这个工具,你的笔触将提高地形的高度。点击鼠标一次将增高高度。保持按住鼠标左键,移动鼠标将不断提高高度,直到达到最大高度。

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

You can use any of the brushes to achieve different results 你可以使用任何刷子取得不同的结果。

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

If you want to lower the height when you click, hold the Shift key. 如果你想降低高度,按住Shift键点击。

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键。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.这是最快和最简单的方法来浏览你的地形。

Paint Height 画高度

The second tool from the left is the Paint Height tool Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide).

左边第二个工具是画高工具。

This tool allows you to specify a target height, and move any part of the terrain toward that height. Once the terrain reaches the target height, it will stop moving and rest at that height.

这个工具允许你指定目标高度,地形的任何一部分向这个高度移动。一旦这个地形达到目标高度,它将停止移动并在停那个高度。

To specify the target height, hold Shift and click on the terrain at the height you desire. You can also manually adjust the Height slider in the Inspector.

指定目标高度,按住Shift键,然后在地形上点击你希望高度的地方。在检视面板中你也可以手工调整高度滑块。

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

Now you've specified the target height, and any clicks you make on the terrain will move the terrain up or down to reach that height.

现在,你已经指定了目标高度,然后在地形上任意点击将移动地形上涨或下跌达到那个指定的高度。

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

Smoothing Height 平滑高度

The third tool from the left is the Smoothing Height tool Unity3D基础教程2-7:地形引擎指南(Terrain Engine Guide).

左边第三个工具是平滑高度工具。

This tool allows you to soften any height differences within the area you're painting. Like the other brushes, paint the areas you want to smooth in the Scene View.

这个工具允许你在你画的区域内软化任意高度差。像其它画刷,在场景视图中画你想平滑的区域。

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

Working with Heightmaps 与高度图合作

If you like, you can import a greyscale Heightmap created in Photoshop, or from real-world geography data and apply it to your Terrain. To do this, choose Terrain->Import Heightmap - Raw..., then select the desired RAW file. You'll then see some import settings. These will be set for you, but you have the option of changing the size of your Terrain from this dialog if you like. When you're ready, click the Import button. Once the Heightmap has been applied to the Terrain, you can edit it normally with all the Tools described above. Note that the Unity Heightmap importer can only import grayscale raw files. Thus you can't create a raw heightmap using RGB channels, you must use grayscale.

如果你愿意,你可以导入在Photoshop中建立的灰度高度图,或从真实世界地理数据应用到你的地形。要做到这一点,选择 Terrain->Import Heightmap - Raw...(地形>“导入高度图-原始...),然后选择所需的RAW文件。 You'll then see some import settings.然后,你将会看到一些导入设置。 These will be set for you, but you have the option of changing the size of your Terrain from this dialog if you like.这些将为你设置,但是你必须从这个对话框改变选项至你喜欢的地形的大小。 When you're ready, click the Import button.当你准备好,点击Import(导入)按钮。 Once the Heightmap has been applied to the Terrain, you can edit it normally with all the Tools described above. Note that the Unity Heightmap importer can only import grayscale raw files.一旦高度图已应用于地形,你可以使用上面描述的所有功能工具正常的编辑它。注意,Unity引入的高度图只能引入灰度原始文件。 Thus you can't create a raw heightmap using RGB channels, you must use grayscale.因此,你不能创建一个使用RGB通道的原始高度图,你必须使用灰度。

Unity works with RAW files which make use of full 16-bit resolution. Any other heightmap editing application like Bryce, Terragen, or Photoshop can work with a Unity Heightmap at full resolution.

Unity与RAW文件一起利用完整的16位分辨率的使用。 任何其它的Any other heightmap editing application like Bryce, Terragen, or Photoshop can work with a Unity Heightmap at full resolution.高度图编辑程序如Bryce,Terragen,或Photoshop都可以与Unity的高度图的全分辨率一起使用。

You also have the option of exporting your Heightmap to RAW format. Choose Terrain-> Export Heightmap - Raw... and you'll see a export settings dialog. Make any changes you like, and click Export to save your new Heightmap.

你同样有个选项把你的高度图导出到RAW格式。Choose Terrain->Import Heightmap - Raw... and you'll see a export settings dialog.选择 Terrain-> Export Heightmap - Raw...(地形>“导出高度图-原始...),你会看到一个导出设置对话框。 Make any changes you like, and click Export to save your new Heightmap.做你喜欢的任意更改,然后点击导出按钮,保存你的新高度图。

Unity also provides an easy way to flatten your terrain. Choose Terrain->Flatten.... This lets you flatten your terrain to a height you specify in the wizard.

Unity还提供了一个简单的方法来平坦你的地形。 选择Choose Terrain->Flatten... .地形-> 平坦...)。 This lets you flatten your terrain to a height you specify in the wizard.这使你平坦你的地形到你在向导中指定的高度。

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