two simple ways to do this, and technically both are the same
first setup a virtual grid array like so, this will give you 1024 points XYZ ... you'll have to uniform thier scale so i'd suggest each point = 10DBU and you can calculate an interpol from that
dim ptrGround(1024,1024)
accuracy = 10
now the next task is relatively simply IF you have DarkMatter, if not it'll take a bloody long time and require you to know the 3DS header
open to read "ground.3ds",1
make memblock from file 1,1
close file 1
now we have what we need from the 3DS and all the points are here as vertex... but we need to sort them out first unless you want to deal with multiple vertex points.
so make a temp array to store the vertex prior to sorting
vVertCount = memblock dword(1,0)
dim Buffer(vVertCount,3)
and we then make a second array the same size but this time for the compressed point
dim Compress(vVertCount,3)
position = 32
for index = 0 to vVertCount-1
Buffer(index,0) = memblock float(1,position) : inc position,4
Buffer(index,1) = memblock float(1,position) : inc position,4
Buffer(index,2) = memblock float(1,position) : inc position,4
next index
now we've populated the Buffer we can sort them out and check them against each other for duplicates.
position = 0
for indexA = 0 to vVertCount-1
for indexB = 0 to vVertCount-1
if Buffer(indexA,0) = Compress(indexB,0)
else
Compress(Position,0) = Buffer(indexB,0)
inc Position
endif
if Buffer(indexA,1) = Compress(indexB,1)
else
Compress(Position,1) = Buffer(indexB,1)
inc Position
endif
if Buffer(indexA,2) = Compress(indexB,2)
else
Compress(Position,2) = Buffer(indexB,2)
inc Position
endif
next indexB
next indexA
finally we clear the Buffer so we can reinitlize it to hold ONLY active data and not the now reserved spaces.
undim Buffer(vVertCount,3)
for index = 0 to vVertCount-1
if Compress(index,0) = 0 and bIndex = 0
bIndex = 1
vTotal = index
else
bIndex = 0
endif
next index
dim Buffer(vTotal,3)
for indexA = 0 to vTotal-1
for indexB = 0 to 2
Buffer(indexA,indexB) = Compress(indexA,indexB)
next indexB
next indexA
undim Compress(vVertCount,3)
finally we use the buffer to populate the ground pointer
for index = 0 to vTotal-1
fX# = Buffer(index,0)/accuracy
fY# = Buffer(index,1)/accuracy
fZ# = Buffer(index,2)/accuracy
ptrGround(int(fX#),int(fZ#)) = fY#
next index
undim Buffer(vTotal,3)
now if you need a value simple do search based upon the position of the character over the ptrGround() array

yeah effectively the Get Ground Height Routine but can be interpoled correctly to also give accurate Collision Data

If you need to setup Collision Boxes then you can use a similer effect and just compile the array information prior using Booleans for if a character will collide of not ... i'm sure i could explain that too if you need it to be, the actual collision can then be Angluar or Standard Based on the boolean callback.
Hope that all helps and actually makes sense... if you need the header for 3DS try
http://www.wotsit.org
Anata aru kowagaru no watashi! 