Thekian
15-10-2005 12:22:51
I've been fiddling around with the mapsplitter now for a while, but just can't get it to work, I have no idea how it works or what it requires to work. The example files are totally confusing and the wiki entry is equally bad.
I just want to simply page a 2048x2048 map into pages, using a heightmap and texturemap. Could anyone give me (a point to) a short tutorial on how to use the MapSplitter?
Thanks in advance.
tuan kuranes
15-10-2005 13:02:52
assuming
terrain data, heightmap is in mylandscape.png
and texturemap is mytexturemap.png
Here's the simplest one you can do :
mylandscape.gen.cfg
GroupName=PLSM2
LandScapeFileName=mylandscape
LandScapeExtension=png
Data2DFormat=HeightField
ColorMapName=mytexturemap.png
ColorMapSplit=yes
HeightMap=yes
LandScapeExportExtension=png
TextureExtension=png
Paged=yes
# Scale values
ScaleX=9
ScaleY=1.5
ScaleZ=9
# terrain batch values
PageSize=513
TileSize=65
# Directory where to store files
# absolute or related to maptool directory
# if OutDirectory=LandScapeFileName will use filename of your input data
OutDirectory=../../../../Samples/Media/paginglandscape/LandScapeFileName
maptool.cfg
DefaultMap=mylandscape.gen
mylandscape=mylandscape.gen
GroupName=PLSM2
BatchMode=no
mylandscape.gen.cfg, mylandscape.png, mytexturemap.png must be in [PLSM2] group in your resources.cfg (which is in same dir as mapsplitter maptool.cfg ).
Thekian
15-10-2005 13:19:51
I tried your solution, but I keep getting this error:
Error #: 7
Function: PagingLandScapeOptions::loadMap
Description: Cannot locate a Config File defining the map named mylandscape.gen.
File: ..\..\..\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOptions.cpp
Line: 303
Stack unwinding: <<beginning of stack>>
14:10:21: Termination handler: uncaught exception!
14:10:21: *-*-* OGRE Shutdown
I did exactly as you said, but it returns the same error all the time, I'm pretty sure I've setup the FileSystem correctly:
[PLSM2]
FileSystem=terrain
Where 'terrain' is the directory I store the files
tuan kuranes
15-10-2005 13:31:42
is terrain a subdirectory of where mapslitter is ?
mylandscape.gen is in reality named mylandscape.gen.cfg ?
tuan kuranes
15-10-2005 13:35:43
made a mistake in maptool.cfg on the first line, try the new one :
DefaultMap=mylandscape
mylandscape=mylandscape.gen
GroupName=PLSM2
BatchMode=no
tuan kuranes
15-10-2005 13:36:50
and make sure there's no case problem in names and filenames.
Thekian
15-10-2005 13:47:46
Now it seems to work fine, except that it crashes on image processing.
The last lines of MapSplitter.log is:
14:37:01: *-*-* OGRE Initialising
14:37:01: *-*-* Version 1.0.5 (Azathoth)
14:37:01: Creating resource group PLSM2
14:37:01: Added resource location 'terrain' of type 'FileSystem' to resource group 'PLSM2'
And Dr. Mingw returns this problem:
MapSplitter.exe caused an Access Violation at location 77c36fa3 in module msvcrt.dll Reading from location 03992000.
77C36FA3 msvcrt.dll:77C36FA3 memcpy
6DCEB0DA IL.dll:6DCEB0DA ilInitImage
What might this be?
tuan kuranes
15-10-2005 13:58:14
bad devil libary linking linking ?
devil.dll must be compiled using same compiler... should be using migw dependency pack ?
Thekian
15-10-2005 21:34:40
Too bad I already am using the depency pack DevIL library
tuan kuranes
15-10-2005 21:44:57
does it work if you use data from sample (using ps_height_1k.png && ps_texture_1k.png ) ?
Thekian
15-10-2005 21:52:44
It crashes there too, so I wonder if it is my MapSplitter application that has problems, do you have a precompiled version I can test with?
EDIT: As it turns out, I might be using the wrong version of the PLSM2. I want to try recompiling the PLSM2 kit later, and see how that works