Config file help

leep

20-09-2006 00:23:46

I've been working with this particular problem for over a week now and have very little hair left to pull out (:wink:). I have a simple PLSM2 project that used to use the landscape scene manager with a raw heightmap file and a png WorldTexture file. I ran mapsplitter to get map1_hf.#.#.png and map1_tx.#.#.png files. They are in the media\paginglandscape2\terrains\map1_hf\ folder. In the terrains folder is my map1.cfg file

map1.cfg:
GroupName=PLSM2

LandScapeFileName=map1_hf
LandScapeExtension=png
FileSystem=LandScapeFileName
Data2DFormat=HeightField

Width=2
Height=2

NumTextureFormatSupported=1
TextureFormatSupported0=map1_tx


It's hitting an exception in the call to SetWorldGeometry: !material.isNull() && String(matClassName + "Must exists in the" + opt->groupName + "group").c_str () in OgrePagingLandScapeTexture.cpp on line 310. I can't figure out the config file and what I need to put in it to get it to load my map1_tx.#.#.png texture image across my landscape the way I did using the landscape scene manager (WorldTexture=map1_tx.png).

Any help would be greatly appreciated. Thanks! :D

PatrickB3

20-09-2006 19:55:01

TextureFormatSupported0=map1_tx

Looks like your problem. You set TextureFormatSupported0 to the texture name. It wants the name of the material to use.

leep

20-09-2006 20:15:50

That's what I was figuring was the problem. But for now I just want to know how to tell it the name of the texture file. I haven't learned anything about how to create material files yet. Once I get this up and running that will probably be next on my agenda. :)

So what options do I use in my map1.cfg in order to get PLSM2 to use my map1_tx.#.#.png texture files to cover the landscape? Or do I *HAVE* to create a .material file that references my map1_tx.#.#.png files and reference that material in map1.cfg?

Thanks a million for you help! :D

tuan kuranes

21-09-2006 09:36:38

Please be sure to read wiki, default config files in media/paginglandscape/terrains and example materials shipped with plsm2.

If you want to have a texture per page :

NumTextureFormatSupported=1
TextureFormatSupported0=ImagePaging
TextureFormat=ImagePaging
ImageFilename=mytexturename
TextureExtension=png


you must provide each mytexturename.X.Z.png file where X and Z are page possible page numbers.

leep

21-09-2006 14:25:54

tuan kuranes,

Thanks for the point in the right direction! :) I did read the wiki pages on PLSM2 (including the page on config files) multiple times (more than one multiple-times even! :wink: ), however I'll admit I hadn't looked over the config files that come with plsm2 closely enough (especialy didn't notice template.default.cfg). To my own defense I must say that the wiki page (http://www.ogre3d.org/wiki/index.php/Paging_Scene_Manager_config_files) does not mention the ImageFilename option at all, and no reference is made to a ImagePaging value for the TextureFormat option (although several references to TextureFormat=Image are made in comments about some of the Map Splitter config options).

you must provide each mytexturename.X.Z.png file where X and Z are page possible page numbers.
Are you saying I have to "provide each file" as in make sure the actual files are available, or are you saying I have to specify the filename of each file in the config? If the latter, do I just include ImageFilename multiple times, as in

ImageFilename=map1_tx.0.0
ImageFilename=map1_tx.0.1
ImageFilename=map1_tx.1.0
ImageFilename=map1_tx.1.1

? Or do I just specifiy the base name once as in

ImageFilename=map1_tx

I'll play around with it later when I can (gotta do that "work" thing now). Thanks again for the point in the right direction!

tuan kuranes

21-09-2006 14:32:46

I'll have to find some time for update the wiki... sorry.
"provide each file" as in make sure the actual files are available, so once only.