General Category > ASL Scripts

A new version of my water simulator script with more features!

<< < (2/3) > >>

2020 Hindsight:
Hi bayinghound,

I would expect the animated waves to look realistic - although I don't know anim8or well enough to do animations.

On the other hand decaying waves (which you can only add by changing the code) may look artificial, as the energy remains localised at the origin of the waves - so probably will look OK for boat hulls, reeds, and rocks sticking out of the water, but will probably look artificial for animated water drips. I suppose the code could be changed to take time from impact as well as distance into account when calculating wave height.

You can get a low fidelity feel for what the animation will look like, by changing the "Time" values in the "Parametric Plug-in  Editor".

You can do this by advancing the time by 5, and shift-Tab (to move back to the "Wave direction" field (so causing the waves to be redrawn)), then Tab (to move back to the "Time" field), to modify the field again. The waves will evolve rather than just shift position - but this will be more obvious the closer the "Min wave distance" is, and the larger the values of "X Tile", and "Y Tile". So position the cursor on "time", and with dexterity type quickly:

5<shift-Tab><Tab> 10<shift-Tab><Tab> 15<shift-Tab><Tab> 20<shift-Tab><Tab>...

It is easier to count up in 10s! But perhaps that works better with larger waves.

2020 Hindsight:
Hi bayinghound,

If my answer didn't seem to match your question, it is because I missed the word "as" when reading it.

I made a post https://www.anim8or.com/smf/index.php/topic,6026.0.html asking advice about animation, but I didn't get any responses. I feel it should be easy to automate, the script just needs to be called for each frame with a time or frame number - but I don't believe this is currently supported.

If you have patience, then I suspect you could manually change the time field, then save the waves as a grid with a name for that frame. And repeat for each frame, and load different grids for each frame. Automation would be so much nicer though!

John

bayinghound:
Ok. I thought I was totally missing something. I ended up using morph targets. The water isn't visible for long, but I did use you plug in. Nice job.

bayinghound:
Is there a way to automate generating morph targets?

2020 Hindsight:
That looks good. I looked up "morph targets" and found the flag tutorial. I take it you saved something like 10 meshes and used them as key frames in the sequence editor.

Possibly I could save grids from the script - but I have a feeling I've read that you cannot save from this kind of script - I need to look at the documentation.

Alternatively what is the format of the files when you save a mesh - perhaps I could just write a program in C or Python to create the mesh files?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version