AHHHHHHHHHH!!! I took the more direct approach ofslicing the segments down from 1024 to 64 (divided the matrices into 16 smaller matrices) which in turn gave me 226 matrices multipled into 16... that's 3616 matrices sized out to 1024,1024,64,64... IT'S STILL SAYING ILLEGAL MATRIX SIZE AT LINE ####. Here's some code, maybe someone can help me with this one (Load a 1024x1024 Geoscape3d file):
filename$ = "gdb\moon1024\moon1024.gdb"
dir$="gdb\moon1024\"
REM Open the main file to find the files to load.
open to read 2 , filename$
REM Number of db units wide the overall heightmap is.
global pixelsX# = 0
global pixelsZ# = 0
global matrixNumber2 = 0
REM Read the total size in db units of x and z.
read float 2 , pixelsZ#:pixelsX$=str$(pixelsZ#):print pixelsZ$
read float 2 , pixelsX#:pixelsX$=str$(pixelsX#):print pixelsX$
REM Number in the X by Z grid of matrices.
ZMatrices = 0
XMatrices = 0
read long 2 , ZMatrices:ZMatrices$=str$(ZMatrices):print ZMatrices$
read long 2 , XMatrices:XMatrices$=str$(XMatrices):print XMatrices$
REM Store a count so we can assign a unique matrix number.
count = 1
REM Load all the matrices in the exported grid.
for z = 0 to ZMatrices-1
lastZ# = 0
for x = 0 to XMatrices-1
read string 2, dbmName$
read string 2, bmpName$
lastZ = LoadMatrix( count, dbmName$, bmpName$, XMatrices, dir$ )
count = count + 1
next x
posX# = 0
posZ# = posZ# - lastZ#
next z
close file 2
do
control camera using arrowkeys 0,1,1
loop
function LoadMatrix( matrixNumber, sand1$, textureName$, tiles, dir$ )
matrixNumber2=matrixNumber2+matrixNumber
`read the matrix file
open to read 1 , dir$+sand1$
`get the x and z tile values
dimx = 0
dimz = 0
read long 1 , dimx
read long 1 , dimz
dimxzdiv=dimx/64
`get the db units x and z values
sizeX# = 0
sizeZ# = 0
read float 1 , sizeX#
read float 1 , sizeZ#
sizeX=int(sizeX#)
sizeZ=int(sizeZ#)
`Divide and create matrices
for a=0 to dimxzdiv
make matrix matrixNumber2+a, sizeX, sizeZ, 64 , 64
position matrix matrixNumber2, posX#+(a*64) , 0 , posZ#+(a*64)
`matrixNumber2=matrixNumber2+1
next a
posX# = posX# + sizeX#
posZ# = posZ# + sizeZ#
`read in the height data and apply it to divided matrix
for a=dimxzdiv to 0 step -1
for z = dimxzdiv to 0 step -1
for x = dimxzdiv to 0 step -1
read float 1 , ht#
set matrix height matrixNumber2+a ,x , z, ht#*dimxzdiv
next x
next z
next a
close file 1
`sort out the texture
`load image dir$+textureName$,matrixNumber,0
`prepare matrix texture matrixNumber,matrixNumber, dimx, dimz
in=1
`for z=dimz-1 to 0 step -1
`for x=0 to dimx-1
`set matrix tile matrixNumber2,x,z,in
`in = in + 1
`next x
`next z
`set matrix texture matrixNumber, 2, 0
for a=dimxzdiv to 0 step -1
update matrix matrixNumber2+a
next a
endfunction sizeZ
My many thanks to anyone who can help me with this one.
There's no place like 127.0.0.1