RealFlow Wisdom

RealFlow blog: Tips, Technics and Scripting.

How to create swell using expresions?

In scenes where you need to simulate shore waves, crest waves or simply breaking waves against the coast or cliffs, it is very useful the use of expressions. Expressions can be added to the  most node attributes  in RealFlow, using them to add cadence of movement or variability.

Imagine we are trying to simulate the coast where waves break against the rocks. You need to move the water or create a similar ocean movement.  Have a look to next video for better understanding of what I mean.

  In this set up I used an expression to control the cadence of the waves.

Maths are not my forte, 🙂 sorry,  so I´ll try to explain how works the expression I´ve used:

Given the expression

a*(1-sqrt(tanh(b*(sin(t/c)^2))))

where:

a was the Force Amplitude that will give the Wave Height

b was the sharpness of the pulse

c was the frequency of the pulse that will produce the Wavelength

This give you a force that produce a wave with a natural cadence. This is not a physically correct formula, if you want to know more about oceans have a look to internet, is full of articles about this field, these ar some of them:

http://www.boatsafe.com/nauticalknowhow/waves.htm

http://hyperphysics.phy-astr.gsu.edu/hbase/waves/watwav2.html

http://en.wikipedia.org/wiki/Wind_wave

Advertisements

February 8, 2010 - Posted by | Animaton | , ,

4 Comments »

  1. Ha!

    Fantastic blog! thanks for sharing! 🙂

    Comment by tmdag | May 28, 2010 | Reply

  2. great expression! Thanks… sometime I will need it for shure! 🙂

    Comment by JannisSingh | August 30, 2012 | Reply

  3. 🙂

    Comment by jalixko | August 30, 2012 | Reply

  4. Thank you Antonia!

    Comment by jalixko | October 1, 2012 | Reply


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: