Well for starters your ignoring the normals which you set in 3ds max completely by calling updatenormals() after loading. Even after removal you still get the issue though so your normals are wrong at the edges .. looks like they are averaged as per Blitz's updatenormals() command.
This works better but it looks like you're texture uv's are off .. hence the black lines on the distant tiles.
;Pyro Working title. and test code
; loading the level segments into a screen resolution
Graphics3D 800,600,16,2
SetBuffer BackBuffer()
Global Ship=LoadMesh("test/Ship.3ds")
Global green_skin=LoadTexture("test/Ship.png")
EntityTexture Ship,green_skin
;Global Levela=LoadMesh("test/Beach001.3ds")
Global Levela=MESHunweld( LoadMesh("test/Beach001.3ds") )
MESHnormals( Levela )
HideEntity levela
Dim lev(20)
For looper=0 To 19
lev(looper)=CopyEntity(levela)
PositionEntity lev(looper),0,0,looper * MeshDepth( Levela )
EntityFX lev(looper),1
Next
;ScaleEntity level,.02,.02,.02
Global game_cam=CreateCamera()
PositionEntity game_cam,0,1500,-1000
RotateEntity game_cam,90,0,0
CameraRange game_cam,1000,6000
PointEntity game_cam,ship
Global light=CreateLight(1)
PositionEntity light,0,-2000,0
While Not KeyDown(1)
UpdateWorld()
RenderWorld()
Flip
Wend
;by Stevie G
Function MESHnormals( mesh )
For l = 1 To CountSurfaces(mesh )
s = GetSurface( mesh , l )
;calculate normals for flatshading
For t = 0 To CountTriangles( s )-1
v0 = TriangleVertex( s, t, 0 )
v1 = TriangleVertex( s, t, 1 )
v2 = TriangleVertex( s, t, 2 )
ax# = VertexX( s, v1 ) - VertexX( s, v0 )
ay# = VertexY( s, v1 ) - VertexY( s, v0 )
az# = VertexZ( s, v1 ) - VertexZ( s, v0 )
bx# = VertexX( s, v2 ) - VertexX( s, v1 )
by# = VertexY( s, v2 ) - VertexY( s, v1 )
bz# = VertexZ( s, v2 ) - VertexZ( s, v1 )
Nx# = ( ay * bz ) - ( az * by )
Ny# = ( az * bx ) - ( ax * bz )
Nz# = ( ax * by ) - ( ay * bx )
Ns# = Sqr( Nx * Nx + Ny*Ny + Nz*Nz )
Nx = Nx / Ns
Ny = Ny / Ns
Nz = Nz / Ns
For v = v0 To v2
VertexNormal s, v, Nx, Ny, Nz
Next
Next
Next
End Function
Function MESHunweld( Mesh )
Copy = CreateMesh()
For su = 1 To CountSurfaces( Mesh )
s = GetSurface( Mesh , su )
ns = CreateSurface( Copy )
For t = 0 To CountTriangles( s ) - 1
v0 = TriangleVertex( s, t, 0 )
v1 = TriangleVertex( s, t, 1 )
v2 = TriangleVertex( s, t, 2 )
Nv0 = AddVertex( ns , VertexX( s , v0 ) , VertexY( s, v0 ) , VertexZ( s, v0 ) )
Nv1 = AddVertex( ns , VertexX( s , v1 ) , VertexY( s, v1 ) , VertexZ( s, v1 ) )
Nv2 = AddVertex( ns , VertexX( s , v2 ) , VertexY( s, v2 ) , VertexZ( s, v2 ) )
VertexTexCoords ns, nv0, VertexU(s, v0), VertexV(s, v0), VertexW(s, v0)
VertexTexCoords ns, nv1, VertexU(s, v1), VertexV(s, v1), VertexW(s, v1)
VertexTexCoords ns, nv2, VertexU(s, v2), VertexV(s, v2), VertexW(s, v2)
AddTriangle ns , Nv0 , Nv1 , Nv2
Next
ClearSurface s
For t = 0 To CountTriangles( ns ) - 1
v0 = TriangleVertex( ns, t, 0 )
v1 = TriangleVertex( ns, t, 1 )
v2 = TriangleVertex( ns, t, 2 )
Nv0 = AddVertex( s , VertexX( ns , v0 ) , VertexY( ns, v0 ) , VertexZ( ns, v0 ) )
Nv1 = AddVertex( s , VertexX( ns , v1 ) , VertexY( ns, v1 ) , VertexZ( ns, v1 ) )
Nv2 = AddVertex( s , VertexX( ns , v2 ) , VertexY( ns, v2 ) , VertexZ( ns, v2 ) )
VertexTexCoords s, nv0, VertexU(ns, v0), VertexV(ns, v0), VertexW(ns, v0)
VertexTexCoords s, nv1, VertexU(ns, v1), VertexV(ns, v1), VertexW(ns, v1)
VertexTexCoords s, nv2, VertexU(ns, v2), VertexV(ns, v2), VertexW(ns, v2)
AddTriangle s , Nv0 , Nv1 , Nv2
Next
Next
FreeEntity Copy
Return Mesh
End Function