That code is actually over complicated for me since i don't understand the basics behind memblocks. What is in the bytes were reading? how many bytes represent a pixel, are the colors included in this byte if so how do we grab them separately.
your code is reading from grey scale and grabbing no color data as far as i can tell
your code
TM$="YOUR DETAIL MAP PATH":HM$="YOUR HEIGHTMAP PATH":backdrop on:sync on:sync rate 25:color backdrop rgb(0,100,200)
Scale=20:Hscale#=Scale:Land=1:HM=2:load image TM$,Land,1:load image HM$,HM,1
imageW=image width(HM):imageH=image height(HM):make matrix 1,imageW*scale,imageH*scale,imageW,imageH:prepare matrix texture Land,Land,imageW,imageH
make memblock from image Land,HM:MemCount=get memblock size(Land)-3:Tx=imageW-1
for TL=(imageW*imageH) to 1 step -1
r=memblock byte(Land,MemCount+2)
g=memblock byte(Land,MemCount+1)
b=memblock byte(Land,MemCount)
Height#=(r*Hscale#+(g*(Hscale#*2))+(b*Hscale#*4))*.01:dec MemCount,4
set matrix tile Land,Tx,Tz,TL:set matrix height Land,Tx,Tz,Height#
if Tx=imageW-1 then set matrix height Land,Tx+1,Tz,Height#
If Tz=imageH-1 then set matrix height Land,Tx,Tz+1,Height#
dec Tx:if Tx<0 then inc Tz:Tx=imageW-1
NEXT
update matrix 1:set camera range 1,Scale*1000
do
control camera using arrowkeys 0,10,4:x#=camera position x():z#=camera position z()
position camera x#,(get ground height(Land,x#,z#))+(Scale*3),z#
sync
LOOP
the tear down of your code
bitmap$="bitmap path"
Hscale#=Scale
make memblock from image 1,bitmap
`memblock number and image number
MemCount=get memblock size(1)-3
`memcount = amount of bytes in file minus 3 for width height and depth for memblock header
Tx=image width(bitmap)-1
`unknown -1
for TL=(image width(bitmap)*image height(bitmap)) to 1 step -1
`multiply width* height
r=memblock byte(1,MemCount+2)
`get first byte +2 because memblock is +3 grabbing r or "height?"
g=memblock byte(1,MemCount+1)
`get first byte +1 because memblock is +3 grabbing g or "depth?"
b=memblock byte(1,MemCount)
`grabbing first visual image byte?
what do we do with this date and how do we get color? super beginner with memory handling mate
A child's dream never dies.