Minimum Option to generate and view terrain

tourix

24-10-2005 19:07:01

Hello all,

I'm a bit lost with the plsm2. Indeed, there are a lot of options described on the wiki paged and there are even more options in the sample config files that are not listed in the wiki.

PLSM2 provide quite a lot of features but in the first time I would just like to view a large terrain with good performances. I start form a heightmap 4097*4097 and a texture 2048*2048

Here is what I guessed but it didn't work.

//----------------------------------------------------------------

map.gen.cfg
Map definition
GroupName
LandScapeFileName
LandScapeExtension
LandScapeExportExtension
TextureExtension
ScaleX, ScaleY, ScaleZ
PageSize
TileSize

Heightmap definition
OutDirectory
Paged

DataSource
Data2DFormat

Texturing (And I guess it's here that I am wrong)
ColorMapName

//----------------------------------------------------------------

map.cfg
Map definition
GroupName
LandScapeFileName
LandScapeExtension
LandScapeExportExtension
TextureExtension
ScaleX, ScaleY, ScaleZ
PageSize
TileSize

Paging Option
Width
Height

DataSource Definition
Data2DFormat
//----------------------------------------------------------------


So please, could anyone tell me what should minimals config files look like?

thanks a lot

tuan kuranes

24-10-2005 20:51:59

It should work in theory...

Give it with the values you did use, filenames of data and texture files, and where it did fails.

tourix

24-10-2005 21:25:19

When I try to "prepare" my map with mapsplitter, it doesn't create me the file.x.z.png files.

here is my kapula.gen.cfg

#----------------------------------------------------------------------------------------
# Common option - Map definition
#----------------------------------------------------------------------------------------

GroupName=PLSM2
LandScapeFileName=kapula
LandScapeExtension=png
LandScapeExportExtension=png
TextureExtension=png
paged=yes
ScaleX=61
ScaleY=11
ScaleZ=61
PageSize=513
TileSize=65

#----------------------------------------------------------------------------------------
# Heightmap definition
#----------------------------------------------------------------------------------------
OutDirectory=Media/LandScapeFileName
#MiniMap=yes
#MiniMapWidth=512
#MiniMapHeight=512

#----------------------------------------------------------------------------------------
# Datasource
#----------------------------------------------------------------------------------------
Data2DFormat=HeightField
#MaxValue=3000
#MinValue=0

#----------------------------------------------------------------------------------------
# Texturing
#----------------------------------------------------------------------------------------
ColorMapName=kapula_texture.png


I have kapula.png and kapula_texture.png in the dirextory. Mappslitter.log doesn't show any error. So I guess that I forgot something.

and when i run demo_plsm2 with my other minimal config file, no terrain is displayed

tuan kuranes

24-10-2005 21:34:27

your need those two :

ColorMapSplit=yes
HeightMap=yes

tourix

24-10-2005 21:46:54

thank you but it still doesn't do anything.

here is my kapula.gen.cfg


#----------------------------------------------------------------------------------------
# Fichier de génération de Kapula avec PLSM2
#----------------------------------------------------------------------------------------


#----------------------------------------------------------------------------------------
# Common option - Map definition
#----------------------------------------------------------------------------------------

GroupName=PLSM2
LandScapeFileName=kapula
LandScapeExtension=png
LandScapeExportExtension=png
TextureExtension=png
paged=yes
ScaleX=1
ScaleY=1
ScaleZ=1
PageSize=513
TileSize=65

#----------------------------------------------------------------------------------------
# Heightmap definition
#----------------------------------------------------------------------------------------
OutDirectory=Media/LandScapeFileName
#MiniMap=yes
#MiniMapWidth=512
#MiniMapHeight=512

#----------------------------------------------------------------------------------------
# Datasource
#----------------------------------------------------------------------------------------
Data2DFormat=HeightField
#MaxValue=3000
#MinValue=0

#----------------------------------------------------------------------------------------
# Texturing
#----------------------------------------------------------------------------------------
ColorMapName=kapula_texture.png
ColorMapSplit=yes
#LitColorMapSplit=no

#----------------------------------------------------------------------------------------
# Heightmaps
#----------------------------------------------------------------------------------------
#InfiniteMap=no
#HeightMapBlurFactor=0.0f
#Equalize=no
HeightMap=yes


And kapula.cfg

#----------------------------------------------------------------------------------------
# Fichier runtime de Kapula avec PLSM2
#----------------------------------------------------------------------------------------

#----------------------------------------------------------------------------------------
# Common option - Map definition
#----------------------------------------------------------------------------------------

GroupName=PLSM2
LandScapeFileName=kapula
LandScapeExtension=png
LandScapeExportExtension=png
TextureExtension=png
paged=yes
ScaleX=61
ScaleY=11
ScaleZ=61
PageSize=513
TileSize=65

#----------------------------------------------------------------------------------------
# Paging Option
#----------------------------------------------------------------------------------------

Width=4
Height=4

#----------------------------------------------------------------------------------------
# Datasource
#----------------------------------------------------------------------------------------
Data2DFormat=HeightField

#----------------------------------------------------------------------------------------
# Texturing
#----------------------------------------------------------------------------------------
TextureFormat=Image
ImageFilename=kapula_texture


No error but nothing splitter nor displayed.

(by the way, thank you for your help)

tuan kuranes

24-10-2005 21:52:46

and in the log ?

tourix

24-10-2005 21:55:01

nothin special:

mapsplitter.log

22:30:56: Creating resource group General
22:30:56: Registering ResourceManager for type Material
22:30:56: Registering ResourceManager for type Mesh
22:30:56: Registering ResourceManager for type Skeleton
22:30:56: Loading library OgrePlatform.dll
22:30:56: OverlayElementFactory for type Panel registered.
22:30:56: OverlayElementFactory for type BorderPanel registered.
22:30:56: OverlayElementFactory for type TextArea registered.
22:30:56: Registering ResourceManager for type Font
22:30:56: ArchiveFactory for archive type FileSystem registered.
22:30:56: ArchiveFactory for archive type Zip registered.
22:30:56: DevIL version: Developer's Image Library (DevIL) 1.6.7 Oct 17 2004
22:30:56: DevIL image formats: bmp dib cut dcx dds gif hdr ico cur jpg jpe jpeg lif mdl mng jng pcx pic pix png pbm pgm pnm ppm psd pdd psp pxr sgi bw rgb rgba tga vda icb vst tif tiff wal xpm raw
22:30:56: Registering ResourceManager for type HighLevelGpuProgram
22:30:56: Loading library .\RenderSystem_Direct3D9
22:30:56: D3D9 : Direct3D9 Rendering SubSystem created.
22:30:56: D3D9: Driver Detection Starts
22:30:56: D3D9: Driver Detection Ends
22:30:56: Loading library .\RenderSystem_GL
22:30:56: OpenGL Rendering Subsystem created.
22:30:56: Loading library .\Plugin_CgProgramManager
22:30:56: Loading library .\Plugin_PagingLandScapeSceneManager2
22:30:56: *-*-* OGRE Initialising
22:30:56: *-*-* Version 1.1.0 (Dagon)
22:30:56: Creating resource group Bootstrap
22:30:56: Added resource location 'Media/packs/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
22:30:56: Added resource location 'Media/materials/programs' of type 'FileSystem' to resource group 'General'
22:30:56: Added resource location 'Media/materials/scripts' of type 'FileSystem' to resource group 'General'
22:30:56: Added resource location 'Media/materials/textures' of type 'FileSystem' to resource group 'General'
22:30:56: Added resource location 'Media/models' of type 'FileSystem' to resource group 'General'
22:30:56: Creating resource group PLSM2
22:30:56: Added resource location 'Media/' of type 'FileSystem' to resource group 'PLSM2'
22:30:56: Added resource location 'Media/splat' of type 'FileSystem' to resource group 'PLSM2'
22:30:56: Added resource location 'Media/datasrcs' of type 'FileSystem' to resource group 'PLSM2'
22:30:56: Added resource location 'Media/kapula' of type 'FileSystem' to resource group 'PLSM2'
22:31:03: *-*-* OGRE Shutdown
22:31:03: Unregistering ResourceManager for type Font
22:31:03: Unregistering ResourceManager for type Skeleton
22:31:03: Unregistering ResourceManager for type Mesh
22:31:03: Unregistering ResourceManager for type HighLevelGpuProgram
22:31:03: Unloading library .\Plugin_PagingLandScapeSceneManager2
22:31:03: Unloading library .\Plugin_CgProgramManager
22:31:03: *** Stopping Win32GL Subsystem ***
22:31:03: Unloading library .\RenderSystem_GL
22:31:04: D3D9 : Shutting down cleanly.
22:31:04: D3D9 : Direct3D9 Rendering SubSystem destroyed.
22:31:04: Unloading library .\RenderSystem_Direct3D9
22:31:04: Unregistering ResourceManager for type Material
22:31:04: Unloading library OgrePlatform.dll


Ogre.log

22:34:42: Creating resource group General
22:34:42: Registering ResourceManager for type Material
22:34:42: Registering ResourceManager for type Mesh
22:34:42: Registering ResourceManager for type Skeleton
22:34:42: Loading library OgrePlatform.dll
22:34:42: OverlayElementFactory for type Panel registered.
22:34:42: OverlayElementFactory for type BorderPanel registered.
22:34:42: OverlayElementFactory for type TextArea registered.
22:34:42: Registering ResourceManager for type Font
22:34:42: ArchiveFactory for archive type FileSystem registered.
22:34:42: ArchiveFactory for archive type Zip registered.
22:34:42: DevIL version: Developer's Image Library (DevIL) 1.6.7 Oct 17 2004
22:34:42: DevIL image formats: bmp dib cut dcx dds gif hdr ico cur jpg jpe jpeg lif mdl mng jng pcx pic pix png pbm pgm pnm ppm psd pdd psp pxr sgi bw rgb rgba tga vda icb vst tif tiff wal xpm raw
22:34:42: Registering ResourceManager for type HighLevelGpuProgram
22:34:42: Loading library .\RenderSystem_Direct3D9
22:34:42: D3D9 : Direct3D9 Rendering SubSystem created.
22:34:42: D3D9: Driver Detection Starts
22:34:42: D3D9: Driver Detection Ends
22:34:42: Loading library .\RenderSystem_GL
22:34:42: OpenGL Rendering Subsystem created.
22:34:42: Loading library .\Plugin_CgProgramManager
22:34:42: Loading library .\Plugin_PagingLandScapeSceneManager2
22:34:42: *-*-* OGRE Initialising
22:34:42: *-*-* Version 1.1.0 (Dagon)
22:34:42: Creating resource group Bootstrap
22:34:42: Added resource location 'Media/packs/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
22:34:42: Added resource location 'Media/materials/programs' of type 'FileSystem' to resource group 'General'
22:34:42: Added resource location 'Media/materials/scripts' of type 'FileSystem' to resource group 'General'
22:34:42: Added resource location 'Media/materials/textures' of type 'FileSystem' to resource group 'General'
22:34:42: Added resource location 'Media/models' of type 'FileSystem' to resource group 'General'
22:34:42: Creating resource group PLSM2
22:34:42: Added resource location 'Media/' of type 'FileSystem' to resource group 'PLSM2'
22:34:42: Added resource location 'Media/splat' of type 'FileSystem' to resource group 'PLSM2'
22:34:42: Added resource location 'Media/datasrcs' of type 'FileSystem' to resource group 'PLSM2'
22:34:42: Added resource location 'Media/kapula' of type 'FileSystem' to resource group 'PLSM2'
22:34:42: D3D9 : RenderSystem Option: Anti aliasing = None
22:34:42: D3D9 : RenderSystem Option: Floating-point mode = Fastest
22:34:42: D3D9 : RenderSystem Option: Full Screen = No
22:34:42: D3D9 : RenderSystem Option: Rendering Device = MOBILITY RADEON 9000
22:34:42: D3D9 : RenderSystem Option: VSync = No
22:34:42: D3D9 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour
22:34:44: D3D9 : Subsystem Initialising
22:34:44: D3D9RenderSystem::createRenderWindow "OGRE Render Window", 800x600 windowed miscParams: FSAA=0 FSAAQuality=0 colourDepth=32 vsync=false
22:34:44: D3D9 : Created D3D9 Rendering Window 'OGRE Render Window' : 800x600, 32bpp
22:34:44: Registering ResourceManager for type Texture
22:34:44: Registering ResourceManager for type GpuProgram
22:34:44: RenderSystem capabilities
22:34:44: -------------------------
22:34:44: * Hardware generation of mipmaps: yes
22:34:44: * Texture blending: yes
22:34:44: * Anisotropic texture filtering: yes
22:34:44: * Dot product texture operation: yes
22:34:44: * Cube mapping: yes
22:34:44: * Hardware stencil buffer: yes
22:34:44: - Stencil depth: 8
22:34:44: - Two sided stencil support: no
22:34:44: - Wrap stencil values: yes
22:34:44: * Hardware vertex / index buffers: yes
22:34:44: * Vertex programs: yes
22:34:44: - Max vertex program version: vs_1_1
22:34:44: * Fragment programs: yes
22:34:44: - Max fragment program version: ps_1_4
22:34:44: * Texture Compression: yes
22:34:44: - DXT: yes
22:34:44: - VTC: no
22:34:44: * Scissor Rectangle: yes
22:34:44: * Hardware Occlusion Query: yes
22:34:44: * User clip planes: yes
22:34:44: * VET_UBYTE4 vertex element type: yes
22:34:44: * Infinite far plane projection: yes
22:34:44: * Hardware render-to-texture: yes
22:34:44: * Floating point textures: no
22:34:44: * Non-power-of-two textures: yes
22:34:44: * Volume textures: yes
22:34:44: ***************************************
22:34:44: *** D3D9 : Subsystem Initialised OK ***
22:34:44: ***************************************
22:34:44: ResourceBackgroundQueue - threading disabled
22:34:44: Particle Renderer Type 'billboard' registered
22:34:44: Creating viewport on target 'OGRE Render Window', rendering from camera 'PlayerCam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
22:34:44: Viewport for camera 'PlayerCam', actual dimensions L: 0 T: 0 W: 800 H: 600
22:34:44: Parsing scripts for resource group Bootstrap
22:34:44: Parsing script OgreCore.material
22:34:44: Parsing script OgreProfiler.material
22:34:44: Parsing script Ogre.fontdef
22:34:44: Parsing script OgreDebugPanel.overlay
22:34:44: Texture: New_Ogre_Border_Center.png: Loading 1 faces(PF_A8B8G8R8,256x128x1) with 0 generated mipmaps from Image. Internal format is PF_A8B8G8R8,256x128x1.
22:34:44: Texture: New_Ogre_Border.png: Loading 1 faces(PF_A8B8G8R8,256x256x1) with 0 generated mipmaps from Image. Internal format is PF_A8B8G8R8,256x256x1.
22:34:44: Texture: New_Ogre_Border_Break.png: Loading 1 faces(PF_A8B8G8R8,32x32x1) with 0 generated mipmaps from Image. Internal format is PF_A8B8G8R8,32x32x1.
22:34:44: Font TrebuchetMSBoldusing texture size 512x512
22:34:44: Info: Freetype returned null for character 160 in font TrebuchetMSBold
22:34:44: Texture: TrebuchetMSBoldTexture: Loading 1 faces(PF_BYTE_LA,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,512x512x1.
22:34:44: Texture: ogretext.png: Loading 1 faces(PF_A8B8G8R8,256x128x1) with 0 generated mipmaps from Image. Internal format is PF_A8B8G8R8,256x128x1.
22:34:44: Parsing script OgreLoadingPanel.overlay
22:34:44: Finished parsing scripts for resource group Bootstrap
22:34:44: Parsing scripts for resource group General
22:34:44: Parsing script Examples.program
22:34:44: Parsing script Example-DynTex.material
22:34:44: Parsing script Example-Water.material
22:34:44: Parsing script Example.material
22:34:45: Parsing script Examples-Advanced.material
22:34:45: Parsing script OffsetMapping.material
22:34:45: Parsing script Ogre.material
22:34:45: Parsing script RZR-002.material
22:34:45: Parsing script smoke.material
22:34:45: Finished parsing scripts for resource group General
22:34:45: Parsing scripts for resource group PLSM2
22:34:45: Parsing script DecompressSplat.program
22:34:45: Parsing script DecompressVertex.program
22:34:45: Parsing script Splat.program
22:34:45: Parsing script BaseTexture.material
22:34:45: Parsing script PagingLandScape.material
22:34:45: Parsing script PagingLandScapeTemplate.material
22:34:45: Parsing script Splatting.material
22:34:45: Parsing script Splatting2.material
22:34:45: Parsing script Splatting3.material
22:34:45: Parsing script Splatting4.material
22:34:45: Parsing script Splatting5.material
22:34:45: Parsing script Splatting6.material
22:34:45: Parsing script Splatting7.material
22:34:45: Parsing script PagingLandScape2.overlay
22:34:45: Finished parsing scripts for resource group PLSM2
22:34:45: Texture: flare.png: Loading 1 faces(PF_B8G8R8,256x256x1) with 5 generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
22:34:45: Win32Input8: DirectInput Activation Starts
22:34:45: Win32Input8: Establishing keyboard input.
22:34:45: Win32Input8: Keyboard input established.
22:34:45: Win32Input8: Establishing mouse input.
22:34:45: Win32Input8: Mouse input established.
22:34:45: Win32Input8: DirectInput OK.
22:34:45: Texture: cursor.png: Loading 1 faces(PF_A8B8G8R8,32x32x1) with 0 generated mipmaps from Image. Internal format is PF_A8B8G8R8,32x32x1.
22:34:45: Win32Input8: Establishing keyboard input.
22:34:45: Win32Input8: Keyboard input established.
22:34:45: Win32Input8: Initializing mouse input in immediate mode.
22:34:45: Win32Input8: Mouse input in immediate mode initialized.
22:34:45: Texture: spot_shadow_fade.png: Loading 1 faces(PF_B8G8R8,128x128x1) with 5 generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
22:34:52: *-*-* OGRE Shutdown
22:34:52: Unregistering ResourceManager for type Font
22:34:52: Unregistering ResourceManager for type Skeleton
22:34:52: Unregistering ResourceManager for type Mesh
22:34:52: Unregistering ResourceManager for type HighLevelGpuProgram
22:34:52: Unloading library .\Plugin_PagingLandScapeSceneManager2
22:34:52: Unloading library .\Plugin_CgProgramManager
22:34:52: *** Stopping Win32GL Subsystem ***
22:34:52: Unloading library .\RenderSystem_GL
22:34:52: Render Target 'OGRE Render Window' Average FPS: 444.22 Best FPS: 445.554 Worst FPS: 413.174
22:34:52: D3D9 : Shutting down cleanly.
22:34:52: Unregistering ResourceManager for type Texture
22:34:52: Unregistering ResourceManager for type GpuProgram
22:34:52: D3D9 : Direct3D9 Rendering SubSystem destroyed.
22:34:52: Unloading library .\RenderSystem_Direct3D9
22:34:52: Unregistering ResourceManager for type Material
22:34:52: Unloading library OgrePlatform.dll

tuan kuranes

24-10-2005 21:57:46

using Release or Debug ?
using Debug should give more info on splitting process, but release should at least show a dos window printing the two pn names ?

tuan kuranes

24-10-2005 21:58:27

maptools.cfg does point to kapula.gen ?

tuan kuranes

24-10-2005 22:00:51

maptool.cfg

DefaultMap=kapula

kapula=kapula.gen

# resource group name
GroupName=PLSM2

#do you want to run it on all maps listed here
BatchMode=no

tourix

24-10-2005 22:10:52

yes it's exactly what I have.

and paginglandscape2.cfg



DefaultMap=Kapula1

Kapula1=kapula

# resource group name where to find map definition
GroupName=PLSM2


I tried with the plsm2 binaries that were on your web page.


But what I really don't understand is that there is no problem with the sample maps. I don't get why my map isn't splitted

Jon

25-10-2005 00:47:13

How about adding an OutDirectory directive to the .gen.cfg file you created for the unsplit map, similar to:


OutDirectory=/ogrenew/Samples/Media/paginglandscape/LandScapeFileName


Is mapsplitter exiting immediately, or does it take some time to run?

tourix

25-10-2005 13:44:56

unfortunately, i tried to change the outdirectory url doesn't solve the probleme.

MapSplitter take some time to run after
Added resource location 'Media/kapula' of type 'FileSystem' to resource group 'PLSM2'

it runs several seconds then it quits

tuan kuranes

25-10-2005 13:58:35

no output in the DOS box ?

tourix

25-10-2005 15:52:52

nop, just the underscore "_" blinking

tuan kuranes

25-10-2005 16:01:27

Not even the equivalent content of Mapsplitter.log ?
(should be.)

tourix

25-10-2005 16:44:02

nothing :/

If you take my configs files, do you have the same problems? (of course i don't think of changing the heightmap's name)

tuan kuranes

25-10-2005 17:03:06

Ok. reproduced the bug. do you have the kapula.png and texture just copied in the mapsplitter directory.

tuan kuranes

25-10-2005 17:14:44

"paged" => "Paged"
... OgreConfig object that handle config file is case sensitive...

tuan kuranes

25-10-2005 17:21:30

and if Media subdirectory doesn't exists it won't create it.
It creates only the last subdirectory (the LandScapeFilename one.)

tourix

25-10-2005 17:47:21

:oops: such a stupid error. Thank you very much, I can now split the map and the texture without any problem :)

But I encounter another error now:


Error #: 4
Function: PagingLandScapePage::load
Description: Error: Invalid Tile: Make sure the default TileManager size is set to WorldWidth * WorldHeight * 4. Try increasing MaxNumTiles in the configuration file..
File: \gl\Api\cvs\OgreHead\ogre\PlugIns\PagingLandScape2\src\OgrePagingLandScapePage.cpp


Does it mean that I did something wrong or that I MUST precise the MaxNumTiles option?

My config files:

kapula.cfg

#----------------------------------------------------------------------------------------
# Fichier runtime de Kapula avec PLSM2
#----------------------------------------------------------------------------------------

#----------------------------------------------------------------------------------------
# Common option - Map definition
#----------------------------------------------------------------------------------------

GroupName=PLSM2
LandScapeFileName=kapula
LandScapeExtension=png
LandScapeExportExtension=png
TextureExtension=png
paged=yes
ScaleX=61
ScaleY=11
ScaleZ=61
PageSize=513
TileSize=65

#----------------------------------------------------------------------------------------
# Paging Option
#----------------------------------------------------------------------------------------

Width=8
Height=8

#----------------------------------------------------------------------------------------
# Datasource
#----------------------------------------------------------------------------------------
Data2DFormat=HeightField

#----------------------------------------------------------------------------------------
# Texturing
#----------------------------------------------------------------------------------------
TextureFormat=Image
ImageFilename=kapula_texture


kapula.gen.cfg


#----------------------------------------------------------------------------------------
# Fichier de génération de Kapula avec PLSM2
#----------------------------------------------------------------------------------------


#----------------------------------------------------------------------------------------
# Common option - Map definition
#----------------------------------------------------------------------------------------

GroupName=PLSM2
LandScapeFileName=kapula
LandScapeExtension=png
LandScapeExportExtension=png
TextureExtension=png
Paged=yes
ScaleX=1
ScaleY=1
ScaleZ=1
PageSize=513
TileSize=65

#----------------------------------------------------------------------------------------
# Heightmap definition
#----------------------------------------------------------------------------------------
OutDirectory=Media/LandScapeFileName

#----------------------------------------------------------------------------------------
# Datasource
#----------------------------------------------------------------------------------------
Data2DFormat=HeightField

#----------------------------------------------------------------------------------------
# Texturing
#----------------------------------------------------------------------------------------
ColorMapName=kapula_texture.png
ColorMapSplit=yes
#LitColorMapSplit=no

#----------------------------------------------------------------------------------------
# Heightmaps
#----------------------------------------------------------------------------------------
HeightMap=yes


thanks a lot

tuan kuranes

26-10-2005 10:44:29

the cfg woks here.