fiesch
15-12-2005 12:41:16
Hi there.. maybe I'm just plain dumb but i can't get any custom terrain i make shown right in my app with PLSM2.
Whenever there's something splatting-related in the texture-mode, no matter which one, my system just freezes, the second tft i use for tool windows looses the input signal and powers down and that's it..
I've tried using a 4096x4096 grayscale png with the mapsplitter but that just knocked itsself out in the OgreMemManager, being obviousely out-of-mem while calculating the normal maps.
got it working with a 1024x1024 scaled version of the png and i have all the maps you could possibly wish for, normal maps, alpha maps, base maps, coverage, texture etc etc etc.
I'm actually trying to integrate this into my in-game editor which nears completion in it's basic features and which has already a nice Terrain Geom-Edit functionality thanks to your code... but this just won't work.
I've played around with the gen.cfg and .cfg files for days now, rebooting the machine around 30 times a day or more due to the freezeups...
well first things first.. I'm having a real hard time finding the error since the freezeups occur on pageLoad, not on terrain-load (meaning i can see the scene without terrain for a frame or two before it freezes up).. so stepping through is not that easy but I'll try to step-debug the page loading code when i get the chance.
Second: it's a really bad thing that the PLSM2 code can freeze the system up and even auto-reboot it(that might have been due to ATI Vpu recover).. i don't have an idea right now how that happened or where the freezes could come from (most probably and infnite loop on page loading)
but there's certainly a safety check or two missing that would crash the app when sth like that occurs instead of locking the OS.
Third: I was having a real hard time finding out how to use some of the Options in the set/getOption mechanism since they're just not documented, i hope there will be the time for eithe ryou or me in the future to get back to that problem (which a major portion of the PLSM2 code has, btw)
Fourth: The documentation on splatting modes and the techniques incorporated in each one is a little confusing to me, as it appears to be for some others on the forum as that has had it's own thread recently, maybe either you could give me a crash course on it and I complete the documentation or you might find the time to do it yourself, anyway I'd really appreciate some more insight on this.
thx for now
[Edit]
Fifth: (i forgot about this) the PLSM2 manager only cares in part about changed ResourceGroups in the terrain-definition.
When i set it to EG_Terrain in which the config files for the terrain and all data are, it tries to load texture files from either "General" or "PLSM2" which i also find a bit confusing..
Here are the config-files used: (i don't know if i synced the last modifications yet so they might look a bit odd)
eg_base_small.cfg
eg_base_small.gen.cfg
Maptool config used for generation:
matching resources.cfg (from the samples/common dir):
the paginglandscape2.cfg used in my app:
and the dir-dump of the folder with terrain-data:
and the files i needed to have in "General" group to get it to load:
Whenever there's something splatting-related in the texture-mode, no matter which one, my system just freezes, the second tft i use for tool windows looses the input signal and powers down and that's it..
I've tried using a 4096x4096 grayscale png with the mapsplitter but that just knocked itsself out in the OgreMemManager, being obviousely out-of-mem while calculating the normal maps.
got it working with a 1024x1024 scaled version of the png and i have all the maps you could possibly wish for, normal maps, alpha maps, base maps, coverage, texture etc etc etc.
I'm actually trying to integrate this into my in-game editor which nears completion in it's basic features and which has already a nice Terrain Geom-Edit functionality thanks to your code... but this just won't work.
I've played around with the gen.cfg and .cfg files for days now, rebooting the machine around 30 times a day or more due to the freezeups...
well first things first.. I'm having a real hard time finding the error since the freezeups occur on pageLoad, not on terrain-load (meaning i can see the scene without terrain for a frame or two before it freezes up).. so stepping through is not that easy but I'll try to step-debug the page loading code when i get the chance.
Second: it's a really bad thing that the PLSM2 code can freeze the system up and even auto-reboot it(that might have been due to ATI Vpu recover).. i don't have an idea right now how that happened or where the freezes could come from (most probably and infnite loop on page loading)
but there's certainly a safety check or two missing that would crash the app when sth like that occurs instead of locking the OS.
Third: I was having a real hard time finding out how to use some of the Options in the set/getOption mechanism since they're just not documented, i hope there will be the time for eithe ryou or me in the future to get back to that problem (which a major portion of the PLSM2 code has, btw)
Fourth: The documentation on splatting modes and the techniques incorporated in each one is a little confusing to me, as it appears to be for some others on the forum as that has had it's own thread recently, maybe either you could give me a crash course on it and I complete the documentation or you might find the time to do it yourself, anyway I'd really appreciate some more insight on this.
thx for now
[Edit]
Fifth: (i forgot about this) the PLSM2 manager only cares in part about changed ResourceGroups in the terrain-definition.
When i set it to EG_Terrain in which the config files for the terrain and all data are, it tries to load texture files from either "General" or "PLSM2" which i also find a bit confusing..
Here are the config-files used: (i don't know if i synced the last modifications yet so they might look a bit odd)
eg_base_small.cfg
GroupName=EG_Terrain
TextureStretchFactor=2
Data2DFormat=HeightField
LandScapeFileName=eg_base_small
#TextureFormat=Splatting7Edit
TextureFormat=Image
ImageFilename=eg_base_small_texture
ScaleX=15000
ScaleY=1000
ScaleZ=15000
#Deformable=yes
#VertexCompression=yes
#VertexProgramMorph=yes
#VertexNormals=yes
NumMatHeightSplat=4
MaterialHeight1=15
MaterialHeight2=50
MaterialHeight3=80
MaterialHeight4=95
SplatFilename0=splatting_sand.png
SplatFilename1=splatting_grass.png
SplatFilename2=splatting_rock.png
SplatFilename3=splatting_snow.png
# where to put camera on load.
BaseCameraViewpoint.x=935.0f
BaseCameraViewpoint.y=24000.0f
BaseCameraViewpoint.z=-432.0f
Baselookat.x=0.0f
Baselookat.y=0.0f
Baselookat.z=0.0f
eg_base_small.gen.cfg
GroupName=EG_Terrain
LandScapeFileName=eg_base_small
TextureStretchFactor=2
ScaleX=1.5
ScaleY=1
ScaleZ=1.5
OutDirectory=../../../../Samples/Media/eg_base
Data2DFormat=HeightField
ColorMapName=eg_base_small_texture.png
ColorMapSplit=yes
HeightMap=yes
BaseMap=yes
CoverageMap=yes
AlphaMaps=yes
NormalMap=yes
#ZHorizon=yes
#LightMap=yes
#Sunx=0.0f
#Suny=0.88f
#Sunz=0.47f
#Ambient=0.5f
#Diffuse=0.5f
#Blur=0.0f
MiniMap=yes
MiniMapWidth=64
MiniMapHeight=64
NumMatHeightSplat=4
MaterialHeight1=12
MaterialHeight2=35
MaterialHeight3=80
MaterialHeight4=95
AvgColorsExists=yes
#Sand
MaterialColor0.r=0.0f
MaterialColor0.g=0.0f
MaterialColor0.b=1.0f
#Grass
MaterialColor1.r=0.145f
MaterialColor1.g=0.624f
MaterialColor1.b=0.0f
#Rock
MaterialColor2.r=0.411764f
MaterialColor2.g=0.811764f
MaterialColor2.b=0.811764f
#Rock
MaterialColor3.r=0.411764f
MaterialColor3.g=0.811764f
MaterialColor3.b=0.811764f
#Snow
MaterialColor4.r=1.0f
MaterialColor4.g=0.0f
MaterialColor4.b=0.0f
Maptool config used for generation:
DefaultMap=eg_terrain
eg_terrain=eg_base.gen
#eg_terrain_mid=eg_base_mid.gen
eg_terrain_small=eg_base_small.gen
#puget_sound=puget_1k.gen
#grand_canyon=gcanyon_height_4k2k.gen
#terragen_genrated=terragen16bits.gen
#European_Alpes=Alpes.gen
#TSM=TsmTerrain.gen
# resource group name
GroupName=EG_Terrain
#GroupName=PLSM2
#do you want to run it on all maps listed here
BatchMode=no
matching resources.cfg (from the samples/common dir):
# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=../../../Media/packs/OgreCore.zip
# Resource locations to be added to the default path
[General]
FileSystem=../../../Media
FileSystem=../../../Media/fonts
FileSystem=../../../Media/materials/programs
FileSystem=../../../Media/materials/scripts
FileSystem=../../../Media/materials/textures
FileSystem=../../../Media/models
FileSystem=../../../Media/overlays
FileSystem=../../../Media/particle
FileSystem=../../../Media/gui
FileSystem=../../../Media/DeferredShadingMedia
Zip=../../../Media/packs/cubemap.zip
Zip=../../../Media/packs/cubemapsJS.zip
Zip=../../../Media/packs/dragon.zip
Zip=../../../Media/packs/fresneldemo.zip
Zip=../../../Media/packs/ogretestmap.zip
Zip=../../../Media/packs/skybox.zip
[PLSM2]
FileSystem=../../../Media/paginglandscape2
FileSystem=../../../Media/paginglandscape2/gui
FileSystem=../../../Media/paginglandscape2/fonts
FileSystem=../../../Media/paginglandscape2/models
FileSystem=../../../Media/paginglandscape2/overlays
FileSystem=../../../Media/paginglandscape2/materials
#FileSystem=../../../Media/paginglandscape2/materials/scripts
FileSystem=../../../Media/paginglandscape2/materials/textures
FileSystem=../../../Media/paginglandscape2/materials/programs
FileSystem=../../../Media/paginglandscape2/datasrcs
FileSystem=../../../Media/paginglandscape2/terrains
#FileSystem=../../../Media/paginglandscape2/terrains/alpes
#FileSystem=../../../Media/paginglandscape2/terrains/eg_base
#FileSystem=../../../Media/paginglandscape2/terrains/hf129_3
FileSystem=../../../Media/paginglandscape2/terrains/TsmTerrain
#FileSystem=../../../Media/paginglandscape2/terrains/ps_height_1k
#FileSystem=../../../Media/paginglandscape2/terrains/terragen16bits
#FileSystem=../../../Media/paginglandscape2/terrains/gcanyon_height_4k2k
[EG_Terrain]
FileSystem=../../../Media/eg_base
the paginglandscape2.cfg used in my app:
GroupName=EG_Terrain
DefaultMap=EG_Default
#DefaultMap=TSM
EG_Default=eg_base_small
#TSM=TsmTerrain
def=Default
# resource group name where to find map definition
#GroupName=PLSM2
VertexNormals=yes
VertexLit=yes
# Try forbidden textureformat combinations
TextureFormatDebug=no
# Under Cam make LOD always at max, no matter how simple is the tile
MaxLodUnderCam=yes
and the dir-dump of the folder with terrain-data:
Volume in Laufwerk C: hat keine Bezeichnung.
Volumeseriennummer: E003-EA5E
Verzeichnis von C:\dev\client\Media\EG_Terrain
15.12.2005 13:40 <DIR> .
15.12.2005 13:40 <DIR> ..
15.12.2005 13:40 0 dir.txt
14.12.2005 19:41 711 eg_base.cfg
14.12.2005 03:53 1.056 eg_base.gen.cfg
14.12.2005 22:30 88.323 eg_base_small.0.0.png
14.12.2005 22:30 85.413 eg_base_small.0.1.png
14.12.2005 22:30 82.756 eg_base_small.1.0.png
14.12.2005 22:30 86.387 eg_base_small.1.1.png
14.12.2005 22:30 1.228 eg_base_small.Alpha.0.0.0.png
14.12.2005 22:30 3.958 eg_base_small.Alpha.0.0.1.png
14.12.2005 22:30 25.613 eg_base_small.Alpha.0.1.0.png
14.12.2005 22:30 3.883 eg_base_small.Alpha.0.1.1.png
14.12.2005 22:30 67.810 eg_base_small.Alpha.1.0.0.png
14.12.2005 22:30 37.001 eg_base_small.Alpha.1.0.1.png
14.12.2005 22:30 93.845 eg_base_small.Alpha.1.1.0.png
14.12.2005 22:30 48.228 eg_base_small.Alpha.1.1.1.png
14.12.2005 22:30 399.431 eg_base_small.Alpha.2.0.0.png
14.12.2005 22:30 355.329 eg_base_small.Alpha.2.0.1.png
14.12.2005 22:30 356.405 eg_base_small.Alpha.2.1.0.png
14.12.2005 22:30 333.789 eg_base_small.Alpha.2.1.1.png
14.12.2005 22:30 352.176 eg_base_small.Alpha.3.0.0.png
14.12.2005 22:30 335.447 eg_base_small.Alpha.3.0.1.png
14.12.2005 22:30 293.671 eg_base_small.Alpha.3.1.0.png
14.12.2005 22:30 299.309 eg_base_small.Alpha.3.1.1.png
14.12.2005 22:30 163.086 eg_base_small.Base.0.0.png
14.12.2005 22:30 121.877 eg_base_small.Base.0.1.png
14.12.2005 22:30 212.382 eg_base_small.Base.1.0.png
14.12.2005 22:30 132.966 eg_base_small.Base.1.1.png
14.12.2005 23:13 757 eg_base_small.cfg
14.12.2005 22:30 691.352 eg_base_small.Coverage.0.0.png
14.12.2005 22:30 603.126 eg_base_small.Coverage.0.1.png
14.12.2005 22:30 674.483 eg_base_small.Coverage.1.0.png
14.12.2005 22:30 548.027 eg_base_small.Coverage.1.1.png
14.12.2005 19:52 1.054 eg_base_small.gen.cfg
14.12.2005 22:30 1.411.581 eg_base_small.N.0.0.png
14.12.2005 22:30 1.453.656 eg_base_small.N.0.1.png
14.12.2005 22:30 1.316.724 eg_base_small.N.1.0.png
14.12.2005 22:30 1.368.590 eg_base_small.N.1.1.png
14.12.2005 22:30 342.596 eg_base_small.Nsmall.0.0.png
14.12.2005 22:30 339.898 eg_base_small.Nsmall.0.1.png
14.12.2005 22:30 335.345 eg_base_small.Nsmall.1.0.png
14.12.2005 22:30 336.016 eg_base_small.Nsmall.1.1.png
14.12.2005 03:54 267.025 eg_base_small.png
14.12.2005 22:30 4.723 eg_base_small.Small.png
14.12.2005 22:30 160.536 eg_base_small_texture.0.0.png
14.12.2005 22:30 157.951 eg_base_small_texture.0.1.png
14.12.2005 22:30 137.826 eg_base_small_texture.1.0.png
14.12.2005 22:30 159.810 eg_base_small_texture.1.1.png
14.12.2005 03:55 654.320 eg_base_small_texture.png
14.12.2005 22:30 6.641 eg_base_small_texture.Small.png
14.12.2005 01:28 95.974 splatting_grass.png
14.12.2005 01:28 136.287 splatting_rock.png
14.12.2005 01:28 167.413 splatting_sand.png
14.12.2005 01:29 46.892 splatting_snow.png
53 Datei(en) 15.400.683 Bytes
2 Verzeichnis(se), 11.987.087.360 Bytes frei
and the files i needed to have in "General" group to get it to load:
Volume in Laufwerk C: hat keine Bezeichnung.
Volumeseriennummer: E003-EA5E
Verzeichnis von C:\dev\client\Media\EG_Textures
15.12.2005 13:41 <DIR> .
15.12.2005 13:41 <DIR> ..
15.12.2005 13:41 0 dir.txt
14.12.2005 02:25 2.756.948 eg_base.png
14.12.2005 19:52 163.058 eg_base_small.Base.0.0.png
14.12.2005 19:52 120.905 eg_base_small.Base.0.1.png
14.12.2005 19:52 212.382 eg_base_small.Base.1.0.png
14.12.2005 19:52 130.414 eg_base_small.Base.1.1.png
14.12.2005 19:52 691.352 eg_base_small.Coverage.0.0.png
14.12.2005 19:52 603.126 eg_base_small.Coverage.0.1.png
14.12.2005 19:52 674.483 eg_base_small.Coverage.1.0.png
14.12.2005 19:52 548.027 eg_base_small.Coverage.1.1.png
14.12.2005 19:52 1.411.581 eg_base_small.N.0.0.png
14.12.2005 19:52 1.453.656 eg_base_small.N.0.1.png
14.12.2005 19:52 1.316.724 eg_base_small.N.1.0.png
14.12.2005 19:52 1.368.590 eg_base_small.N.1.1.png
14.12.2005 19:52 342.596 eg_base_small.Nsmall.0.0.png
14.12.2005 19:52 339.898 eg_base_small.Nsmall.0.1.png
14.12.2005 19:52 335.345 eg_base_small.Nsmall.1.0.png
14.12.2005 19:52 336.016 eg_base_small.Nsmall.1.1.png
14.12.2005 03:54 267.025 eg_base_small.png
14.12.2005 19:52 4.971 eg_base_small.Small.png
14.12.2005 19:52 160.536 eg_base_small_texture.0.0.png
14.12.2005 19:52 157.951 eg_base_small_texture.0.1.png
14.12.2005 19:52 137.826 eg_base_small_texture.1.0.png
14.12.2005 19:52 159.810 eg_base_small_texture.1.1.png
14.12.2005 03:55 654.320 eg_base_small_texture.png
14.12.2005 19:52 6.641 eg_base_small_texture.Small.png
14.12.2005 02:33 4.604.701 eg_base_texture.png
19.10.2005 00:51 347.398 sky_volume_back.jpg
19.10.2005 00:51 4.194.322 sky_volume_back.tga
19.10.2005 00:51 263.987 sky_volume_front.jpg
19.10.2005 00:51 4.194.322 sky_volume_front.tga
19.10.2005 00:51 219.809 sky_volume_left.jpg
19.10.2005 00:51 4.194.322 sky_volume_left.tga
19.10.2005 00:51 357.187 sky_volume_right.jpg
19.10.2005 00:51 4.194.322 sky_volume_right.tga
19.10.2005 00:51 290.565 sky_volume_up.jpg
36 Datei(en) 37.215.116 Bytes
2 Verzeichnis(se), 11.986.984.960 Bytes frei