Automatic terrain texturer

Blitz3D Forums/Blitz3D Programming/Automatic terrain texturer

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

pretty easy to do .

;ok get slope values
;0=flat and 1=Wall
Slopeval#=Abs(VertexNX(S,v))+Abs(VertexNZ(S,v))/2

if your using blitz terain youll need to go around it
doing linepicks and then using pickednx and pickednz
instead of vertexnx/vertexnz.

of coarse you can do it as easily with heightmaps using
color differences from selected pixel and surroundings to
determine slope.

so now all you need to do is assign a color for slope ranges. so IF you wanted whatever color to be drawn if the slope was a 10% to 30% grade.
IF SLOPEVAL#=>.1 AND SLOPEVAL#=<.3 THEN color whatever