Procedural Terrain with Python scripting? is it possible?

Hi Fellow Blender People~ I’ve been playing around with Blender for a while and I am amused, specially the Sculpt tool, but Im wondering is it possible to make terrain in the game engine that is capable of adding and removing vertices. I know this has been answered quite alot but never this specific
Like this:

I have a background in programming with C# and I am able to create a lists there to display voxels/Cubes, but I have no idea how to do this with Python. or is it even possible?

You can only add and delete premade meshes not vertexes and faces.At least that is what i heard.I wish the blender game engine had that functionality.It is still doable though with adding and deleting meshes.
Do you know how to do marching cubes?I use logic bricks to make voxels.

Procedural is definitely possible, and ridiculously easy. There are functions for shunting vertices around, and there are a few examples of this sort of stuff in the resource forum. (Have a look at the fractal meshes generated in-game someone posted a few days ago)


  • Can’t create/delete vertices in game, only shuffle existing ones.
  • Have to manually re-calculate polygon normal (and physics if you don’t have a separate physics mesh)

And please, forget about the voxels. Unless you are going for minecraft size voxels, you’ll need a HUGE amount of ram (>32gb) to store a world in. Existing voxel engines tend to use a certain amount of fakery and repetition of assets, and still require massive ram.

I tried unity voxels and even marching cube demos.I did not have a huge amount of ram.

Just something pretty interesting:
The UbiArt engine, used to make Rayman Legends, has a cool feature like this.

All the objects basically have like 10 textures that randomize when scaling and modifying objects, such as the grass, and is entirely modular.
This method is great for 2d, and doesn’t use voxels. It is kind of simple really.
The same thing is done for random 3d level generation, but the vertices are removed where the objects join to save memory, which is the area in which Blender gets tricky. As sdfgeoff said, vertices cannot be added or removed, and the poly normal has to be recalculated every time.