27地形引擎指南.docx

上传人:b****3 文档编号:5504728 上传时间:2023-05-08 格式:DOCX 页数:45 大小:2.33MB
下载 相关 举报
27地形引擎指南.docx_第1页
第1页 / 共45页
27地形引擎指南.docx_第2页
第2页 / 共45页
27地形引擎指南.docx_第3页
第3页 / 共45页
27地形引擎指南.docx_第4页
第4页 / 共45页
27地形引擎指南.docx_第5页
第5页 / 共45页
27地形引擎指南.docx_第6页
第6页 / 共45页
27地形引擎指南.docx_第7页
第7页 / 共45页
27地形引擎指南.docx_第8页
第8页 / 共45页
27地形引擎指南.docx_第9页
第9页 / 共45页
27地形引擎指南.docx_第10页
第10页 / 共45页
27地形引擎指南.docx_第11页
第11页 / 共45页
27地形引擎指南.docx_第12页
第12页 / 共45页
27地形引擎指南.docx_第13页
第13页 / 共45页
27地形引擎指南.docx_第14页
第14页 / 共45页
27地形引擎指南.docx_第15页
第15页 / 共45页
27地形引擎指南.docx_第16页
第16页 / 共45页
27地形引擎指南.docx_第17页
第17页 / 共45页
27地形引擎指南.docx_第18页
第18页 / 共45页
27地形引擎指南.docx_第19页
第19页 / 共45页
27地形引擎指南.docx_第20页
第20页 / 共45页
亲,该文档总共45页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

27地形引擎指南.docx

《27地形引擎指南.docx》由会员分享,可在线阅读,更多相关《27地形引擎指南.docx(45页珍藏版)》请在冰点文库上搜索。

27地形引擎指南.docx

27地形引擎指南

UnityManual—>UserGuide—>BuildingScenes—>Terrains

Unity手册—>用户指南—>建立场景—>地形

TerrainEngineGuide地形引擎指南

ThissectionwillexplainhowtousetheTerrainEngine.Itwillcovercreation,technicaldetails,andotherconsiderations.Itisbrokenintothefollowingsections:

本节将讲述如何使用地形引擎。

Itwillcovercreation,technicaldetails,andotherconsiderations.这将包括创建,技术细节,和其他因素。

Itisbrokenintothefollowingsections:

它分为以下部分:

(1)UsingTerrains使用地形

ThissectioncoversthemostbasicinformationaboutusingTerrains.ThisincludescreatingTerrainsandhowtousethenewTerraintools&brushes.

本节包括有关使用地形最基本的资料。

这包括建立地形,以及如何使用新的地形工具和刷子。

(2)Height高度

ThissectionexplainshowtousethedifferenttoolsandbrushesthataltertheHeightoftheTerrain.

本节讲解如何使用不同的工具和笔刷,改变地形高度。

(3)TerrainTextures地形纹理

Thissectionexplainshowtoadd,paintandblendTerrainTexturesusingdifferentbrushes.

本节讲解如何添加、描绘和地形纹理混合使用不同的刷子

(4)Trees树

Thissectioncontainsimportantinformationforcreatingyourowntreeassets.ItalsocoversaddingandpaintingtreesonyourTerrain.

本节包含用于创建你自己树资产的重要信息。

它包括增加和绘画树木在你的地形上。

(5)Grass草

Thissectionexplainshowgrassworks,andhowtouseit.

本节讲解草如何工作,以及如何使用它。

(6)DetailMeshes元件网格

Thissectionexplainspracticalusagefordetailmesheslikerocks,haystacks,vegetation,etc.

本节讲解元件网格的实际应用,像岩石、草堆、植被等等。

(7)Lightmaps光照映射

(解释:

光照映射(lightmaps)把预先计算好的纹理混合在基本纹理上方,用于模拟真实的光影效果,在目前的3D游戏中对画质影响非常大。

ThissectionexplainstheadvantagesofusingLightmaps,howtocreatethem,andtechnicalinformation.

本节讲解使用光照映射的优势,如何建立它们以及它们的技术信息

(8)OtherSettings其它设置

ThissectioncoversalltheothersettingsassociatedwithTerrains.

本节涵盖了所有与地形有关的其他设置。

 

1)UsingTerrains使用地形

ReferenceManual>TerrainEngineGuide>UsingTerrains

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

CreatinganewTerrain建立一个新的地形

AnewTerraincanbecreatedfromTerrain->CreateTerrain.ThiswilladdaTerraintoyourProjectandHierarchyViews.

从菜单Terrain->CreateTerrain建立一个新的地形。

这将添加一个地形到你的项目中以及在层次面板中显示。

YournewTerrainwilllooklikethisintheSceneView:

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

AnewTerraininSceneView一个新地形在场景视图中。

IfyouwouldlikeadifferentlysizedTerrain,chooseTerrain->SetResolutionfromthemenubar.ThereareanumberofsettingsthatrelatedtoTerrainsizewhichyoucanchangefromthisdialog.

如果你项一个大小不同的地形,从菜单栏选择Terrain->SetResolution。

在该对话框中,有很多有关地形大小的设置,在此可以设置地形的数据。

NavigatingtheTerrain地形导航(定位地形)

TerrainsworkabitdifferentlythanotherGameObjects.Mostnotably,thereisnoTransformGizmothatallowsyoutopositiontheTerrain.Instead,youuseBrushestopaintandmanipulateyourTerrain.IfyoudowanttorepositionaTerrain,youcanmodifyitsTransformPositionvaluesintheInspector.ThisallowsyoutomoveyourTerrainaround,butyoucannotrotateorscaleit.

地形操作与其它游戏物体有一个不同点。

特别显著的是它没有变换的辅助工具(Gizmo)允许你定位地形。

相反,你使用画刷去画和操作你的地形。

如果你想重新定位你的地形,你可以在检视面板(Inspector)修改它的TransformPosition值。

这允许你移动你的地形,但你不能旋转或缩放它。

WhileyourTerrainisselectedintheHierarchy,youcangracefullynavigatetheterrainwiththeF(focus)key.WhenyoupressF,whereveryourmouseispositionedwillbemovedtothecenteroftheSceneView.Thisallowsyoutotouchupanarea,andquicklyzoomovertoadifferentareaandchangesomethingelse.IfyourmouseisnothoveringoveranareaoftheTerrainwhenyoupresstheFkey,theentireTerrainwillbecenteredinyourSceneView.

当你在层次面板(Hierarchy)中选择你的地形,你可以使用F键导航(定位)你的地形。

当你按F键,无论你的鼠标位置在何处,它将移动到场景的中心。

(提示,前提是你的鼠标在场景视图中)。

这允许你到一个区域,并快速变焦到不同区域以及改变一些其它的东西。

若你的鼠标位置没有停在地形中一个区域上面,当你按F键时,整个地形将显示在场景视图的中心。

(提示,当地形有多个区域时,按F键可以测试一下结果)

EditingtheTerrain编辑地形

WiththeTerrainselected,youcanlookattheInspectortoseesomeincrediblenewTerraineditingtools.

选择地形,你可以在检视面板看到一些难以置信新的地形编辑工具。

(这句话好像是对老的Unity用户说的)

TerrainEditingToolsappearintheInspector地形编辑工具显示在检视面板中。

EachrectangularbuttonisadifferentTerraintool.Therearetoolstochangetheheight,paintsplatmaps,orattachdetailsliketreesorrocks.Touseaspecifictool,clickonit.Youwillthenseeashortdescriptionofthetoolappearintextbelowthetoolbuttons.

每一个长方形按钮就是一个不同的地形工具。

有些工具是改变高度、画长条木板地图,或则是类似对树、岩石附加细节工具。

使用此特定工具,就点击它。

你将看到这个工具一个小的描述文本显示在该功能工具按钮的下面。

Mostofthetoolsmakeuseofabrush.Manydifferentbrushesaredisplayedforanytoolthatusesabrush.Toselectabrush,justclickonit.

大多数的工具利用一个刷子。

多数不同的刷子显示为任何工具使用一个刷子。

选择一个刷子,只要点击一下它。

(这句话的意识是使用一把刷子,根据选择不同类型变成不同的刷子使用)

YouwilluseallofthesebrushesintheSceneViewtopaintdirectlyontoyourTerrain.Simplychoosethetoolandbrushyouwant,thenclick&dragontheTerraintoalteritinreal-time.Topaintheight,textures,ordecorations,youmusthavetheTerrainselectedintheHierarchyView.

你将使用所有的这些刷子在SceneView(场景视图)中直接画你的地形。

简单的选择你想还要的工具和刷子,然后在地形上点击和拖拽就能实时改变。

你必须在层次视图HierarchyView中选择地形,去画高、纹理或修饰。

Note:

Whenyouhaveabrushselected,moveyourmouseovertheTerrainintheSceneViewandpressF.ThiswillcentertheSceneViewoverthemousepointerpositionandautomaticallyzoomintotheBrushSizedistance.Thisisthequickest&easiestwaytonavigatearoundyourTerrainwhilecreatingit.

注意:

当你有一个选择的刷子,在场景的地形上移动你的鼠标和按F键,这将把鼠标指针位置显示在场景中心和自动放大画刷大小距离。

在创建地形时,这是最快与最简单的方法去浏览你的地形。

2)Height高度

ReferenceManual>TerrainEngineGuide>Height

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

UsinganyoftheTerraineditingtoolsisverysimple.YouwillliterallypainttheTerrainfromwithintheSceneView.Fortheheighttoolsandallothers,youjusthavetoselectthetool,andclicktheTerraininSceneViewtomanipulateitinreal-time.

使用任何地形编辑工具是非常简单的。

从场景视图内部你将照字面意义画地形。

对于高度工具和其它的工具,你只要选择工具,然后在场景视图中的地形里点击就可以实时操作生成。

Raising&LoweringHeight升高和降低高度

ThefirsttoolontheleftistheRaiseHeighttool

.

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

Withthistool,youpaintbrushstrokesthatwillraisetheheightoftheTerrain.Clickingthemouseoncewillincrementtheheight.Keepingthemousebuttondepressedandmovingthemousewillcontinuallyraisetheheightuntilthemaximumheightisreached.

用这个工具,你的笔触将提高地形的高度。

点击鼠标一次将增高高度。

保持按住鼠标左键,移动鼠标将不断提高高度,直到达到最大高度。

Youcanuseanyofthebrushestoachievedifferentresults你可以使用任何刷子取得不同的结果。

Ifyouwanttolowertheheightwhenyouclick,holdtheShiftkey.如果你想降低高度,按住Shift键点击。

Note:

Whenyouhaveabrushselected,moveyourmouseovertheTerrainintheSceneViewandpressF.ThiswillcentertheSceneViewoverthemousepointerpositionandautomaticallyzoomintotheBrushSizedistance.Thisisthequickest&easiestwaytonavigatearoundyourTerrainwhilecreatingit.

注意:

当你有一个选择的刷子,在场景视图的地形上移动你的鼠标并按F键。

ThiswillcentertheSceneViewoverthemousepointerpositionandautomaticallyzoomintotheBrushSizedistance.这将把鼠标指针的位置移动到场景中心显示,并自动放大的画笔大小的距离。

在创建地形时,Thisisthequickest&easiestwaytonavigatearoundyourTerrainwhilecreatingit.这是最快和最简单的方法来浏览你的地形。

PaintHeight画高度

ThesecondtoolfromtheleftisthePaintHeighttool

.

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

Thistoolallowsyoutospecifyatargetheight,andmoveanypartoftheterraintowardthatheight.Oncetheterrainreachesthetargetheight,itwillstopmovingandrestatthatheight.

这个工具允许你指定目标高度,地形的任何一部分向这个高度移动。

一旦这个地形达到目标高度,它将停止移动并在停那个高度。

Tospecifythetargetheight,holdShiftandclickontheterrainattheheightyoudesire.YoucanalsomanuallyadjusttheHeightsliderintheInspector.

指定目标高度,按住Shift键,然后在地形上点击你希望高度的地方。

在检视面板中你也可以手工调整高度滑块。

Nowyou'vespecifiedthetargetheight,andanyclicksyoumakeontheterrainwillmovetheterrainupordowntoreachthatheight.

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

SmoothingHeight平滑高度

ThethirdtoolfromtheleftistheSmoothingHeighttool

.

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

Thistoolallowsyoutosoftenanyheightdifferenceswithintheareayou'repainting.Liketheotherbrushes,painttheareasyouwanttosmoothintheSceneView.

这个工具允许你在你画的区域内软化任意高度差。

像其它画刷,在场景视图中画你想平滑的区域。

WorkingwithHeightmaps与高度图合作

Ifyoulike,youcanimportagreyscaleHeightmapcreatedinPhotoshop,orfromreal-worldgeographydataandapplyittoyourTerrain.Todothis,chooseTerrain->ImportHeightmap-Raw...,thenselectthedesiredRAWfile.You'llthenseesomeimportsettings.Thesewillbesetforyou,butyouhavetheoptionofchangingthesizeofyourTerrainfromthisdialogifyoulike.Whenyou'reready,clicktheImportbutton.OncetheHeightmaphasbeenappliedtotheTerrain,youcanedititnormallywithalltheToolsdescribedabove.NotethattheUnityHeightmapimportercanonlyimportgrayscalerawfiles.Thusyoucan'tcreatearawheightmapusingRGBchannels,youmustusegrayscale.

如果你愿意,你可以导入在Photoshop中建立的灰度高度图,或从真实世界地理数据应用到你的地形。

要做到这一点,选择Terrain->ImportHeightmap-Raw...(地形>“导入高度图-原始...),然后选择所需的RAW文件。

You'llthenseesomeimportsettings.然后,你将会看到一些导入设置。

Thesewillbesetforyou,butyouhavetheoptionofchangingthesizeofyourTerrainfromthisdialogifyoulike.这些将为你设置,但是你必须从这个对话框改变选项至你喜欢的地形的大小。

Whenyou'reready,clicktheImportbutton.当你准备好,点击Import(导入)按钮。

OncetheHeightmaphasbeenappliedtotheTerrain,youcanedititnormallywithalltheToolsdescribedabove.NotethattheUnityHeightmapimportercanonlyimportgrayscalerawfiles.一旦高度图已应用于地形,你可以使用上面描述的所有功能工具正常的编辑它。

注意,Unity引入的高度图只能引入灰度原始文件。

Thusyoucan'tcreatearawheightmapusingRGBchannels,youmustusegrayscale.因此,你不能创建一个使用RGB通道的原始高度图,你必须使用灰度。

UnityworkswithRAWfileswhichmakeuseoffull16-bitresolution.AnyotherheightmapeditingapplicationlikeBryce,Terragen,orPhotoshopcanworkwithaUnityHeightmapatfullresolution.

Unity与RAW文件一起利用完整的16位分辨率的使用。

任何其它的AnyotherheightmapeditingapplicationlikeBryce,Terragen,orPhotoshopcanworkwithaUnityHeightmapatfullresolution.高度图编辑程序如Bryce,Terragen,或Photoshop都可以与Unity的高度图的全分辨率一起使用。

Youalsohavetheoptionofexporti

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > IT计算机 > 电脑基础知识

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2