Water (Ocean/Lake) and "soft body" simulator


(RipSting) #1

In the process of creating a wind routine for my grass generator I thought that a water simulator would be pretty easy to create. This doesn’t simulate particles, but it can make very nice lakes and oceans and rivers. But this can also be used on any mesh to deform it with random waves.

http://www.fireengine51.org/blender/ocean.jpg

Examples (MPEG-4):
http://www.fireengine51.org/blender/ocean.avi (254K)
http://www.fireengine51.org/blender/blob.avi (182K)

You will need to download Eeshlo’s DYNoise module from his website here:
http://www.stormpages.com/eeshlo/VariousPython.html
It’s under the heading “Dynamica Noise module”. Just put it in your Blender directory.

Download the script and an example .blend here:
http://www.fireengine51.org/blender/water.zip (108K)


(marf) #2

can’t download Eeshlo’s DYNoise module. :frowning: it says the file doesnt exist??


(RipSting) #3

I could download it from here, but maybe it’s just cached on my machine… I’ve mirrored Eeshlo’s noise module on my site- I hope he doesn’t mind. You can find it here:

http://www.fireengine51.org/blender/noisemod.zip


(rndrdbrian) #4

Very nice script!

that ocean avi made me feel sea sick! :smiley:

One feature which may be handy is to take into account vertex paint, so that for example, vertices which are painted pure white won’t move, those painted pure black will move. Possible?


Brian


(theeth) #5

I don’t know how RipSting’s code works, but the functionnality is in the API if he wants to do it.

Martin


(eeshlo) #6

Strange, there was actually a ‘waves’ function in the module when I first had created it. It updated the mesh from the module itself, not in python. But I didn’t think that it was really useful, it was just an experiment for me and much more is of course possible with python itself.
Anyway, maybe you find the ridged multifractal function a better choice for waves.


(RipSting) #7

One feature which may be handy is to take into account vertex paint, so that for example, vertices which are painted pure white won’t move, those painted pure black will move. Possible?

It really wouldn’t be hard at all to impliment that. Right now my machines rendering some grass with wind blowing through it :wink: , but as soon as it’s done I’ll put that in there.

maybe you find the ridged multifractal function a better choice for waves

I’ll look into that. Really, HTerrain was the one I happened to pick. I didn’t select it for its ability at making realistic waves. Thanks for the tip!


(ray_theway) #8

How do you use this script with the grass? I tried using lattices to animate wind. Let me just say it was pretty ugly :o .


(RipSting) #9

How do you use this script with the grass? I tried using lattices to animate wind. Let me just say it was pretty ugly.

Look out for my fiber generator. This will incorporate my grass and hair generators into one, and will feature an integrated wind generator for easy animation. It just entered beta today and I’m preparing some examples. Look for it soon!


(burgesst) #10

Excuse my ignorance, but I’ve downloaded and copied the files, and opened the blends, but nothing happens.

What do I do now ?

Cheers,

B.


(RipSting) #11

Did you put the dynoise module (dynoise.dll for windows /dynoise.so for linux) into your blender directory?

If everything goes OK and you’ve followed the instructions in the .blend file, the console that runs with Blender should report “running water on object Plane.003”, and nothing else. Is it showing an error?


(burgesst) #12

Thanks, working now. I am a fool - it was in the wrong directory. Serves me right for keeping old versions of Blender on my machine!

Cheers,

B.


(d52477001) #13

hi,

i’m kinda new to this so where exactly in the blender directory should it be?


(RipSting) #14

It should go in the root blender directory (Normally C:\program files\blender\ if your on a windows machine)