3D Artist

Create procedural oceans in Maya 2018

Tips & Tutorials
Diego Trazzi

Learn how to use the Bifröst Ocean Simulation System

Create procedural oceans in Maya 2018

This tutorial was written by the amazing Diego Trazzi as part of a series for cmivfx.com and appeared in issue 113 of 3D Artist. Subscribe today and never miss an issue!

Tools used

Maya 2018

This short tutorial focuses on procedural oceans using BOSS (Bifröst Ocean Simulation System), part of Autodesk Maya 2018 and the Bifröst framework.

Boss is a wave solver and a spectral wave generator, which means it can generate procedural waves to resemble the look of an ocean, but it can also create great ripples and 2D simulations of objects falling in the water.

The walkthrough lesson will demonstrate how to set up a physically correct CG ocean based on the Beaufort Scale. The empirical data collected from this scale is then used to set up the ocean attributes for the CG Ocean. Using this procedural system, the artist will be able to replicate the look of a Beaufort scale 4 sea condition.

The tutorial additionally covers the rendering aspect using Arnold 5. This process presents the opportunity to extend the ocean simulation to the horizon using tiled displacement. It will also be shown how to add wind gusts and whitecaps to perfectly match a reference Beaufort scale 4.

Some of the reference material (tutorial screenshots) that have been provided with this tutorial is part of an open-source project that I’ve started together with Igor Zanic to collect and catalogue a complete list of conditions at sea for the Beaufort Scale. This data will be published shortly and contains video references, as well as data information, such as wind direction and speed, which can be used in Boss for a physically accurate setup. The library will be available for free.

This short guide, due to formatting and word count restrictions, is limited to key points, therefore I strongly suggest following up with a specific Boss video tutorial.


Step 01 – Create the procedural ocean deformer

Create procedural oceans in Maya 2018

Start by loading Boss from the Plug-in Manager in Maya, and create a new plane of 100x100m with 200 subdivisions. Once the plugin has loaded, you should see a menu named Boss appearing in the menu in the FX module.
Open the ‘Boss Editor’ and add two sets of procedural ocean (Boss>Boss Editor, then click on the blue icon). The ocean waves can be cached out as EXR sequence to be used as displacement maps in Arnold. The Resolution [X and Z] setting (pixels) determines the amount of details that the underlying procedural texture can capture – in other words, the smallest wave – whereas the Patch Size (m) controls the largest wave that has been captured by the ocean patch.

Step 02 – Ocean parameters

Create procedural oceans in Maya 2018

The most important setting to control the waves’ height is Wind Speed (m/s). In addition to wind speed, Wind Fetch Distance (km) determines the difference between small choppy waves and a large swell. The accumulated energy from the wind is trapped in the waves, and travels hundreds of kilometres before reaching the shore. The fetch attribute describes the patch size over which the wind is blowing. The larger the patch size (expressed in km^2), the bigger and cleaner the waves generated will be. Waves with a large fetch are perfect for a surf session, since they are full of energy and tend to be less choppy than those that have been generated locally.

Step 03 – Set up a physically accurate ocean

Create procedural oceans in Maya 2018

To generate a realistic-looking ocean, I use values from the Beaufort Scale. This is a good method of putting in relationship an abstract set of values with real-life measurements. Autodesk has done a great job of expressing most of the parameters in Bifrost and Boss with SI Units, which helps when looking for reference values online. For the purpose of this tutorial, we are going to use one of these references and match a Beaufort scale 4 filmed in Bussana, Italy, which is described as a Moderate Breeze with some breaking caps.

Step 04 – Boss values for Beaufort 4

Create procedural oceans in Maya 2018

First, set up the large set of waves: Wind Speed to 6m/s and Wind Fetch to 80 km. Set the Patch Size to 300 x 300, Wave Height to 0.333, and the Resolution to 2048 x 2048. For the small waves, set the Wind Speed to 6, Wind Fetch to 5 km, Patch Size to 100×100, Wave Height to 1 and Resolution to 2048 x 2048. As a final touch, add some horizontal displacement to accentuate the sharp features of the waves. Turn on Use Horizontal Displacement for the small waves and increase the wave size to 3.000.

Step 05 – Add Whitecaps and cache out the procedural ocean

Create procedural oceans in Maya 2018

Boss provides an easy solution for adding whitecaps: select the set of small waves and enable the Foam Attributes section. Use the following values: Foam Diffusion Rate to 0.350, Cusp Scale to 1, Cusp Min to 0.050, Cusp Max to 1.000, Use Speed to On, Speed Min to 0.400 and Speed Max to 4.000. Once the foam is set up, cache out the wave solvers as EXRs. This process enables you to render the ocean as a displacement map. To cache out the wave solvers, open the Boss Editor (Boss>Boss Editor), select each solver and click on the Cache Icon.

Step 06 – Displacement setup

Create procedural oceans in Maya 2018

Use HyperShade to set up an aiStandardSurface shader. For each wave spectra, create a 3D displacement projection and a new poly plane with 4 x 4 subdivisions. Apply a displacement node to the ShadingGroup: set Vector Encoding to Floating Point Absolute and Vector Space to Absolute, then set up file-path and projections size, and scale the projection node to match the ocean patch size. Rotate and scale the projection manipulator to match the ocean (scale 150, 150, 150). Note that the scale is half the patch size. Scaling by half is necessary because the projection node is actually twice as wide/long.

Step 07 – Multiple layers projection and render comparison

Create procedural oceans in Maya 2018

Use a layeredTexture to add the small set of waves. Scale up the displaced plane to horizon and increase the subdivisions to eight (Arnold’s section in polyPlaneShape). Make a comparison render between the deformed surface and the displacement. To better display the subdivisions, switch to Debug mode Wireframe in the Arnold render view (Render> Debug Shading> Wireframe. This gives you a clear idea of how much geometry you are rendering. Compare the deformed with displaced oceans: when adding the EXRs as displacement, Arnold further tessellates the geometry, generating more details.

Step 08 – Add wind gusts

Create procedural oceans in Maya 2018

The reference picture also shows wind gusts across the surface of the water. To add this element, use a noise map to multiply the effect of the small ocean waves. The output of this layer can drive the displacement map and the specular roughness. To drive the Specular Roughness of the Ocean Shader with the same noise function used to modulate the displacement, add a remapValue node to remap the incoming values (0 to 1) between 0.2 to 1.

Step 09 – Shade the Whitecaps

Create procedural oceans in Maya 2018

Similarly to the displacement setup, project the foam onto the surface using the EXR from the foam cache. It’s been better to map the foam mask into the ‘Subsurface’ component rather than Diffuse since Arnold 5 (Maya 2018). This is because the new StandardSurface is an energy-conserving, physically based shader. At this point you should have a complete shading network with foam and wind gusts. You can tweak the values or copy the settings from the Attribute Editor screenshot on the side.