I’ve finally integrated the random texture generator with the terrain deformer.
file:
http://www.mediafire.com/?v312zdx3ganum8v
This is just an early test, I have to clean up the code and include the tree placer, but it is nearly ready for my modest needs.
Try the blend file, tell me if it works.
the properties “mix” and “mix2” set the roughness of the terrain. If “mix2” is set to 0.0
it will only use the value of “mix”.
Values of around 8 will give very rough terrain.
Values of around 36 or 64 will give very smooth.
“slopes” sets the slope detection angle. I could do with re-writing this bit to be more discerning. 1 detects a lot of slopes, 3 detects not many. 0 would give you an all slope map (no grass and trees).
“scale” sets the height of the mountains.
“high” sets the lowest point that mountains are formed.
“low” sets the highest point that pits start from.
Set “high” to a value near 255 to have no mountains, set “low” to near 1 to have no pits.
I plan to add some more details later, such as a random texture picker to pick textures other than the rock and grass ones (allowing for deserts and others) and also a tree placer which will place tree objects based on a random texture avoiding slopes.
credit goes to this person for creating the perlin noise script:
http://www.siafoo.net/snippet/144#description
EDIT:
oops, forgot that you need to add
own.reinstancePhysicsMesh(own, mesh)
to the end of the script to make the changes physically effective.
EDIT:
New version which uses nodes to give a nicer texture.
try it here:
http://www.mediafire.com/?ocbonhmr2mkkjnv