PIPE­LINE TECH­NIQUES: Cre­ate easy Fab­ric Shaders with V-ray

3D Artist - - CONTENTS -

Olga Rudi gives us es­sen­tial cloth shader tech­niques

cre­at­ing be­liev­able cloth shaders can be tricky, time-con­sum­ing and just straight up con­fus­ing. in many pro­duc­tion en­vi­ron­ments, each tex­ture is in­di­vid­u­ally crafted by skilled artists us­ing high-res­o­lu­tion pho­to­graphs as ref­er­ence. in this tu­to­rial, we will go through the process of cre­at­ing be­liev­able cloth shaders us­ing V-ray, Thunderloom, and Maya. Thunderloom is a free plugin for V-ray cre­ated in col­lab­o­ra­tion with the cg depart­ment at ikea, which is re­spon­si­ble for a sig­nif­i­cant por­tion of the im­ages in the ikea cat­a­logue. it is used to pro­duce wo­ven fab­ric, and it gives the ul­ti­mate flex­i­bil­ity over con­trol­ling each pa­ram­e­ter of the fab­ric such as yarn size, bend, twist and more with­out the need of bring­ing the ex­ter­nal maps in. This is a step-by-step tu­to­rial where i will show you my way of mak­ing a soft cot­ton fab­ric, but all tech­niques can be fur­ther im­ple­mented to cre­ate al­most any other type of wo­ven fab­ric.


Know your fab­ric The two main ways fab­rics are made by weav­ing or knit­ting. As a rule of thumb, if the ma­te­rial is soft, then it is most likely to be knit. Typ­i­cal ex­am­ples of knit fab­ric in­clude T-shirts, socks and so on. Knit pat­terns can vary dra­mat­i­cally in size, and while the knit pat­tern on a sweater is easy to see, some knit pat­terns can be min­i­mal. here is the close-up ex­am­ple of a knit hoodie (right, pink) and twill jacket (left, white). Plain weave ex­am­ples are satin, twill (jeans, over­alls), linen. You will need to know ex­actly what type of fab­ric you want to make in or­der to re­pro­duce it prop­erly.


Pre­pare the scene As with ev­ery tex­tur­ing process, your model needs to be un­wrapped and lit. Also, don’t for­get to in­stall and turn the Thud­er­loom plugin on. You can get the plugin on Github.

To start cre­at­ing the ac­tual fab­ric we will need a Weave in­for­ma­tion File (WIF). You can ei­ther cre­ate it your­self or buy it, but i sug­gest down­load­ing a free pack on ‘Light col­lab fo­rum’ un­der the Thunderloom sec­tion. in that pack, you will find two fold­ers con­ve­niently bro­ken down into knit and weave WIF files. Once you have that, open up hy­per­shade and cre­ate a Thunderloom ma­te­rial.

The first pa­ram­e­ter you will see is a pat­tern and browse file. That is where we put our WIF file. click browse and nav­i­gate to a folder where you can choose your PTN file. For this ex­am­ple, select Knit A 1s1p 10x10.


Un­der­stand the set­tings There are seven dif­fer­ent set­ting you can tweak: diffuse colour,

bend, yarn size, twist, spec­u­lar strength, spec­u­lar noise and high­light width. We will be us­ing Thunderloom as a spec­u­lar shader when com­bined with V-ray, so bring the sat­u­ra­tion on each Diffuse sec­tion all the way down and bump spec­u­lar strength all the way up. Bend con­trols the cur­va­ture of each thread seg­ment be­tween its ends, mak­ing a value of 0.5 a per­fect torus loop. This is use­ful for satin fab­rics, where de­creas­ing this value re­sults in a ‘flat­ter’ out­come. Yarn size con­trols the ra­dius of the thread. The value of 1 will re­sult in no gaps be­tween thread seg­ments, there­fore it is usu­ally a good idea to keep it at 0.8. Twist con­trols how much the threads are twisted around each other, and es­sen­tially acts as a rough­ness pa­ram­e­ter. spec­u­lar noise con­trols the amount of noise added to high­lights. high­light Width con­trols the width of the spec­u­lar re­flec­tion on the thread. The com­mon sense be­tween most of these set­tings is: the big­ger num­ber, the softer re­sult. here you can see the dif­fer­ence be­tween lower twist value 0.3 and higher twist value 0.8


Make it work for you now that we un­der­stand what each set­ting does, it’s time to set up the ac­tual shader. First you need to ad­just is size. i usu­ally change this to 60 to 100 de­pend­ing on how much de­tail i want to show in my scene. To make a soft fab­ric, we need to bump twist and high­light width up. These are my set­tings: scale at 75, Bend at 0.5, Yarn size at 0.8, Twist at 0.8, spec­u­lar strength at 1.0, spec­u­lar noise at 0.7 and high­light Width at 0.8. i usu­ally keep set­tings con­sis­tent on yarn types (ex­cept for diffuse), but you can vary them slightly. To give you an ex­am­ple of what each set­ting does, for the satin fab­ric i changed Pat­tern to satina-5h, Bend to 0.3, Twist to 0.15, spec­u­lar noise to 0.1 and high­light Width to 0.2.


V-ray shader setup Once we are done with Thunderloom, it is time to set up our base V-ray shader. cre­ate a sim­ple V-ray Mtl node. Leave a diffuse colour for now but bring the amount down by 0.8. Make rough­ness a higher value; usu­ally, 0.5 value works good for fab­ric but for our shader, bring it up to 0.7. This will give us a nice and smooth base to start off with. in the re­flec­tion sec­tion, change Brdf type to Blinn. Leave out re­flec­tion and re­frac­tion, as you re­mem­ber we are us­ing our Thunderloom shader for that. change Fres­nel IOR to 1.33 and Anisotropy to 0.25. name this shader ‘V-ray Base’.


Add sheen now that we’ve set up out V-ray shader, we need to make it look like fab­ric. To do that we are go­ing to put a falloff node in the diffuse sec­tion. cre­ate a falloff node and mid­dle-mouse drag it into V-ray diffuse sec­tion. There are three pa­ram­e­ters we need to change in the falloff: front and side colour, and falloff type. choose your de­sired fab­ric colour for the front colour.

To add that fab­ric feel make the side colour a lit­tle bit lighter than the front one.

The lighter you make it, the softer it will feel. Fi­nally, the most im­por­tant set­ting is to change the falloff type to per­pen­dic­u­lar/par­al­lel.

Don’t for­get to make test ren­ders!


Com­bine shaders For our fi­nal step, we will need to com­bine our V-ray Ma­te­rial with Thunderloom. To do that we will need to cre­ate a blend node (blend Mtl). Drag V-ray shader in the base ma­te­rial sec­tion with the mid­dle-mouse but­ton. Put Thunderloom ma­te­rial as a cover. We will also need to turn Ad­di­tive mode on.

What it does is blend two ma­te­ri­als to­gether equally. if you de­cide to turn the blend node off, it will put one ma­te­rial (coat) on top of the other (base). You might also want to change the colour of the blend.

The de­fault set­ting is grey, but you can change it to the cho­sen colour of your fab­ric to make it more vi­brant. name this shader Fab­ric Blend.


Add stitches To add stitches, you need to cre­ate a mask in Pho­to­shop first. The best way to do it is with a pen tool. Draw a path and fill it with the dot­ted line stroke. save it as a black-and-white im­age and ap­ply as a bump in you V-ray base ma­te­rial with a re­duced mul­ti­plier (0.3 in my case). cre­ate a new Thunderloom ma­te­rial and select stitch Fibers as a Pat­tern. As with the pre­vi­ous ex­am­ples, re­duce sat­u­ra­tion and make spec­u­lar strength 1. cre­ate a new blend node. Put V-ray Base ma­te­rial as a base and new Thunderloom stitch ma­te­rial as a coat with ad­di­tive on, name it ‘stitch Blend’. cre­ate an­other, fi­nal blend ma­te­rial. Put Fab­ric Blend as a base and stitch Blend as a coat, this time with ad­di­tive off. in the blend amount, put the mask you cre­ated for stitches.

Newspapers in English

Newspapers from UK

© PressReader. All rights reserved.