Terrain Generation Using Fluid Simulation

download: http://30bentham.homelinux.org/blender/fluidterrain.py
original articicle: http://www.gamedev.net/reference/articles/article2001.asp


"""
this is an implementation of the code found in this article:
        http://www.gamedev.net/reference/articles/article2001.asp

originally written by:
        Francis "DeathWish" Woodhouse
        http://www.dwish.net

the introduction from the article:
        There are many ways of generating terrain. Some use a simple randomise-and-smooth
        technique, whereas others use more complex techniques that use fractal methods
        to achieve realistic terrain. While each individual method has its own
        advantages, it can be hard to control just how "bumpy" the terrain is.

        In this article, I propose a new method of terrain heightmap generation that uses
        an iterative process, treating the heightmap as a highly viscous and rubbery fluid.
        The parameters to the fluid simulation equation enable the quality and quantity of
        features in the generated heightmap to be varied as desired.
"""

i am having a problem with blender constantly crashing due to a floating point error. please try the script and tell me if you a) get the same prob b) know how to fix it!
<edit> it is in fact probably just me with the problem </edit>

thanks.

a tiny example ( check the original article for better examples ):

http://30bentham.homelinux.org/blender/fluidterrain.jpg

you got the numarray package? Im gonna try it after installing that one

debian is very good with python. it has had just about every python package ive ever needed

it works for me. I had to install numarray and PIL. I could use portage for numarray and I found PIL on http://www.pythonware.com/products/pil/

so no floating point errors?

could you post your OS, blender version and python version.

i dont want to write software that works for everyone else and not me! %|

I have gentoolinux, 2.31 (cvs) and 2.2.3. it creates the image correctly… it rocks… really :slight_smile:

<cartman>goddamit!</cartman>

i have thought about trying to get cvs version to work.

any nice renders you have produced to demo the script?

well at this moment Im producing a huge image. its running since 15 mins :).

I get the floating point exception as well and have sucessfully installed the two required modules. I am using suse 9.0 with python 2.23 and have not had any trouble like this with any other python scripts.

Zaug

well someone from the developers had a look but of course it didnt crash theyre system %|

i think i can re-implement this now without the need for numarray.

in-fact i shall have a look now…

http://30bentham.homelinux.org/blender/fluidterrain.0.2.py

fluidterrain no longer relies on numarray therefore its 100% working! :slight_smile:

enjoy