its my own code, its in the codebase aswell but here it is, a nice easy function
Function Smooth_Matrix(MatNum,TileX,TileZ,Times)
For Multiple=1 to Times
For X=1 to TileX-1
For Z=1 to TileZ-1
A=Get Matrix Height(MatNum,X-1,Z+1)
B=Get Matrix Height(MatNum,X,Z+1)
C=Get Matrix Height(MatNum,X+1,Z+1)
D=Get Matrix Height(MatNum,X+1,Z)
E=Get Matrix Height(MatNum,X+1,Z-1)
F=Get Matrix Height(MatNum,X,Z-1)
G=Get Matrix Height(MatNum,X-1,Z-1)
H=Get Matrix Height(MatNum,X-1,Z)
Total=A+B+C+D+E+G+G+H
Av#=Total/8
Set Matrix Height MatNum,X,Z,Av#
Next Z
Next X
Next Multiple
For X=0 to Tilex
Set Matrix Height MatNum,X,0,Get Matrix Height(MatNum,X,1)
Next X
For X=0 to TileX
Set Matrix Height MatNum,X,TileZ,Get Matrix Height(Matnum,X,TileZ-1)
Next X
For Z=0 to TileZ
Set Matrix Height MatNum,0,Z,Get Matrix Height(MatNum,1,Z)
Next Z
For Z=0 to TileZ
Set Matrix Height MatNum,TileX,Z,Get Matrix Height(MatNum,TileX-1,Z)
Next Z
Update Matrix MatNum
EndFunction
stick that at the bottom of your program and call it like:
Smooth_Matrix(1,100,100,1)
That would smooth a 100tile*100tile matrix once.
Update
Texturing practically finished, only thing bugging me is blending
does anyone have any code(preferably a function
) that blends all the tiles on a matrix into eachother? That would be amazing, otherwise i fear i'm going to have to do it myself
and that could take a while.
One other point, i think im gonna make object placement a separate program, this means not only can you place objects on matrices made in MapTrix but also on other matrices/.x models etc. This makes it more flexible aswell.
In the beginning, the universe was created...
This made alot of people very angry and it has been widely regarded as a bad idea...
Visit
http://redeye.dbspot.com