Unreal教程Creating DecoLayers建立植被层文档格式.docx
- 文档编号:22587302
- 上传时间:2023-02-04
- 格式:DOCX
- 页数:11
- 大小:264.06KB
Unreal教程Creating DecoLayers建立植被层文档格式.docx
《Unreal教程Creating DecoLayers建立植被层文档格式.docx》由会员分享,可在线阅读,更多相关《Unreal教程Creating DecoLayers建立植被层文档格式.docx(11页珍藏版)》请在冰豆网上搜索。
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
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Unreal教程Creating DecoLayers建立植被层 Unreal 教程 Creating DecoLayers 建立 植被