Automatic terrain texturer
Blitz3D Forums/Blitz3D Programming/Automatic terrain texturer
| ||
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? |
| ||
If you would find it useful, then it's worth doing. :) |
| ||
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? |
| ||
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 |
| ||
Its been done wait for linky. EDIT: http://www.blitzbasic.com/codearcs/codearcs.php?code=1094 Like that? |
| ||
Something like this? Not free though. |
| ||
well the very simple method i posted above can acheive things like this.. and this is a shot from in blitz. |
| ||
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 |
| ||
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! |
| ||
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? |
| ||
Who's this "you" all of a sudden? Once I get around to it, sure. |
| ||
Hey Rif, shouldn't you and Mr Picklesworth be working together on this? Or is yours finished? Nice work! Releasable? |
| ||
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. |
| ||
Well I'll toy with it all in a while. Thanks for the encouragement :) |
| ||
Rob Farley: Hey there dude! Long time no talk. Feel free to email me or chat with me here on the forum. Mike Felker |
| ||
Mr.Picklesworh - gotten anywhere yet? |