...
A buoy on an endless ocean rendered with Maxwell Render. The buoy is tied to its position with a MultiJoint.
Here is the nodes list:
- 1 “RealWave” object
- 3 “Cube” nodes
- 1 “Gravity” daemon
Nodes List
All scene elements can be added from RealFlow's “Edit” menu:
...
"RealWave", "Objects", and "Daemons" shelves:
- 1 “RealWave” object
- 3 “Cube” nodes
- 1 “Gravity” daemon
The Setup
Add a RealWave surface (there cannot be more than one RealWave node in a scene).
Rescale the surface to your needs with the R key or the parameters under Node Params > Scale. The surface should be a squared mesh.
Right-click on the “RealWave01” node and choose Add Wave > Fractal
Add a “Gerstner” modifier
Create three cubes and change their vertical scale to values of 2.0, 2.5, and 3.0 (Node Params > Node > Scale)
Spread the cubes randomly over the RealWave mesh with the W key and shift them downwards so they intersect the wave surface. About 2/3 of the cubes should be above the water level.
Add a “Gravity” daemon.
...
Select the first cube.
Node Params > Node > Dynamics > Active rigid body
Node Params > Rigid body > @ mass Mass > 500.0 (see below)
Repeat the steps above for the remaining cubes
...
Click on “Simulate”. After a few frames the cubes turn over due to the waves' motion.
Adjusting the Cubes' Centre of Gravity ("CoG")
In this short tutorial, the centre of gravity is shifted along an object's height axis. It depends on your current preferences which axis is used:
...
Cube01 > Node Params > Display > Show CG > Yes
Switch to RealFlow's “Wireframe” mode with the 8 key to make the CoG visible – it is a small yellow square in the cubes' midpoints
Select “Cube01”
Node Params > Rigid body > @ CG > Y/Z > -0.25
Repeat these steps, but use different “@ CG” “CG” values (-0.5 and -0.75) for the remaining cubes
“@ CG” “CG” values are relative to an object's size. This means that 0 represents the body's midpoint, while the total length is considered 1. When you enter a value of -0.5 the CoG will be the object's bottom; with 0.5 it is its top. With values greater 0.5 or smaller -0.5 it is possible to shift the CoG outside the object. This is an easy way to control the object's floating behaviour.
...
Click on “Simulate”. According to your settings the cubes will float. With a CoG close to a node's midpoint it may happen that the body is still tipping over. Play with different “@ CG” “CG” values and change all three parameters (XYZ).
...