Automatic terrain texturer

Blitz3D Forums/Blitz3D Programming/Automatic terrain texturer

Picklesworth(Posted 2005) [#1]
For my next side-project, I may create an automatic terrain map texturer similar to that used in Terragen, except specialized for games. The key feature is using the slope of a hillside to decide what kind of colouring the ground will have, as well as modifying other maps (ie: Foliage maps). OTher features would follow as I needed them.
Has this already been done, or is it worth doing?


big10p(Posted 2005) [#2]
If you would find it useful, then it's worth doing. :)


Picklesworth(Posted 2005) [#3]
Yes, sure it would be worth doing because I would find it useful :)
My question is: Has that already been done and released as free software which would render mine meaningless?


RifRaf(Posted 2005) [#4]
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



Erroneouss(Posted 2005) [#5]
Its been done wait for linky.

EDIT: http://www.blitzbasic.com/codearcs/codearcs.php?code=1094
Like that?


Rob Farley(Posted 2005) [#6]
Something like this?

Not free though.


RifRaf(Posted 2005) [#7]
well the very simple method i posted above can acheive things like this.. and this is a shot from in blitz.




Picklesworth(Posted 2005) [#8]
Very good, thanks :)
That's exactly what I was looking for. Now I just need to toy with it a bit! (Like, if one small flat area is surrounded by rocky areas, it will still be rocky... and height stuff)

Yes, I know it's very simple; that's why it's a side project :)


Oh, and RifRaf, did you do that just now? Those textures look pretty nice


_PJ_(Posted 2005) [#9]
I NEED something like this, because I seem to be completely unable to get multitextured terrains or anything looking half-decent. So yeah, I need this!


ImaginaryHuman(Posted 2005) [#10]
Look neat. One thing I personally notice with fractal landscape programs is they tend to rely too much on this idea of changing the color/texture based on the slope of the land but if you look carefully at real land with slopes this is not the rules under which its shape or texture are formed. Reason being there is no entropy or erosion or consideration of how vegetation might spread and take hold in different ways. It's too strict. Could you maybe enhance this whole idea by adding some random factor to it also?


Picklesworth(Posted 2005) [#11]
Who's this "you" all of a sudden?

Once I get around to it, sure.


John Blackledge(Posted 2005) [#12]
Hey Rif, shouldn't you and Mr Picklesworth be working together on this?
Or is yours finished?

Nice work! Releasable?


RifRaf(Posted 2005) [#13]
Mines done, been done for some time.

I do a bit more than wrote above, but thats a pretty good
place to start .. you can run that one check across your
terrain and have really nice results.


Picklesworth(Posted 2005) [#14]
Well I'll toy with it all in a while.
Thanks for the encouragement :)


karmacomposer(Posted 2005) [#15]
Rob Farley:

Hey there dude! Long time no talk. Feel free to email me or chat with me here on the forum.

Mike Felker


slenkar(Posted 2005) [#16]
Mr.Picklesworh - gotten anywhere yet?