视察贴图创建.docx
《视察贴图创建.docx》由会员分享,可在线阅读,更多相关《视察贴图创建.docx(12页珍藏版)》请在冰豆网上搜索。
![视察贴图创建.docx](https://file1.bdocx.com/fileroot1/2023-7/25/64448ace-5b15-4d2a-842c-e20a04cca8c0/64448ace-5b15-4d2a-842c-e20a04cca8c01.gif)
视察贴图创建
Creatingatextureusingparallaxocclusionmapping
1.Creatingyourhighpolyobject
1.1Technicalrestrictions
Parallaxocclusionmappingcanonlybeusedontilingtextures.WhenusinguniquebakesitwillproduceerrorsonUVbordersandnotworkcorrectly.
InCryEngine3,POMisaDirectX11onlyfeaturesoyouwillhavetousetheCrysis2Editor,CryENGINE3SDKdoesnotsupportPOMyet.
1.23DStudioMax
Modelyourhighpolymeshandprepareitforsculpting.Makesuretohaveanevenpolygondensityinordertomakesculptingaseasyaspossible.
Model,createUVcoordinatesandexportyourlowpolymesh.Exportyourhighpolyfloatinggeometry(inmyexamplemeshthefloatingholes)andyourbasegeometryasaseparateobj.
1.3SculptinginZbrush
Importyourobjectandfloatersasseparatesub-toolsintoZbrush.Inmycase,I´veonlyaddedsomeweatheringtotheedgesofmymeshusingthe
Trimdynamicbrush.Exportyoursculptedbasemeshandyourfloatersincaseyouaddeddetailtothem.
2.Bakingusingxnormal
OpenXnormalandloadyourlowpolymeshunder"lowdefinitionmeshes"andaddyoursculptedhighpolybasemeshandsculptedhighpolyfloatersunder"Highdefinitionmeshes".Makesuretoenablethe"Normalmap","Heightmap","Bakebasetexture"and"Ambientocclusion"checkboxes.
SincewewanttousethetextureinCryEnginemakesuretosettheNormalmapsettingstoX+,Y-andZ+.
Enableinteractivenormalizationinthe"Heightmap"settingsaswell.
Clickon"GenerateMaps"andwaitforxNormaltocomputeyourtexturemaps.Afterbakingtheheightmap,the"xNormalInteractiveheighttonemapper"willpopup.Enable"Debugmin/maxclamping"andadjustthesliderssothatasfewareasaspossibleshowupindebugcolors(red,blue).Thismeansthatyourheightmappickeduptheentirerangeofheightinformationinyourgeometry.
3.TexturinginPhotoshop
Loadyourbakedmapsinphotoshopandusethemtocreateadiffusetextureforyourobject.Sinceweusedfloatinggeometry,theheightmapwillbewrongontheseobjectsastheywerefloatingontopofoursurface.Youhavetomanuallymodifytheareasofyourfloatinggeometry.
Proceedwiththefollowingsteps:
-Loadtheheightmap
-Observethatthefloatersarenotflushwiththeunderlayingbasesurface.Theyhaveamuchhigherbrightnessandhavebeenbakedastheyareintherealmesh
-Usethebakedbasetexturefromxnormaltomaskyourfloatinggeometryandapplya"Levels"adjustmentlayer.Adjustitsothatthefloatersmatchthe
underlayingsurface.
-Saveyourtexturesina512x512resolution.Usethe"Diffuse_lowQ"presetforthediffusemapandthe"Normalmap_lowQ"presetforthenormalmap.Storethe
heightmapinthealphachannelofyournormalmap.
-Icallmydiffusemap"plate_DIFF.tif"andmynormalmap"plate_DDN.tif".Iamusingsuffixestoseperatethedifferenttypesoftextures(_DIFF=diffusemap,
_DDN=normalmap,_SPEC=specularmap)
4.ShadersetupinCryEngine
POMiscurrentlyaDX11onlyfeaturesoyouneedtousetheCrysis2EditorwiththeDX11Patchinstalled.
Openanyofthelevels,IusedDowntown.Inyourrollupbar,selectbrushanddraganddropa"primitve_plane_noproxy"cgfmeshintotheviewport.
OpenthematerialEditorbypressingmandrightclickintheleftcolumn.Select"AddNewMaterial"andcreateamaterialcalled"pom.mtl"in"\Crysis2\gamecrysis2\Objects\pom\".Thelocationandnameofthematerialisnotcrucialanditcanbecreatedwhereveryouwanttoplaceit.
Oncethematerialiscreated,pleaseaddthefollowingsettings
Assignthematerialtotheplane(Selecttheplaneandclick"AssignMaterialtoSelection"inthematerialeditor)
HereisanoverviewofthefeaturesimportantforPOM:
-The"Parallaxocclusionmapping"checkboxenablesPOM
-"POMDisplacement"adjuststhestrengthofthedisplacement
-"POMheightbias"adjuststhelevelthatthedisplacementisbeingappliedto.
-"Selfshadowstrengths"adjuststhestrengthoftheself-shadowing.
Sincethistexturedoesnothaveitsownspecularmap,makesuretoadjustthe"DifGlossamount","DifGlossbrightness"and"DifGlosscontrast"valuestousethediffusemapasaspeculartexture.Youcandownloadallthecontentfromthistutorial(Zbrush4.0andPhotoshopCS3orhigherrequired)here.
-back-