sjcomp
25-06-2006 19:40:25
I am using puget_1k.gen.cfg to split my heightmap. I have replaced ps_height_1k.png with my own heightmap. When I tried to split it MapSplitter would crash on the first assertion in MemoryManager::validateAlloc(). After debugging the issue I found that it happens during destruction of splat (std::vector) in MapSplatter::CalcMapSplats().
Conclusion (in MapSplatter::CalcMapSplats()):
while (height > matHeight[indx])
indx++;
if height is bigger then the largest value in matHeight[] then indx keeps growing.
I am not sure what should be changed in order to fix this thing. Is it a bug with proper matHeight initialization (heights should be properly calculated)? Is it a problem of configuration file (though check for user error should be in place)?
At the moment I've changed this code to
while (height > matHeight[indx] && indx<(numMatHeightSplat-1))
indx++;
I am using latest sdk.
tuan kuranes
26-06-2006 08:47:53
strange thing, as matHeight[numMatHeightSplat-1] is supposed to be filled with the maximal theorical height and therfore should prevent that.
In cvs I fixed something on a bug with options when in batch mode using mapsplitter.
Does it occures in single terrain splitt (not batchmode) ?
if yes what map was that ?
sjcomp
26-06-2006 14:59:29
Does it occures in single terrain splitt (not batchmode) ?
if yes what map was that ?
It is not a batch mode. I have a single map puget_1k.gen.cfg. But I did change the heightmap file to my own (my map is using the whole range of 16 bit values from 0 to all the way up). It looks like the maximum height was not properly detected. I am using sdk sources.
Thanks.
tuan kuranes
27-06-2006 08:27:55
does it sill happens with CVS version ?
sjcomp
27-06-2006 13:42:45
does it sill happens with CVS version ?
It still happens in CVS. Do you want me to send you the heightmap I have? Or I think if you use a heightmap wich is using the whole range it could cause the same problem.
Thanks.
tuan kuranes
27-06-2006 14:03:56
the .gen.cfg should suffice.
sjcomp
27-06-2006 14:16:45
This is my gen.cfg. This is a copy from puget_1k.gen.cfg, I simply modified LandScapeFileName and ColorMapName.
GroupName=PLSM2
LandScapeFileName=map
TextureStretchFactor=2
OutDirectory=terrains/LandScapeFileName
Data2DFormat=HeightField
ColorMapName=map.Texture.png
ColorMapSplit=yes
HeightMap=yes
BaseMap=yes
CoverageMap=yes
AlphaMaps=yes
MiniMap=yes
MiniMapWidth=256
MiniMapHeight=256
NumMatHeightSplat=5
MaterialHeight0=0
MaterialHeight1=1
MaterialHeight2=20
MaterialHeight3=75
MaterialHeight4=75
AvgColorsExists=yes
#Sand
MaterialColor0.r=0.0f
MaterialColor0.g=0.0f
MaterialColor0.b=1.0f
#Grass
MaterialColor1.r=0.13f
MaterialColor1.g=0.545f
MaterialColor1.b=0.13f
#Rock 171 29 14
MaterialColor2.r=0.6705f
MaterialColor2.g=0.1137f
MaterialColor2.b=0.0549ff
#Rock
MaterialColor3.r=0.411764f
MaterialColor3.g=0.811764f
MaterialColor3.b=0.811764f
#Snow
MaterialColor4.r=0.411764f
MaterialColor4.g=0.811764f
MaterialColor4.b=0.811764f
tuan kuranes
24-07-2006 21:36:03
sorry, but did it work now or did I forgot to follow/fix the bug ?
sjcomp
25-07-2006 03:31:07
I did not check cvs for a while now, so I am not sure
Once I resume working on that part of my code I check if it works and if it is not, I will post a message here!