Trouble Getting PLSM2 Working

Rodif

02-12-2005 19:32:48

I've been messing around trying to get this manager working. I currently have the latest (HEAD) for ogre and plsm2. I followed the instructions and everything compiled fine. I'm having trouble getting the demo to run.

Like the instructions said i copied over all of the directories.

The first problem i ran into was the code was trying to load the textures as PNG and the textures were in JPG. I tought i saw a config option to switch this but i just converted them to png.

Then some of the .material files were duplicated in the Media directory and in the Media/paginglandscape2. So after removing them the demo finally loaded.

So thats basically where i am at, the demo starts and shows a blue screen with a white dot in the middle and there are no errors in the log.

While going thru the forums i saw a screenshot someone posted that looked exactly what im seeing but i cant seem to find the post anymore.

Ideas?

Jon

03-12-2005 16:22:35

What did you see in Ogre.log?

tuan kuranes

03-12-2005 18:19:16

and did you run mapsplitter ?

Rodif

05-12-2005 19:30:18

No i didnt run it, sorry i didnt know i needed to... I compiled and started learning how it works. So I got it running (it was missing some files but i got them from the binary distribution).

But now I am getting an assert:

Creating resource group General
Registering ResourceManager for type Material
[...]
'../../../../Samples/Media/paginglandscape2/terrains/gca
nyon_height_4k2k' of type 'FileSystem' to resource group 'PLSM2'
Width : 2049 Height : 2049 Bpp : 3
ps_texture_1k..png
created : ps_texture_1k.0.0.png
created : ps_texture_1k.0.1.png
created : ps_texture_1k.1.0.png
created : ps_texture_1k.1.1.png
Assertion failed: Heightdata[i] * divider <= 65535, file \projects\ogrenew\Tools
\MapSplitter\src\MapSplitter.cpp, line 167

tuan kuranes

05-12-2005 20:25:11

make sure you use the .gen.cfg files coming from CVS and not those coming from the datasrc.zip

Rodif

05-12-2005 22:08:08

Okay i did have 2 copies of the .gen.cfg files so i wasnt sure what ones were being loaded. So i deleted the ones from the binary distribution but I got the same effect.

I started debugging the code and came up with this

const double divider = (1.0 / MapUtil::getSingleton().getMaxTheoHeight()) * 65535;
for (uint i = 0; i < size; i++ )
{
assert (Heightdata[i] * divider <= 65535);
[...]
}


it crashes when i == 44. MaxTheoHeight == 1 and Heightdata == 20.9. Now i dont know exactly what this method does so i cant take it any futher. But the Heightdata of 20.9 was really high compared to the other values it was when it was going thru this loop.

tuan kuranes

06-12-2005 13:22:00

yes, it's a bug corrected in CVS.
Should make its way in the SDK I should manager to distribute any time soon.
(another bug is waiting a fix.)