I'm a bit stuck at the moment. I'm trying to make my parser work for terrains with bigger sizes. I tried with a 1000*1000 one and those results where a disaster. I went through it debugging at the moment the layers get parsed. More in specific when I read the first layer. So now at max the first UInt32 read is 24576. Then after all those triangles get read instead of the count for number of texture layers that follow you get another 24576. I presume another set of background layer triangles. Now fine, but there is nowhere a read for how many iterations of blocks of 24576 size so how do I know when the next UInt32 will be the read of how many texture layers ?

edit:

ALmost thought I had it

uint n = (UInt32) Math.Ceiling((width * height) / 24576.0);

This works for 180*180 but not for 1000*1000 ... so back to square one grrrrrrrr frustrating

Last edited by Celludriel; 27/07/14 10:25 AM.