先貼上Demo 地圖資料中的兩個設定檔:
gcanyon_height_4k2k.cfg
1:GroupName=PLSM2
2:LandScapeFileName=gcanyon_height_4k2k
3:FileSystem=LandScapeFileName
4:Width=8
5:Height=4
6:ScaleX=10000
7:ScaleY=3000
8:ScaleZ=10000
9:Deformable=no
10:VertexCompression=no
11:VertexProgramMorph=no
12:MaxPixelError=8
13:TextureStretchFactor=1
14:NumTextureFormatSupported=1
15:TextureFormatSupported0=ImagePaging
16:TextureFormat=ImagePaging
17:ImageFilename=gcanyon_texture_4k2k
18:NumMatHeightSplat=4
19:MaterialHeight1=5
20:MaterialHeight2=95
21:SplatFilename0=splatting_sand.png
22:SplatFilename1=splatting_grass.png
23:SplatFilename2=splatting_rock.png
24:SplatFilename3=splatting_snow.png
25:VisibleRenderables=75
26:MaxAdjacentPages=1
27:MaxPreloadedPages=2
28:MaxNumRenderables=256
29:MaxNumTiles=256
30:NumRenderablesLoading=10
31:PageLoadInterval=5
32:RenderableLoadInterval=3
33:IncrementRenderables=256
34:IncrementTiles=256
35:HorizonVisibilityComputing=yes
#下面幾行就不解讀了
BaseCameraViewpoint.x=0.0f
BaseCameraViewpoint.y=60000.0f
BaseCameraViewpoint.z=17000.0f
Baselookat.x=0.0f
Baselookat.y=0.0f
Baselookat.z=0.0f
上面大家看到的是gcanyon_height_4k2k樣本地圖的運行時設定檔的內容。我來一行一行地解讀一下:
1:告訴PLSM2到哪個資源群組下去載入這幅地圖
2:地圖檔案的名字
3:到哪個檔案夾下找地圖的Pages的資訊
4,5:原始的地圖被分成4行8列的Pages格。共32個Pages。
6,7,8:Page中的高度值(灰階)及X,Z方向上的座標值被縮放的倍數。
9:是否允許修改紋理圖或者是否允許地形形變。
10:頂點是否壓縮
11:是否使用頂點融合
12:最大像素誤差。
13:紋理延伸比例
14:支援的紋理格式數
15:一種具體支援的紋理格式
16:使用的紋理格式
17:紋理影像檔名
18:高度分段數
19,20:百分比表示的分段界
21,22,23,24:4個告訴範圍的紋理圖
25:暫停,睡覺
gcanyon_height_4k2k.gen.cfg
GroupName=PLSM2
LandScapeFileName=gcanyon_height_4k2k
TextureStretchFactor=1
OutDirectory=LandScapeFileName
PageSize=513
TileSize=65
ColorMapName=gcanyon_texture_4k2k.png
ColorMapSplit=yes
HeightMap=yes
MiniMap=yes
MiniMapWidth=256
MiniMapHeight=256