Close
Asset

WaveTOP

WaveTOP is an implementation of the wave equation using only TOPs. (no custom GLSL)
It creates a heightmap that can be used to displace a gridSOP to create a water-like surface.
 

How to use 


The waveTOP will take the red channel of the first input to add (or subtract in case of negative values) volume to the field.

The second input is used to specify the boundaries of the surface. The pixels, with values higher than 0, are masked out of the simulation and the waves will bounce of the border.
 

Technical Details

he component uses the wave equation to simulate water waves. The wave equations relates the laplacian of the surface to the force. The laplacian in cartesian coordinates is the sum of second derivatives with respect to the space coordinates. In other words, the laplacian tells something about how curved the surface at a specific point is. The more curved the surface, the higher the force pushing back to equilibrium.


To (numerical) calculate a derivative of a surface (slope) described in a TOP, it's possible to sample the neighbouring pixels and subtract them like:

(F(u+e, v) - F(u-e, v)) / 2e 

Where 'e' is the size of a pixel.

To get the second derivative, this can be applied twice:

( (F(u+2e,v)-F(u,v))/2e  -  (F(u,v)-F(u-2e,v))/2e ) / 2e = ( F(u+2e,v) - 2 F(u,v) + F(u-2e,v) ) / (4e^2)

This is what is implemented in the /WaveTOP/Laplacian component for both u and v.

Cheers,
Tim Gerritsen <tim@yfxlab.com>

www.yfxlab.com
instagram.com/tim__gerritsen
instagram.com/_yfxlab

 

Asset Downloads

WaveTOP.1.0.tox (27.26 KB)

Comments