syedhs
03-07-2006 17:28:03
Okay I think I give up after one full day looking for explanation on why my heightmap doesn't appear correctly.
Here is the background: Texture is in one big size (4096x4096), and get splitted to 4 chunks and that was fine. Heightmap (512x512) saved in 16 bit raw, and split to 4 chunks.. seems to be okay. But whenever I load the setting using PLSM2 demo (I edited the paginglandscape2.cfg), the heightmap appears 'ugly' which looks like below:-
The setting file (.cfg) is as below:-
I am not too sure, but it looks like PLSM2 doesn't really 'understand' my heightmap - maybe it is reading only 8 bit for each point (instead of 16 bit). That may explain the ridiculously high terrain because the 2nd bytes are skipped - that is what I think and that is probably wrong. For this I am attaching the .raw heightmap for download. http://syedhs.org/ogre/ssp_height4k4k.raw
I have played around changing the Data2dFormat to Heightmap or HeightmapRaw, but to no avail.
Can someone please help me locating any error? Any help/solution/pointer is highly appreciated.
p/s: I looked into the source code, it appears that the entry for each setting in the .cfg file is case-sensitive.
Here is the background: Texture is in one big size (4096x4096), and get splitted to 4 chunks and that was fine. Heightmap (512x512) saved in 16 bit raw, and split to 4 chunks.. seems to be okay. But whenever I load the setting using PLSM2 demo (I edited the paginglandscape2.cfg), the heightmap appears 'ugly' which looks like below:-
The setting file (.cfg) is as below:-
GroupName=PLSM2
LandScapeFileName=ssp_height4k4k
LandScapeExtension=raw
FileSystem=ssp_height4k4k
Data2DFormat=HeightFieldRaw
Width=2
Height=2
RawWidth=257
RawHeight=257
PageSize=257
ScaleX=4500
ScaleY=800
ScaleZ=4500
Deformable=no
VertexCompression=yes
VertexProgramMorph=yes
MaxPixelError=8
TextureStretchFactor=8
NumTextureFormatSupported=1
TextureFormatSupported0=ImagePaging
TextureFormat=ImagePaging
ImageFilename=ssp_texture_4k4k
VisibleRenderables=75
NumRenderablesLoading=10
RenderableLoadInterval=3
MaxAdjacentPages=1
MaxPreloadedPages=2
PageLoadInterval=5
MaxNumRenderables=256
IncrementRenderables=256
MaxNumTiles=256
IncrementTiles=256
HorizonVisibilityComputing=yes
# where to put camera on load.
BaseCameraViewpoint.x=4500
BaseCameraViewpoint.y=1000;
BaseCameraViewpoint.z=4500;
Baselookat.x=0.0f
Baselookat.y=0.0f
Baselookat.z=0.0f
I am not too sure, but it looks like PLSM2 doesn't really 'understand' my heightmap - maybe it is reading only 8 bit for each point (instead of 16 bit). That may explain the ridiculously high terrain because the 2nd bytes are skipped - that is what I think and that is probably wrong. For this I am attaching the .raw heightmap for download. http://syedhs.org/ogre/ssp_height4k4k.raw
I have played around changing the Data2dFormat to Heightmap or HeightmapRaw, but to no avail.
Can someone please help me locating any error? Any help/solution/pointer is highly appreciated.
p/s: I looked into the source code, it appears that the entry for each setting in the .cfg file is case-sensitive.