well he is a basic function i use ( it can/will be improved
Function createroadface(mesh,p1.VEC3,p2.VEC3,p3.VEC3,p4.VEC3)
brush = LoadBrush(CurrentDir$() + "Data\profiles\road.bmp",49)
surface = CreateSurface(mesh,brush)
AddVertex surface,p1\x,p1\y,p1\z,1,1
AddVertex surface,p2\x,p2\y,p2\z,0,1
AddVertex surface,p3\x,p3\y,p3\z,0,0
AddVertex surface,p4\x,p4\y,p4\z,1,0
AddTriangle surface,2,1,0
AddTriangle surface,3,2,0
FreeBrush brush
End Function
i pass it 4 vectors , and then add to triangle to make a road section , create lots ..gives you a road.
Matt
Function createroadface(mesh,p1.VEC3,p2.VEC3,p3.VEC3,p4.VEC3)
brush = LoadBrush(CurrentDir$() + "Data\profiles\road.bmp",49)
surface = CreateSurface(mesh,brush)
AddVertex surface,p1\x,p1\y,p1\z,1,1
AddVertex surface,p2\x,p2\y,p2\z,0,1
AddVertex surface,p3\x,p3\y,p3\z,0,0
AddVertex surface,p4\x,p4\y,p4\z,1,0
AddTriangle surface,2,1,0
AddTriangle surface,3,2,0
FreeBrush brush
End Function
i pass it 4 vectors , and then add to triangle to make a road section , create lots ..gives you a road.
Matt