STEP BY STEP: Mas­ter 3ds Max 2019’s open shad­ing lan­guage

Rainer Duda takes us through creat­ing a hy­per­real wooden floor

3D Artist - - CONTENTS -

the goal of com­puter gen­er­ated im­agery is to re-cre­ate nat­u­ral en­vi­ron­ments with rich de­tails and the sim­u­la­tion of phys­i­cally plau­si­ble in­ter­ac­tion be­tween light and mat­ter in dig­i­tal scenes. the most im­por­tant as­pect of this, af­ter phys­i­cally based ren­der­ing, is prob­a­bly fea­ture-rich tex­tures. in this tu­to­rial you will learn how to utilise the ca­pa­bil­i­ties of osl in 3d stu­dio Max to cre­ate a real­is­tic-look­ing and heav­ily used mo­saic par­quet floor. all de­tails in­clud­ing scratches, colour vari­a­tion and many more will be cre­ated with pro­ce­dural tex­tures.

the start of this tu­to­rial will cover how the un­der­ly­ing ge­om­e­try must be pre­pared in order to have a proper base for an ad­vanced shader setup. the tiles of the mo­saic par­quet will be com­posed of polyg­o­nal sticks in their orig­i­nal size to cre­ate 16 by 16cm tiles. the shader work starts by us­ing osl nodes for the ini­tial colour def­i­ni­tion and the per in­stance vari­a­tion of the hue. to break the con­ti­nu­ity of the pat­tern, osl code will help to cre­ate a gra­di­ent which will vis­ually sep­a­rate the tiles from each other. You will also learn how to use pro­ce­dural noises for the cre­ation of in­ter­est­in­glook­ing wood pat­terns which are de­rived from photo ref­er­ences. it is im­por­tant to use a va­ri­ety of dif­fer­ent noise pat­terns to break the pro­ce­dural look. at the end, you will learn tech­niques to blend and mix dif­fer­ent noises to­gether for a work­ing vis­ual com­po­si­tion.


Pre­pare the mo­saic par­quet floor First, cre­ate proper floor tiles. the first floor tile con­sists of seven wooden sticks with a size of 16cm x 2.28cm x 0.5cm. one wooden stick will be cre­ated. its pivot will go to the down left cor­ner. Via the ar­ray func­tion it is easy to cre­ate ad­di­tional in­stances in a fixed off­set such as 2.28cm. all seven wooden sticks will be grouped to­gether. the group pivot must be placed at the cen­tre of the ob­ject. this group will be in­stanced with the ar­ray func­tion and in­clude a fixed off­set and a ro­ta­tion off­set of 90 de­grees.


Colour vari­a­tion across all sticks now it is time to set up one ini­tial colour in the ma­te­rial edi­tor as osl colour. the tone will be some­thing be­tween brown and orange. the osl colour node will go into an osl lift/ gamme/gain node as in­put.

now it’s time to read out all the in­di­vid­ual ids with an osl node han­dle. Be­sides this node there must be also an osl ran­dom by in­dex node cre­ated. the lad­der in­put will be the osl han­dle node. the range will de­fine the colour vari­a­tion across the in­di­vid­ual wooden sticks. there­fore the ran­dom by in­dex node out­put must lead into the gamma in­put of the osl lift node.


Tile sep­a­ra­tion with gra­di­ents the pat­tern looks fine but for heav­ily used tiles it’s nec­es­sary to add more de­tail to sep­a­rate them. an osl uv Chan­nel node will help call the first uv chan­nel. af­ter­wards use an osl node filled with self-made code to cre­ate a gra­di­ent. this gra­di­ent will be con­nected with an osl add node in the sec­ond in­put called B. the first in­put must be con­nected with the lift/gamma node. the ad­di­tion can be con­trolled by chang­ing the scale pa­ram­e­ter. to slightly add the gra­di­ent it’s enough to re­duce the scal­ing for B un­til the vis­ual re­sult looks ac­cept­able.


Add the first layer pat­tern in the pro­ce­dural world a pat­tern comes from a pro­ce­dural noise – it’s the same in this tu­to­rial. an osl noise node will be the core of this step in com­bi­na­tion with an osl uv trans­form node. a per­lin noise must be scaled down to 0.1 with 3 oc­taves and a low step of 0.15. the value 0.8 will give a de­cent pat­tern. the uv chan­nel node must lead into the UVW in­put of the uv trans­form node. the Y tiling of the uv trans­form needs a smaller value like 0.35. the off­set of the uv trans­form will be con­nected with the ran­dom by in­dex node.


Pre­pare deeper wood pat­terns to cre­ate more in­ter­est­ing de­tails, you can cre­ate another osl (2d) noise node with ac­ti­vated per­lin noise con­tain­ing a scal­ing of 0.05. the uv in­put of the noise node must be con­nected with the uv trans­form node to achieve vari­a­tion on each ob­ject in­stance. Five oc­taves and an am­pli­tude of 3 will help to cre­ate good de­tail. the re­sult of the noise must be in­verted with an osl in­vert node. an osl tweak node will help to re­fine the pat­tern. as out­put minimum it is nec­es­sary to in­crease the value up to 0.65. the re­sult can be mul­ti­plied with the rest of the branch.

the uv in­put of the noise node must be con­nected with the uv trans­form node to achieve vari­a­tion on each ob­ject in­stance


Add more colour vari­a­tion now cre­ate another set of osl nodes: a ran­dom by in­dex node, fol­lowed by an uv trans­form and a noise node. the max val­ues at the ran­dom by in­dex node must be set to 360. the out­put of this node goes into the ro­tate in­put at the uv trans­form node where the tiling for xy is set to 0.0125. the out­put must be piped into the noise in­put. the noise is a per­lin noise with a scale of 0.8. Five oc­taves and an am­pli­tude of 3 will cre­ate a work­ing pat­tern. in ad­di­tion, the low and high step can be mod­i­fied for a more in­tense look.

the re­sult will be mul­ti­plied with the sec­ond wood pat­tern which is prop­erly masked and coloured


Com­bine the pre­vi­ously made steps all pre­vi­ously cre­ated branches must be com­bined to­gether in a way that en­ables easy mod­i­fi­ca­tions. at this step it is rec­om­mended to add two osl add nodes from the colour menu and one osl mul­ti­ply node – from the colour menu as well. the first osl add node will com­bine in in­put a, the plain colour in­clud­ing gra­di­ent and the first it­er­a­tion of wood pat­tern. the wood pat­tern scale must be re­duced to some­thing like 0.15. the re­sult will be mul­ti­plied with the sec­ond wood pat­tern which is prop­erly masked and coloured. that re­sult will be mul­ti­plied with the dark ar­eas where the dark ar­eas got a bright­ness cor­rec­tion.


En­hance the wooden sticks to give the wooden sticks in each mo­saic tile more char­ac­ter, arnold nodes can be com­bined with the osl graph. a cur­va­ture node with a ra­dius of 0.15 and an am­pli­tude of 1.5 must be piped into an osl in­vert node fol­lowed by an osl tweak node to make the out­put look a bit brighter. the black must be pushed up to a grey. the re­sult will be mul­ti­plied with an osl mul­ti­ply (Colour) node with the big graph. as a re­sult the in­di­vid­ual tiles ap­pear more vis­i­ble to the viewer.


Work on a proper spec­u­lar re­flec­tion the spec­u­lar re­flec­tion of the arnold stan­dard sur­face will get a full con­tri­bu­tion by set­ting the first pa­ram­e­ter to one. the rough­ness will be driven by an osl tweak node. the tweak node de­fines an in­com­ing value range and al­lows mod­i­fi­ca­tion of the in­com­ing val­ues with another fil­ter via a minimum and max­i­mum value. the spec re­flec­tion will be the re­flec­tion of the wood it­self with­out coat­ing. there­fore the tweak node will get, as in­put, the noise node from the darker ar­eas. at the tweak node the in­put max­i­mum must be set to 0.4 to get a nice con­trast.


Re­fine­ment of the spec­u­lar re­flec­tion up un­til now, only the darker and larger ar­eas were taken into ac­count in the spec­u­lar rough­ness. there are plenty of other de­tails like the wood pat­terns that must be in­cluded in the re­flec­tion rough­ness as well. let’s now cre­ate an osl add node. in­put a will be the tweak osl map for the darker ar­eas, which is al­ready con­nected to the rough­ness slot. in­put B will be an osl in­vert node, of which the in­put is the osl noise node from the pre­vi­ous step. the re­sult will be piped into the spec­u­lar re­flec­tion rough­ness.


En­hance­ments from pro­ce­dural bumps to give the ma­te­rial much more re­al­ism apart from the base colour ap­pear­ance and spec­u­lar re­flec­tion, ac­ti­vate the coat re­flec­tion. as coat re­flec­tion rough­ness works best with the cur­va­ture node, and this re­moves the re­flec­tion on the borders of the wooden sticks. af­ter­wards an arnold Bump 2d node will help to con­vert the osl noise from the first wooden pat­tern to a bump map. the in­ten­sity of the bump map can be re­duced to 0.25 be­fore it will be plugged in the nor­mal slot of the arnold stan­dard sur­face. that will give the mo­saic tile re­flec­tion much more vis­ual qual­ity.

the spec­u­lar re­flec­tion of the arnold stan­dard sur­face will get a full con­tri­bu­tion by set­ting the first pa­ram­e­ter to one


Com­bine re­flec­tion with colour lay­ers now fine-tune the coat re­flec­tion against the bump layer and the spec­u­lar re­flec­tion. an in­ten­sity value of 0.5 for the coat layer against a value of 1 for the spec­u­lar will guar­an­tee a proper mix­ture of both spec­u­lar de­tails. at this stage the colour of the wooden tiles can look like raw beech, but on most par­quets there is a spe­cial coat­ing on top, which is a warmer colour most of the time, like a mix­ture of brown and ochre. this coat layer colour can be achieved by adding osl mul­ti­ply node from the colour menu.


Ad­just bump in­ten­sity per in­stance the bump in­ten­sity is work­ing fine but it is too uni­form across the whole ground. time to break this up. You must now cre­ate another osl ran­dom per in­stance node with a value range from 0.05 up to 0.25. this ran­dom per in­stance node will drive the height pa­ram­e­ter at the arnold bump 2d node, which is con­nected with the nor­mal slot of the stan­dard sur­face. the pat­tern should look now more nat­u­ral and worn out. there should be some spots that are more worn, and some spots that are less but they should still match the over­all style.


Cre­ate masks for colour dis­coloura­tions at this stage it’s time to add some small dark dis­coloura­tions with some round shapes to break the lines from the wood pat­terns. now cre­ate three osl nodes: ran­dom by in­dex, uv trans­form and noise. the ran­dom per in­stance node will get a range from 0.05 up to 1 but for the Y axis use a value around 10 to main­tain proper scal­ing. this node must be piped into the off­set in­put of the uv trans­form with a tiling of 1 but for Y around 6. the noise scal­ing must be 0.25 with sim­plex as type and be­tween a low step of 0.4 and a high step of 0.5.


Seam­less tran­si­tion of dis­coloura­tions the noise must be in­verted with an osl in­vert node from the colour menu. af­ter­wards, you can con­trol how dark the dots should be by adding a new osl tweak node. With a brighter out­put minimum the dots will ap­pear lighter. if the vis­ual ap­pear­ance is just fine and matches old wood, it’s time to add the dots by us­ing an osl mul­ti­ply node on the base colour branch. the last colour cor­rec­tion must be mul­ti­plied with the dots to show all de­tails on the wood. if you want more con­trol over the dot ap­pear­ance, the oc­taves for the noise are im­por­tant for mod­el­ling de­tails.

Newspapers in English

Newspapers from UK

© PressReader. All rights reserved.