PIPE­LINE TECH­NIQUES: Gen­er­ate pro­ce­dural oceans in Maya 2018

3D Artist - - CONTENTS -

Diego Trazzi teaches us how to use the Bifröst Ocean Sim­u­la­tion Sys­tem to cre­ate pro­ce­dural waves

This short tu­to­rial fo­cuses on pro­ce­dural oceans us­ing BOSS (Bifröst Ocean Sim­u­la­tion Sys­tem), part of Au­todesk Maya 2018 and the Bifröst frame­work. Boss is a wave solver and a spec­tral wave gen­er­a­tor, which means it can gen­er­ate pro­ce­dural waves to re­sem­ble the look of an ocean, but it can also cre­ate great rip­ples and 2D sim­u­la­tions of ob­jects fall­ing in the wa­ter.

The walk­through les­son will demon­strate how to set up a phys­i­cally cor­rect CG ocean based on the Beau­fort Scale. The em­pir­i­cal data col­lected from this scale is then used to set up the ocean at­tributes for the CG Ocean. Us­ing this pro­ce­dural sys­tem, the artist will be able to repli­cate the look of a Beau­fort scale 4 sea con­di­tion.

The tu­to­rial ad­di­tion­ally cov­ers the ren­der­ing as­pect us­ing Arnold 5. This process presents the op­por­tu­nity to ex­tend the ocean sim­u­la­tion to the hori­zon us­ing tiled dis­place­ment. It will also be shown how to add wind gusts and white­caps to per­fectly match a ref­er­ence Beau­fort scale 4.

Some of the ref­er­ence ma­te­rial (tu­to­rial screen­shots) that have been pro­vided with this tu­to­rial is part of an open-source project that I’ve started to­gether with Igor Zanic to col­lect and cat­a­logue a com­plete list of con­di­tions at sea for the Beau­fort Scale. This data will be pub­lished shortly and con­tains video ref­er­ences, as well as data in­for­ma­tion, such as wind di­rec­tion and speed, which can be used in Boss for a phys­i­cally ac­cu­rate setup. The li­brary will be avail­able for free.

This short guide, due to for­mat­ting and word count re­stric­tions, is lim­ited to key points, there­fore I strongly sug­gest fol­low­ing up with a spe­cific Boss video tu­to­rial.

Cre­ate the pro­ce­dural ocean de­former

Start by load­ing Boss from the Plug-in Man­ager in Maya, and cre­ate a new plane of 100x100m with 200 sub­di­vi­sions. Once the plu­gin has loaded, you should see a menu named Boss appearing in the menu in the FX mod­ule. Open the ‘Boss Ed­i­tor’ and add two sets of pro­ce­dural ocean (Boss>Boss Ed­i­tor, then click on the blue icon). The ocean waves can be cached out as EXR se­quence to be used as dis­place­ment maps in Arnold. The Res­o­lu­tion [X and Z] set­ting (pix­els) de­ter­mines the amount of de­tails that the un­der­ly­ing pro­ce­dural tex­ture can cap­ture – in other words, the small­est wave – whereas the Patch Size (m) con­trols the largest wave that has been cap­tured by the ocean patch.

Ocean pa­ram­e­ters The most im­por­tant set­ting to con­trol the waves’ height is Wind Speed (m/s). In ad­di­tion to wind speed, Wind Fetch Dis­tance (km) de­ter­mines the dif­fer­ence be­tween small choppy waves and a large swell. The ac­cu­mu­lated en­ergy from the wind is trapped in the waves, and trav­els hun­dreds of kilo­me­tres be­fore reach­ing the shore. The fetch at­tribute de­scribes the patch size over which the wind is blow­ing. The larger the patch size (ex­pressed in km^2), the big­ger and cleaner the waves gen­er­ated will be. Waves with a large fetch are per­fect for a surf ses­sion, since they are full of en­ergy and tend to be less choppy than those that have been gen­er­ated lo­cally.

Set up a phys­i­cally ac­cu­rate ocean

To gen­er­ate a re­al­is­tic-look­ing ocean, I use val­ues from the Beau­fort Scale. This is a good method of putting in re­la­tion­ship an ab­stract set of val­ues with real-life mea­sure­ments. Au­todesk has done a great job of ex­press­ing most of the pa­ram­e­ters in Bifrost and Boss with SI Units, which helps when look­ing for ref­er­ence val­ues on­line. For the pur­pose of this tu­to­rial, we are go­ing to use one of these ref­er­ences and match a Beau­fort scale 4 filmed in Bus­sana, Italy, which is de­scribed as a Mod­er­ate Breeze with some break­ing caps.

Boss val­ues for Beau­fort 4 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 Res­o­lu­tion to 2048 x 2048. For the small waves, set the Wind Speed to 6, Wind Fetch to 5 km, Patch Size to 100x100, Wave Height to 1 and Res­o­lu­tion to 2048 x 2048. As a fi­nal touch, add some hor­i­zon­tal dis­place­ment to ac­cen­tu­ate the sharp fea­tures of the waves. Turn on Use Hor­i­zon­tal Dis­place­ment for the small waves and in­crease the wave size to 3.000.

Add White­caps and cache out the pro­ce­dural ocean Boss pro­vides an easy so­lu­tion for adding white­caps: select the set of small waves and en­able the Foam At­tributes sec­tion. Use the fol­low­ing val­ues: Foam Dif­fu­sion 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 en­ables you to ren­der the ocean as a dis­place­ment map. To cache out the wave solvers, open the Boss Ed­i­tor (Boss>Boss Ed­i­tor), select each solver and click on the Cache Icon.

Dis­place­ment setup Use Hyper­shade to set up an ai­s­tan­dard­sur­face shader. For each wave spec­tra, cre­ate a 3D dis­place­ment pro­jec­tion and a new poly plane with 4 x 4 sub­di­vi­sions. Ap­ply a dis­place­ment node to the Shad­ing­group: set Vec­tor En­cod­ing to Float­ing Point Ab­so­lute and Vec­tor Space to Ab­so­lute, then set up file-path and pro­jec­tions size, and scale the pro­jec­tion node to match the ocean patch size. Ro­tate and scale the pro­jec­tion ma­nip­u­la­tor to match the ocean (scale 150, 150, 150). note that the scale is half the patch size. Scal­ing by half is nec­es­sary be­cause the pro­jec­tion node is ac­tu­ally twice as wide/long.

Scal­ing by half is nec­es­sary be­cause the pro­jec­tion node is ac­tu­ally twice as wide/long

Mul­ti­ple lay­ers pro­jec­tion and ren­der com­par­i­son Use a lay­ered­tex­ture to add the small set of waves. Scale up the dis­placed plane to hori­zon and in­crease the sub­di­vi­sions to eight (Arnold’s sec­tion in poly­plane­shape). Make a com­par­i­son ren­der be­tween the de­formed sur­face and the dis­place­ment. To bet­ter dis­play the sub­di­vi­sions, switch to De­bug mode Wire­frame in the Arnold ren­der view (Ren­der> De­bug Shad­ing> Wire­frame. This gives you a clear idea of how much ge­om­e­try you are ren­der­ing. Com­pare the de­formed with dis­placed oceans: when adding the EXRS as dis­place­ment, Arnold fur­ther tes­sel­lates the ge­om­e­try, gen­er­at­ing more de­tails.

Add wind gusts The ref­er­ence pic­ture also shows wind gusts across the sur­face of the wa­ter. To add this ele­ment, use a noise map to mul­ti­ply the ef­fect of the small ocean waves. The out­put of this layer can drive the dis­place­ment map and the spec­u­lar rough­ness. To drive the Spec­u­lar Rough­ness of the Ocean Shader with the same noise func­tion used to mod­u­late the dis­place­ment, add a remap­value node to remap the in­com­ing val­ues (0 to 1) be­tween 0.2 to 1.

Shade the White­caps Sim­i­larly to the dis­place­ment setup, project the foam onto the sur­face us­ing the EXR from the foam cache. It’s been bet­ter to map the foam mask into the ‘Sub­sur­face’ com­po­nent rather than Dif­fuse since Arnold 5 (Maya 2018). This is be­cause the new Stan­dard­Sur­face is an en­ergy-con­serv­ing, phys­i­cally based shader. At this point you should have a com­plete shad­ing net­work with foam and wind gusts. You can tweak the val­ues or copy the set­tings from the At­tribute Ed­i­tor screen­shot on the side.

Newspapers in English

Newspapers from UK

© PressReader. All rights reserved.