* DELETED *
I got everything to work except for one problem, have a look at these screenshots and tell me how could this be happening? Theres not supposed to be any grass on the lower areas, but there is. I've noticed that it is when viewing the surface from a certain angle. When you walk closer, the grass dissapears!




I am editing a tga file skin on each of the terrains with this code below, and without the edit my effect works perfect, so I doubt that it could be my effect. Has it got something to do with my alpha value or the color vector? Please help?
temp1.x=0;
temp1.y=0;
x=0;
y=0;
a=0;
b=0;
temp2=0;
while(b<5)
{
while(a<5)
{
you=terrain_ent[temp2];
canvas=bmap_for_entity(you,0);
format = bmap_lock(canvas,0);
y=0;
x=0;
while(y<80)
{
while(x<80)
{
temp1.z=heightmap[((x+(a*79))*400)+(y+(b*79))];
vec_to_mesh(temp1.x,you,(x+1)+(y*80));
temp3=(100/500)*heightmap[((x+(a*79))*400)+(y+(b*79))];
if(heightmap[((x+(a*79))*400)+(y+(b*79))]<15)
{
temp=100;
}
else
{
temp=temp3;
}
pixel = pixel_for_vec(vector(temp3,temp3,temp3),clamp(temp,0,100),format);
pixel_to_bmap(canvas,x,y,pixel);
x+=1;
}
x=0;
y+=1;
}
bmap_unlock(canvas);
a+=1;
temp2+=1;
}
a=0;
b+=1;
}