Floating objects
 
 
 

You can make geometry (for example, a boat) float in the ocean, moving appropriately with the motion of waves. The following steps show you how using a simple polygon cube.

To float a cube in the ocean

  1. Create a polygon cube (Select Create > Polygon Primitives > Cube).
  2. In the Attribute Editor, click the pCube1 tab and scale the cube as follows:
    • Scale: 10 10 10
  3. Select both the cube and the ocean plane (not the preview plane) at the same time and select Fluid Effects > Ocean > Make Boats.

    Maya creates a boat locator at the center of the cube to mark the cube’s position in space. The locator is connected to a predefined expression that simulates buoyancy effects. The expression is connected to the wave heights (displacement) of the ocean.

    To learn more about expressions, look at the Expressions lessons in Getting Started with Maya.

  4. Play the simulation using the playback controls at the bottom of the Maya window.

    The cube bobs, pitches and rolls in the ocean.

  5. In the Attribute Editor, click the locatorShape tab and in the Extra Attributes section, modify the following options. These serve as inputs to the expression.
    • Buoyancy: 0.75
    • Roll: 0.1
    • Pitch: 0.2

    Increasing Buoyancy makes the box float more and sink into the ocean less. Decreasing the Roll and Pitch values causes the cube to roll less from side to side, and pitch less forwards and backwards as a result of the wave motion.