Unreal教程Creating DecoLayers建立植被层.docx

上传人:b****7 文档编号:9451260 上传时间:2023-02-04 格式:DOCX 页数:11 大小:264.06KB
下载 相关 举报
Unreal教程Creating DecoLayers建立植被层.docx_第1页
第1页 / 共11页
Unreal教程Creating DecoLayers建立植被层.docx_第2页
第2页 / 共11页
Unreal教程Creating DecoLayers建立植被层.docx_第3页
第3页 / 共11页
Unreal教程Creating DecoLayers建立植被层.docx_第4页
第4页 / 共11页
Unreal教程Creating DecoLayers建立植被层.docx_第5页
第5页 / 共11页
点击查看更多>>
下载资源
资源描述

Unreal教程Creating DecoLayers建立植被层.docx

《Unreal教程Creating DecoLayers建立植被层.docx》由会员分享,可在线阅读,更多相关《Unreal教程Creating DecoLayers建立植被层.docx(11页珍藏版)》请在冰豆网上搜索。

Unreal教程Creating DecoLayers建立植被层.docx

Unreal教程CreatingDecoLayers建立植被层

CreatingDecoLayers

DocumentSummary:

AnintroductorydocumentonsettingupDecoLayers.

DocumentChangelog:

LastupdatedbyMichielHendriks,v3323update.PreviouslyupdatedbyJasonLentz(DemiurgeStudios?

)toseparateintosmallerdocsforthe2110build.OriginalauthorwasLodeVandevenne(UdnStaff?

).

∙CreatingDecoLayers

oIntroduction

oCreatingaDecoLayer

oAdditionalDecoLayerProperties

▪AlignToTerrain

▪ColorMap

▪DensityMap

▪DensityMultiplier

▪DetailMode

▪DisregardTerrainLighting

▪DrawOrder

▪FadeOutRadius

▪LitDirectional

▪MaxPerQuad

▪RandomYaw

▪ScaleMap

▪ScaleMultiplier

▪Seed

▪ShowOnInvisibleTerrain

▪ShowOnTerrain

▪StaticMesh

oOtherSections

Introduction

HereyouwillseehowtocreateyourownDecoLayersandthevariouswaysyoucanmanipulatethemtoyourliking.ThisdocumentassumesthatyouknowhowtobuildandshapeaterrainandthatyouarefamiliarwiththeUnrealEdInterface,theStaticMeshBrowser,andtheTextureBrowser.

CreatingaDecoLayer

DecoLayersgenerateStaticMesheseverywhereontheterrain.Youcanonlyseetheonesthatareinsidearadiusyoucanset,tosaveresources.Also,theStaticMeshesfromaDecoLayerareabledonotimpedeplayers,sousingthemfortreesisn'trealistic,butDecoLayersarebetterusedforgrass,flowersandferns.

TocreateanewDecoLayeronaTerraingototheTerrainEditorandclickontheDecorationstabandpress

.YoucanalsoaddmorethanoneDecoLayerifyoulike.BeforetheDecoLayerworks,youhavetosetalotofsettings.FirstgiveitaStaticMeshbyrightclickingonthenewlycreatedDecoLayer.ThistellstheDecoLayerwhatitwillberendering.

ThenyoumustcreateanewTerrainLayer.Getatexturethatisverydifferentfromyourterrain(forinstanceancheckedtexture-althoughmakesureit'sanRGBA8texturewithanalphachanneloraP8texture).CreateanewTerrainLayerbyclickingonthe"Layer"taboftheTerrainEditor,thenclickthe

button.Besuretoenterthetexture'scorrectdimensionsintheAlphaHeightandAlphaWidthfields.Alsoyoushouldcreatethislayeratthebottomofthelayerstack.Ifyoudidnot,youcanmoveittothebottombyselectingthelayerandusingthe

buttons.

Next,selecttheLayerTexturethatwascreatedintheTexturePackage"MyLevel"intheTextureBrowser(Decoalpha1inthisexample).GobacktotheDecorationsTabandthenright-clickontheDecoLayerandchoosethe"SetDensityTexturefromCurrent."ThistellstheDecoLayerwheretolaythedecorationsusinganalphachannel.Thewhitepartsofthealphachannel,orthehighestplacesinthepaletteoftheP8texture,willbecometheplaceswherethemostStaticMesheswillbegenerated.

YoucanalsocreateyourowntexturesmapstouseasaDensityTexture.Ifyoujustwantthewholeterraintobegrassy,youcanuseforexampleawhiteDensityTexture,butifyouwantthegrasstobeonlyintheNWcorneroftheterrain,maketheDensityMapblackeverywhere,exceptinonecorner.Forexample,youcancreateacropcirclewithit.ThepictureontheleftshowsthealphachanneloftheDensityTexturethatwasused:

ThenextoptionstosetareinthePropertieswindowoftheTerrainInfo.Toopenthis,justdoubleclickontheTerrainInfonameintheTerrainstaboftheTerrainEditor.GototheTerrainInforolloutwithinthePropertieswindowandthenexpandtheDecoLayerssection.

ThenexpandtheDecoLayerenumeratedas"[0]",andundertheFadeoutRadiusenteralargevaluefortheMax,andasmallervalueoffortheMin.BetweeneachMinandMaxFadeOutRadius,theStaticMesheswillbecomemoreandmoretransparent,untiltheybecomeinvisible.ForexampleinthescreenshottheMinFadeOutRadiusis500andtheMaxis1200.Bothradiiaremarkedwithayellowcircleonthescreenshot.Everythinginsidethesmallestcircleisopaque,everythingbetweenbothcirclesistranslucent,andoutsidethecircleseverythingbecomesinvisible.

ThelastinaddingtheDecoLayerMeshestoyourmapistopaintthemontoyourmap.Todothis,gobacktotheLayerstaboftheTerrainEditorandselectthelayeryoucreated(Decoalpha1forthisexample).IfthecheckeredtextureyouselectedastheDensityTextureisshowingupwhenyoupaintontheDecoLayerMeshessimplygototheLayertabintheTerrainEditorandmovetheLayeronebelowtherestoftheLayersinthestack.Thiscausestheterraintonolongerrenderthetexture;howeveryoucanstillselectthatlayerandpaintwithit.

NOTE:

DoNOTpaintwhileyouhavetheDecoLayerselectedundertheDecorationstab.ThiscancreateholesintheDensitymapwhichpreventyoufrompaintingonStaticMeshesanywhereonthoseholes.

AdditionalDecoLayerProperties

ThereareotheroptionsforadjustingtheDecoLayerswithintheTerrainInforollout.Belowaredescriptionsofwhateachoffieldcontrols.

AlignToTerrain

Ifthisissetto[1],thissettingwillcausetheDecoLayertorotatetheStaticMeshestoalignwiththenormalofthequadthatthemeshissittingon.Ifleftat[0]theStaticMesheswillallbevertical.

Aligningtotheterraincanbeusefulforsuchthingsasrocksanddebris,butwhenusedontreesandgrassitcanlookoutofplace.

ColorMap

Thismapchangesthecolorofthedecorationsondifferentlocations.IthastobeaRGBA8texture;otherwisealldecorationswillbecomeblack.ThiseffectisbestvisibleonwhiteorverybrightStaticMeshes.Forexample,whiteStaticMeshesbecomelikethisifyouuseacolorfulColorMap:

YoucanalsopaintacolorontheDecoLayermanually:

gototheTerrainEditingWindow,selectthetool"Color",pickacolorwiththeColorbutton,andthengototheDecorationstabandselecttheDecoLayeryouwanttopainton.Thenyoushouldbeabletopaintontheterraininthe3DView.

DensityMap

ThisistheTextureMapyouassignedbyrightclickingontheLayerintheTerrainEditor.FromhereyoucanreassignittoadifferenttexturebyfirstselectingatextureintheTextureBrowserthenclickingthe"Use"buttoninthisfieldwhenitisselected.

DensityMultiplier

ThesefieldsvarythenumberofStaticMeshesthatareplacedinthepaintedDecoLayerareaontheterrain.I'mnotsurehowexactlytheMaxandMinvaluesseparatelydeterminethenumberofStaticMeshesplaced,buttheydoeachdodifferentthings.ExperimentwitheachtofindtheappropriatedensityofDecoLayerStaticMeshes.

DetailMode

Thisdefinestheminimaldetailthathastobesetbeforethisdecolayerisshown.TheminimalvalueisDM_Low,inthiscaseitwillalwaysbeshown,unlessdecolayersarecompletelyturnedoff(DecoLayersin[WinDrv.WindowsClient]).WithDM_Highit'sonlyshowninhighdetailmode(HighDetailActorsintherenderdevicesettings),andDM_SuperHighisjustforeyecandy(SuperHighDetailActorsintherenderdevice).

DisregardTerrainLighting

Settingthisvalueto1willforcethedecomeshestoignorethelightingvalueofthequadtheyreston,andmakethemappearfullbright.

DrawOrder

TheDrawOrderallowsyoutosetinwhatorderthedecorationsshouldbedrawn.SORT_BackToFrontdrawstheonesfarawayfirstandthentheonesclosetothecamera,andSORT_FrontToBackdoestheopposite.SORT_NoSortusesnospecificorder.YoucanusethissettingtopreventproblemswithAlphaTextures:

iftheneartreesaredrawnfirst,andafterthatthedistanttrees,theenginemayforgettodrawthesebehindsemi-transparentpartsoftheAlphaTextureifAlphaTestison.Thisisshownonthefirstscreenshot.IfyounowsetDrawOrdertoSORT_BackToFront,thedistanttreesaredrawnfirst,andtheAlphaTexturefromtheneartreesisblendedcorrectlyoverthem.

Sincethereareonlythreedifferentsettings,itisprettyeasytoexperimentwitheachofthesettingstoseewhichworksbestforyoursituationifyou'renotsurewhichonetouse.

FadeOutRadius

ThesearetheradiithattheStaticMeshesbegintofadeout.TheMinsettingdeterminesthedistancefromthecameraatwhichtheystarttobecometranslucent,andtheMaxsettingdeterminesthedistancefromthecameraatwhichtheybecomeentirelytransparent.

LitDirectional

Ifthisvalueissetto[1],itforcestheStaticMeshestousesunlight.Itcanlookverybadinsomecases,asitwillcauseshadowsonthingslikegrassandsuch.

MaxPerQuad

ThisvaluesetsthemaximumnumberofStaticMeshesplacedperquad.

RandomYaw

Ifthisissetto1,theStaticMesheswillberandomlyrotatedalongtheZaxiswhichhelpsbreakup`tiling'appearance.BeawarethatthismaycauseAlignToTerraintoworkincorrectly.

ScaleMap

YoucanaddaScaleMapontheDecoLayer,thisisaRGBA8texturethatdetermineswhatsizethedecorationshaveondifferentlocationsontheterrain.ThisisdoneforX,YandZindependently:

theredandgreenchanneldeterminethewidthandlength,andthebluechanneltheheight.ForexampleifyouusethetexturefromtheleftpictureasScaleMap,andtheDecoLayerisaforest,theforestwilllooklikethescreenshotontheright:

ScaleMultiplier

YoualsohavetoenteraScaleMultiplier,therearesixvaluesforaMinandMaxX,YandZscale.IfyougiveadifferentMinandMax,eachdecorationwillgetarandomsizebetweenbothvalues.SometimestheStaticMeshissosmallorsobigthatyoucan'tseeitanymore,sometimesyoureallyhavetotrydifferentvaluesbeforeyoucanseethedecorations.

Seed

ThesedeterminedifferentrandomlygeneratedlayoutsfortheplacementoftheStaticMeshes.IffeelthatyouhavetheproperdensityandnumberofStaticMeshesbuttheStaticMeshesaren'tquiteintherightplace,tryenteringafewdifferentnumbersinh

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

当前位置:首页 > 高等教育 > 艺术

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1