dis­cover hou­dini’s Ter­rain Toolset

We take a look at build­ing pro­ce­dural en­vi­ron­ments with Hou­dini 17’s new and im­proved ter­rain toolset

3D World - - CONTENTS - Greg Barta Greg is a VFX artist and sci­en­tist with a pas­sion for cine­matic sci­en­tific vi­su­al­i­sa­tions. De­tails, along with Hou­dini re­sources like the UI mods in these screen­shots, are on his Art­sta­tion pro­file. scivfx.art­sta­tion.com

Greg Barta teaches us how to take a sci­en­tific ap­proach to build­ing pro­ce­dural en­vi­ron­ments

in Hou­dini 17 Sidefx in­tro­duced some new tools and en­hanced oth­ers in or­der to widen the range of op­por­tu­ni­ties for artists cre­at­ing fully pro­ce­dural ter­rains or adding de­tails to real-world based mod­els. For ex­am­ple, the en­hanced Erode node sim­u­lates ero­sion in a more sci­en­tif­i­cally plau­si­ble way and has many more con­trols than be­fore. The main pa­ram­e­ters of Height­field nodes can now be masked and there is an in­stant paint but­ton which au­to­mat­i­cally sets up the ap­pro­pri­ate node(s) for paint­ing.

Tak­ing a sci­en­tific ap­proach to our CG land­scapes will al­ways help us to achieve bet­ter re­sults, so that’s why we’re not sim­ply run­ning through the new ter­rain fea­tures, but also tak­ing a look at some ba­sic sci­en­tific as­pects and ex­plor­ing some new meth­ods, such as the Vel­lum toolset to sim­u­late tec­tonic com­pres­sion.

You can find all the re­sources I men­tion in this tu­to­rial on my Art­sta­tion site.

01 Ba­sic con­cepts

To ef­fec­tively use Hou­dini's height­field sys­tem, we should learn its ba­sic prin­ci­ples first. When Sidefx in­tro­duced this fea­ture set in ver­sion 16, as usual they made a mas­ter­class video. I rec­om­mend this for those who are not fa­mil­iar with the ba­sics. Ba­si­cally the Ter­rain mod­ule in Hou­dini con­sists of a bunch of SOP nodes, ev­ery one with Height­field in its name. They cre­ate a spe­cial kind of ge­om­e­try: a 2D vol­ume grid, which is more like a 2D im­age with pix­els, but Hou­dini ren­ders/dis­plays it as a sur­face. Sim­i­larly to how DEM files store the height data, ev­ery pixel stores a height value, and it pushes the par­tic­u­lar sur­face site up­wards with this amount, ex­actly how dis­place­ment tex­tures work. These nodes are de­signed for ter­rain gen­er­a­tion work­flows, so even if we use other tools for land­scapes, this is the most con­ve­nient and most ef­fec­tive way in many cases.

02 Ge­ol­ogy in a nut­shell

Re­search­ing the science be­hind the Earth’s ge­ol­ogy is piv­otal for ac­cu­rately sim­u­lat­ing real-world pro­cesses in a CG en­vi­ron­ment. At its most sim­pli­fied, we can think about Earth as a big blob of fluid and rel­a­tively soft mat­ter, a mere droplet from the uni­verse's per­spec­tive, with solid skin, like a grape. Some­times the skin of this 12,750 km wide droplet breaks into pieces, sim­i­larly to how the skin at the sur­face of hot milk or pud­ding tears apart as it gets hot­ter and starts to boil. This so­lid­i­fied magma skin, the crust, is thin­ner below the oceans and forms the base lay­ers of the land­scapes and many ge­o­logic pro­cesses. Some of them are crushed to­gether by forces of tec­tonic move­ments. These orig­i­nally ig­neous rocks crack, fall apart, de­com­pose and some­times thou­sands of miles away set­tle down and stick to­gether again, form­ing sed­i­men­tary rock. The weath­er­ing ef­fects of the at­mos­phere and wa­ter ma­tures the ter­rain over time, re­sult­ing in dif­fer­ent shapes and tex­tures.

03 sand­box for learn­ing

Learn­ing through play is al­ways a good way to get fa­mil­iar with a CG tool. Even if you have used ter­rain tools be­fore, it’s worth set­ting up a sand­box scene with sim­ple ge­ome­tries and try­ing out the new tools and pa­ram­e­ters in H17. Put a few poly­gon prim­i­tives around, like in this im­age, and in­cor­po­rate them

into a height­field sys­tem by firstly cre­at­ing a Height­field node then us­ing a Height­field Pro­ject node, which stamps the ge­ome­tries into the height­field.

Now we can start to go through the dif­fer­ent Height­field nodes and ap­ply them to this sim­ple scene. It’s much eas­ier and straight­for­ward to un­der­stand the ef­fects of these nodes than us­ing ar­bi­trary and com­pli­cated shapes. The master node of the ero­sion ef­fects is the Height­field Erode, which has been up­dated in ver­sion 17 with new fea­tures and op­ti­mi­sa­tions.

04 Deep Dive

We can dive into this node to un­der­stand how it works. As it au­to­mat­i­cally dives into a deeper node, we should step up one level after the dive com­mand. As we can see there are the three ba­sic ero­sion nodes at the end of the pipe­line, the Ther­mal, Pre­cip­i­ta­tion and Hy­dro. It’s worth cre­at­ing these out­side of this con­text with the same or­der to ob­serve their ef­fects.

The Ther­mal node sim­u­lates the me­chan­i­cal weath­er­ing ef­fects of the sur­faces at a ba­sic level. In re­al­ity there are dif­fer­ent causes that lead to the de­com­po­si­tion and dis­in­te­gra­tion of rocks: ther­mal ex­pan­sion and con­trac­tion, frost wedg­ing, pres­sure-re­lease frac­tur­ing (sheet­ing), salt crys­tal growth, bi­o­log­i­cal ac­tiv­ity, abra­sion and so on. These break the rock into smaller and smaller pieces and pile up at the bot­tom of the in­clines.

The Pre­cip­i­ta­tion node cre­ates a wa­ter layer and spreads drops on it. These are not in­tended to be re­lated to rain­drops – they seed the sim­u­la­tion and add vari­a­tions which will make the ero­sion more un­even.

This wa­ter layer is nec­es­sary for the Hy­dro node, which con­tains the Slump node in­side, the most com­plex lower-level node of the ero­sion sim­u­la­tion.

05 cause and ef­fect

The usual first step of ter­rain gen­er­a­tion – if it is in­tended to be fully pro­ce­dural – is to add a ran­dom-based pat­tern onto the blank ini­tial sur­face. In na­ture there are ar­guably no ran­dom pro­cesses at all, as ev­ery­thing de­pends on pre­vi­ous events. Thus in­stead of us­ing the Height­field Noise node, we can set up a more phys­i­cally plau­si­ble mass­ing model us­ing the ver­sa­tile sim­u­la­tion ca­pa­bil­i­ties of Hou­dini. How­ever, the main ad­van­tage of height­fields is that we can han­dle larger land­scapes with finer de­tails, com­pared to other types of ge­om­e­try. Us­ing sim­u­la­tion nodes makes the mem­ory foot­print even larger than these ge­ome­tries them­selves, so we should al­ways take care with how much de­tail we put in this phase. Later we should add the ad­di­tional de­tails with height­fields, which oth­er­wise would be too heavy.

06 vel­lum tec­ton­ics

We can ac­tu­ally cre­ate this step in the real world us­ing mul­ti­ple lay­ers of thick cloth. If we put a layer of slightly wet sand or finer grained pow­der like gyp­sum on top of it, then start to crush the cloth, we can ob­serve how the top pow­der layer be­haves. I rec­om­mend do­ing prac­ti­cal ex­per­i­ments – even play­ing with the sand and wa­ter on the beach – as it gives us tac­tile ex­pe­ri­ences that are unattain­able within 3D soft­ware.

For sim­i­lar ef­fects we can use a Vel­lum cloth sim­u­la­tion in Hou­dini. In this scene there are three lay­ers of thick cloth ge­om­e­try on top of each other. Below them there are two poly­cubes, and each is mod­u­lated by a Moun­tain noise node for un­even sur­faces. I an­i­mated them with a clos­ing and shear­ing move­ment to sim­u­late tec­tonic plates. They are wired into the static ge­om­e­try in­put of the Vel­lum. I used Vel­lum Drape in­stead of the Vel­lum Solver node for sim­u­la­tion, be­cause it be­haves more like the new Ero­sion node as there is a freeze frame op­tion in it.

In this node the static fric­tion is set to a low value like 0.1; in na­ture with such scales ev­ery­thing tends to be­have fluid and slip­pery, just very slowly rel­a­tive to hu­man timescales. How­ever the dy­namic fric­tion scales are rec­om­mended set to the op­po­site, well above 1, like 3-4, to get enough fric­tion be­tween the cloth and the tec­tonic plates, and they can form wrin­kles. I used rel­a­tively high damp­ing val­ues to over­come ex­plod­ing be­hav­iours, and the most im­por­tant thing is to

switch on all the plas­tic­ity op­tions as they are the ‘mem­ory ef­fects’ of the cloth sim­u­la­tion: they will keep the wrin­kles and pre­vent them from flat­ten­ing dur­ing the sim­u­la­tion.

I started with one layer of cloth, as it’s eas­ier and faster to play with the pa­ram­e­ters, but then du­pli­cated them on top of each other with slight ro­ta­tional dif­fer­ences in or­der to lessen any grid res­o­lu­tion in­ter­fer­ences dur­ing the sim­u­la­tion. Us­ing mul­ti­ple lay­ers makes the sim­u­la­tion more sim­i­lar to nat­u­ral pro­cesses, as usu­ally there are dif­fer­ent rock lay­ers on top of each other. This is also nec­es­sary for adding enough thick­ness to the sim­u­la­tion, as us­ing one cloth with the same thick­ness can sig­nif­i­cantly slow down the sim­u­la­tion.

07 im­port DEM

The other way to get a more re­al­is­tic mass­ing model is to im­port real-world data; you might have read my tu­to­rial about this process in the pre­vi­ous is­sue of 3D World. If we have a DEM file, we can di­rectly use the Height­field File for im­port. With the de­fault set­tings it will keep the orig­i­nal res­o­lu­tion of the DEM file, which can be huge, so it’s rec­om­mended to crop an in­ter­est­ing part for ex­per­i­men­ta­tion and then use the full area just oc­ca­sion­ally. It’s a good idea to set real scales here be­cause the sim­u­la­tion nodes will need it.

08 Map­box

I rec­om­mend in­stalling the Game Tools for Hou­dini, as it has tools that can be use­ful for ter­rain work. Maybe the most in­ter­est­ing is the Map­box node which al­lows us to di­rectly browse the Earth in­side Hou­dini, then we can select a spe­cific area and down­load the el­e­va­tion model and the satel­lite pho­to­tex­ture of it. It has a height­field out­put op­tion, so the en­tire planet is at our hands.

09 ero­sion

Let's use the Erode node on a real moun­tain. This el­e­va­tion data is from Alaska, around the Blue Lake reser­voir which has a nice moun­tain­ous land­scape. As we can see, by just us­ing the de­fault set­tings we can achieve quite re­al­is­tic re­sults – they have

im­proved this node in many as­pects. There is a new Freeze at Frame switch, so after we are sat­is­fied with the re­sult we can tick this, but it's also good for try­ing out the ef­fects of the dif­fer­ent pa­ram­e­ters in­ter­ac­tively. Crop a smaller but rel­e­vant part of the ter­rain and tick this, then set it to a low num­ber like 5 and play with the pa­ram­e­ters. You can see that it up­dates more or less in­ter­ac­tively, how­ever some sim­u­la­tions in­side do not up­date well, so you should hit the Re­set Sim­u­la­tion ev­ery time for full feed­back.

De­scrib­ing the new fea­tures of this node is far be­yond the lim­its of this tu­to­rial, so I rather rec­om­mend the se­cond part of the of­fi­cial H17 Ter­rain mas­ter­class video which is about the new fea­tures of the ter­rain tools.

10 Be­drock and strata

In the doc­u­men­ta­tion there is still a lack of in­for­ma­tion about the Be­drock tab, how­ever it’s worth us­ing this fea­ture if the goal is to in­clude some kind of 3D rock layer struc­ture in the sim­u­la­tion. We can in­ject a sec­ondary height­field in the se­cond in­put of the Erode node, which de­fines a ‘pre­his­toric’ struc­ture of the land­scape in this case. We can achieve strata ef­fects eas­ily by switch­ing on Ad­just Erod­abil­ity by Strata. The Strata Depth de­fines the depth range of the ramp edi­tor’s hor­i­zon­tal axis, rel­a­tive to the be­drock layer’s height. A neg­a­tive value in­verts the whole thing and puts the strata above this layer. As you can see in this screen­shot I used a Dis­tort by Noise node to get the sur­faces of the strata un­even, and also ro­tated the ge­om­e­try, so it cuts the land­scape at a shal­low slope an­gle. In the ramp edi­tor we can add the strata by defin­ing the rel­a­tive hard­ness of the be­drock in the func­tion of depth, each with dif­fer­ent erod­abil­ity bands. Switch­ing off Clamp at Strata Bounds loops this pat­tern, so re­gard­less of the ero­sion depth we will get repet­i­tive ver­ti­cal pat­terns after reach­ing the end of the ramp.

The only dis­ap­point­ing side of this fea­ture is the lim­i­ta­tion of the height­fields, as if we ob­serve these phe­nom­ena in re­al­ity, es­pe­cially on bold cliffs, the strata have strong re­lief pat­terns that we can’t achieve with height­fields. How­ever, con­vert­ing these parts to poly­gon or VDB SDF will al­low us to add these de­tails.

The ‘Ad­just Height by Be­drock Change’ switch should re­main off for this kind of ef­fect, but oth­er­wise it al­lows us to use an an­i­mated be­drock layer which up­dates the in­put for this node at ev­ery frame.

11 Dis­tort By layer

Fi­nally let's talk about this node, as it is com­pletely new in H17. It has two in­puts. The first in­put is usual, for the ge­om­e­try it­self. The se­cond can con­tain the di­rec­tion layer for the dis­tor­tion, sim­i­lar to how these kinds of nodes work in a node-based comp soft­ware. •

Newspapers in English

Newspapers from Australia

© PressReader. All rights reserved.