Hi Hangar18, how's the space sim going?
In the case of the sands bitmap, it looks to me that there were three original 64x64 textures. A seamless sandy texture, maybe a dark brown square texture, and a seamless pavement texture. The first 12 textures are the sandy texture alpha-blended with the brown texture 12 different grades. The pavement lookes like an alpha-blend of pavement with the sandy texture to 4 different grades with the last 1 (image 16) altered a bit with some black for scorching I think.
Here's an example just creating 16 shades from 2 textures:
rem quick alpha blend example
rem by latch
rem 11/24/2008
set display mode 800,600,32
sync on
sync rate 60
dim img1(63,63)
dim img2(63,63)
ink RGB(128,64,0),0
box 0,0,63,63
get image 1,0,0,64,64
sync
for x=0 to 63
for y=0 to 63
img1(x,y)=RGB(128,64,0)
next y
next x
cls rgb(192,192,192)
ink 255,0
box 31,0,32,63
box 0,31,63,32
get image 2,0,0,64,64
sync
cls 0
make memblock from image 2,2
for y=0 to 63
for x=0 to 63
pos=12+((x+(y*64))*4)
img2(x,y)=memblock dword(2,pos)
next x
next y
ink rgb(255,255,255),0
text 0,0,"Original images 1 and 2:"
paste image 1,0,50
paste image 2,100,50
text 0,160,"Blended images :"
alpha#=1.0625
for down=0 to 3
for across=0 to 3
dec alpha#,.063
for x=0 to 63
for y=0 to 63
c=alpha_blend(img2(x,y),img1(x,y),alpha#)
ink c,0
dot x+(across*64),y+(down*64)+180
next y
next x
next across
next down
sync
end
function alpha_blend(color1,color2,alpha#)
rem by latch
rem 08/22/07
invalpha#=1-alpha#
r1=rgbr(color1)*alpha#
g1=rgbg(color1)*alpha#
b1=rgbb(color1)*alpha#
r2=rgbr(color2)*invalpha#
g2=rgbg(color2)*invalpha#
b2=rgbb(color2)*invalpha#
newcolor=rgb(r1+r2,g1+g2,b1+b2)
endfunction newcolor
Also check out :
Texture Blending
Enjoy your day.