your smart­phone is a ma­te­rial scan­ner

An­thony Salvi teaches you how to cre­ate scanned 3D ma­te­ri­als us­ing a DIY Light­box, a smart­phone and Sub­stance De­signer 6

3D World - - CONTENTS - Down­load your re­sources For all the as­sets you need go to

Cre­ate 3D scanned ma­te­ri­als with a DIY light­box

t he power of ma­te­rial scan­ning can­not be over­stated. When done prop­erly, it is the most ac­cu­rate way to dig­i­tally re­pro­duce a phys­i­cal ma­te­rial avail­able to us to­day. For a long time, how­ever, the only way to ac­cess it was with a high-end scan­ner, which many peo­ple in the 3D com­mu­nity do not own.

Al­le­gorith­mic couldn’t buy ev­ery­one a scan­ner, but we could open up the tech­nol­ogy to more peo­ple. And the ex­cit­ing thing is, the re­search has paid off. In Fe­bru­ary we launched Sub­stance De­signer 6, which in­cluded a com­plete scan pro­cess­ing work­flow that fi­nally en­ables any­one with a smart­phone to scan phys­i­cal ma­te­ri­als.

In this tu­to­rial, I will de­scribe each step of the scan­ning process, from the pho­to­shoot to the fi­nal Sub­stance, in­cor­po­rat­ing in­sights that we’ve learned over the last few years.

We will start with the con­cept of ma­te­rial scan­ning. Next, we will move on and learn how to build a com­plete cardboard light­ing setup. From there, I’ll de­scribe how to cap­ture the ma­te­rial with a smart­phone and how to post­pro­cess the re­sult.

For our next step, I’ll go into the node-based scan­ning process in­side Sub­stance De­signer.

To fin­ish, I will demon­strate how to con­vert this scanned ma­te­rial into a hy­brid ma­te­rial with the help of Sub­stance.

I re­ally hope you en­joy fol­low­ing this tu­to­rial and have fun with your first smart­phonepow­ered ma­te­rial scan!

01 the con­cept of Scan­ning

Think of your ma­te­rial at the scale of a moun­tain. If the sun turns around the moun­tain, we can see the shape of the shad­ows cast in black. These shapes rep­re­sent the in­di­rect in­for­ma­tion about the re­lief of the moun­tain it­self. If we com­bine enough in­for­ma­tion, the al­go­rithm can cal­cu­late the re­lief. We need to turn the light eight times at the same dis­tance around our ma­te­rial.

02 Gear

To keep our ex­per­i­ment cost-ef­fec­tive, let’s use some cardboard, a stack of trac­ing pa­per sheets and a LED light for our light­ing setup. My pre­ferred LED light is made by Man­frotto. For the im­age cap­ture, it’s im­por­tant to at­tain the best process pos­si­ble, so for our tu­to­rial we used an iphone 7 and the Adobe Light­room mo­bile app. This app en­ables you to cap­ture in the RAW (un­com­pressed) for­mat on IOS and An­droid. Other apps like Pro­cam or Cam­era FV-5 will work as well. Fi­nally, we need a colour chart from X-rite.


Our Scanbox, mean­ing the in­te­rior area where the scan will oc­cur, is de­signed to cap­ture a large amount of de­tails from a ma­te­rial that mea­sures up to 10cm x 10cm with opac­ity. We’ll also need a box to go around the in­te­rior, which in our case will be a 27cm x 22cm x 15.5cm cardboard box. It’s a good idea to cover the in­te­rior faces in white.

To re­tain the abil­ity to cap­ture the opac­ity of a ma­te­rial, we will cut a square hole (10cm x 10cm) at the cen­tre of the box and place a stack of six sheets of trac­ing pa­per on top of it to dif­fuse the light through the ma­te­rial. On top of the pa­per, we’ll add a Scan­ning Chart to help us dur­ing the cap­ture and in post. This chart is black to re­duce the light­ing bounces from our LED light onto our ma­te­rial sam­ple. We’ll also add some shapes (like a square, tri­an­gle, moon and star) at the eight an­gles. These shapes are used by the pho­tomerge process in Pho­to­shop to pro­duce a fast and ac­cu­rate merg­ing of the scan com­po­nents.

04 make A light­box

The Light­box is de­signed specif­i­cally for our Scanbox. All faces in­side the Light­box should be white, while the out­side faces should be black. To build this DIY Soft­box, use four white foam boards (50cm x 50cm x 3mm), three black foam boards (50cm x 50cm x 5mm), two black pa­per sheets (42cm x 59.4cm) and a Scotch tape roll. Cut the Scanbox on six foam board el­e­ments, plus one pa­per tracer sheet. On the back, cut a door to put the LED light in­side. The dif­fuse part is cre­ated by a trac­ing pa­per sheet.

05 cre­ate A STAND

To keep this project cost-ef­fec­tive, use a sim­ple cardboard tube with a foam core plate to cre­ate a stand for your smart­phone. To max­i­mize the fi­nal frame, cal­i­brate the stand size to the size of the box. Next add a black pa­per sheet to re­move all po­ten­tial colour bounces com­ing from the cylin­der. Fi­nally, at­tach your smart­phone with four pieces of reg­u­lar Scotch tape.

06 Fi­nal Setup

Here is our fi­nal setup with our smart­phone, stand, Scanbox and Light­box. Note: this setup is a recipe – you can cre­ate your own and en­hance it how­ever you want. You can switch the smart­phone to a DSLR, or switch the LED light by us­ing a wire­less flash. It’s up to you and your bud­get.

07 pho­to­shoot

In this tu­to­rial, I’m go­ing to fo­cus on the cap­ture process for a com­plex sports­wear fab­ric from Tex-ray, a ma­te­rial man­u­fac­turer. To do this, we need to make sure that the only light on our ma­te­rial is com­ing from the Light­box. If the shadow cast is wrong, you’ll have to deal with an er­ro­neous com­pu­ta­tion dur­ing post-pro­cess­ing. So, just close the win­dows or cur­tains to darken the room and elim­i­nate as much am­bi­ent light as pos­si­ble. Then turn on your LED light and place it in­side the Light­box. Next, place the fab­ric on the Scanbox. Be sure the ma­te­rial is not cover­ing the lit­tle shapes in the Scan­ning Chart. The fab­ric needs to fit per­fectly in­side the 10cm x 10cm square.

Next, clean your sam­ple, as dust or hair will of­ten fall onto the ma­te­rial. The most im­por­tant thing is to not move the ma­te­rial sam­ple dur­ing the shoot. If the ma­te­rial is moved, the pho­tomerge can­not be done cor­rectly. Once ev­ery­thing is set, it’s time to cap­ture the ma­te­rial. Set the LED light­ing power to max­i­mum. Make sure you have enough bat­tery power (smart­phone and LED light) and that the LED light doesn’t be­come too hot. Dur­ing the shoot, it’s im­por­tant to keep the same fram­ing as much as pos­si­ble. How­ever, don’t panic if your pic­tures are not per­fectly aligned. It’s more im­por­tant to keep all of the shapes (square, tri­an­gle, moon, star) present on the Scan­ning Chart vis­i­ble in your im­ages.

08 mo­bile cap­ture

With Adobe Light­room mo­bile, you have two op­tions. You can use the PRO mode and man­u­ally set up your shot, or use the HDR mode. Both de­liver good re­sults. In the PRO mode, turn the flash off, ac­ti­vate the DNG for­mat, set the ISO as low as pos­si­ble (be­tween 25 to 100) and set the White Bal­ance to Day­light.

To avoid mo­tion blur, keep a speed around 1/50 sec and ad­just your ISO to get a good ex­po­sure. It can be help­ful to add the grid and the level on screen for fram­ing the shot. You can also add a timer for five sec­onds to act as a re­mote trig­ger for cap­tur­ing the im­age. This will pro­vide a more sta­ble re­sult as man­u­ally touch­ing the shut­ter but­ton on the cam­era can in­ad­ver­tently add a shake, which may pro­duce a blur­rier im­age.

If you have an Adobe Creative Cloud ac­count you can im­port your im­ages into your Adobe Light­room desk­top li­brary us­ing your Wi-fi or 4G con­nec­tion.

09 Shoot A Grey card

Dur­ing the cap­ture, it’s al­ways a good idea to neu­tralise the colour shift com­ing from the light­ing. By na­ture, all lights have a colour tint with some tints stronger than others. For ex­am­ple, a can­dle is red, a tung­sten bulb is or­ange, the sky is blue. To neu­tralise this colour and keep colour con­sis­tency, a Colorchecker is re­quired. Ba­si­cally, it’s a ref­er­ence, with a greyscale printed and cal­i­brated. In post-pro­duc­tion we’ll ad­just the cap­tured grey colour with Light­room’s White Bal­ance tool. In this ex­am­ple we have only one light source, so one pic­ture with the grey card is re­quired. You can find a grey card eas­ily in a photo sup­ply store, or on the web. X-rite, Dat­a­color, QP Card or Whibal all pro­duce great White Bal­ance tar­gets.

10 cap­ture A multi-an­gle light

The next step is to take eight pic­tures, with the Light­box around the Scanbox (an­ti­clock­wise). We start with the Soft­box in the num­ber 1 side of the Scan­ning Chart. The smart­phone is in front of the num­ber 7.

We then take a pic­ture and check the ex­po­sure and sharp­ness. If ev­ery­thing is okay, we move the Light­box to the num­ber 2 of the Scan­ning Chart. We re­peat this process up to the fifth pic­ture. Now we in­vert our po­si­tion with the smart­phone in front of the num­ber 3. Now that we’ve com­pleted this process, this step is fin­ished.

11 cap­ture the opac­ity

For opac­ity, open the cur­tains or turn the room lights on, and set up the LED light in­side the Scanbox. With the LED light at a lower power, you’ll have enough back­light to cap­ture the opac­ity. For a bet­ter light dif­fu­sion, you can also add white pa­per on the in­side, with the light cen­tred in the mid­dle of the Scanbox. A foam core with a hole works well.

12 post-process All im­ages

Next, we im­port our im­ages into the desk­top ver­sion of Light­room. Once loaded, se­lect the Colorchecker im­age for the LED light and use the White Bal­ance tool. Just click on the mid­dle grey ex­am­ple. Next, set the Whites, Blacks and Clar­ity pa­ram­e­ters at 0. Then copy and paste the pa­ram­e­ter value to the eight an­gle im­ages. For the opac­ity im­age, use the gra­di­ent tool in Light­room to re­duce the vi­gnette ef­fect. For the last step, ex­port all of the im­ages as TIFF 16-bit us­ing the Adobe 1998 ICC pro­file.

13 Do A pho­tomerge

Us­ing the pho­tomerge fea­ture in Adobe Pho­to­shop, it’s pos­si­ble to merge and align the scan im­ages. Just load your nine pic­tures in pho­tomerge and uncheck the Blend Im­ages To­gether op­tion.

Af­ter that, add a solid black layer at the bot­tom of the layer stack and crop your im­age on a square, re­siz­ing it to 4,096 pix­els. Fi­nally, ex­port your layer stack in a new in­di­vid­ual TIFF 16-bit file with the Re­move Lay­ers op­tion. If you set up a stronger stand with ad­di­tional ac­ces­sories, this pho­tomerge is not nec­es­sary, just crop your im­ages in Light­room in 4K.

14 cre­ate An Au­thor­ing ma­te­rial

It’s time to con­vert our im­ages into a PBR ma­te­rial. Open Sub­stance De­signer 6 (a 30-day trial of the lat­est ver­sion is avail­able at­le­gorith­ and start by cre­at­ing a new Sub­stance file us­ing the Phys­i­cally Based (Metal­lic/rough­ness) tem­plate set to 4,096 x 4,096. Right-click on the Sub­stance name, then se­lect Link menu>bit­map to link the nine pic­tures to our project.

15 Se­lect A crop

Af­ter a drag and drop from our re­source im­ages in the graph node win­dow, hit the space­bar in the graph view and type ‘Multi Crop’ to add the scan­ning node. With the pro­ce­dural ap­proach, you can eas­ily test dif­fer­ent crops for a bet­ter tiling. In our case, just tar­get the cen­tre of the fab­ric and make sure you have enough space to cover at least a com­plete pat­tern. Set the In­put Count to 8 and the In­put Size to 4,096 on X and Y. To view and edit the crop, dou­ble-click on the last node out­put named Area on a fly­over mouse.

16 cre­ate the nor­mal

In the same way, add the Multi-an­gle to Nor­mal node. Set the Nor­mal For­mat to Di­rectx (if needed), then set the value of Sam­ple Amount to 8, In­ten­sity to 1, First Sam­ple Light An­gle to 0.5/180 and the Next Sam­ple Light An­gle to Coun­ter­clock­wise. Next con­nect the first eight out­puts from the Multi Crop to the Multi-an­gle to Nor­mal node. To re­move the slightly nor­mal vari­a­tion, add a Color Equal­izer node af­ter your Multi-an­gle to Nor­mal node.

17 make the colour map

Once the Nor­mal is set, we can work on the colour map. For the Base Color, we have a node named Mul­tian­gle to Albedo. Add it in the graph from the Li­brary or with the space­bar short­cut. There are only two sam­ples – the an­gle num­ber 1 and 5. If you want to use less than eight sam­ples, just al­ways se­lect the op­po­site an­gles.

18 cre­ate the opac­ity map

We have a spe­cific im­age for this opac­ity map. Af­ter a drag and drop from our re­sources, copy-paste the Multi Crop node and re­duce the In­put Count to 1. In do­ing this, you’ll be synced with the other maps.

Af­ter this node, add a Grayscale Con­ver­sion node, then a His­togram Scan node to push the con­trast and pro­duce a clean mask.

Next, put a Blur HQ Grayscale node to add a lit­tle soft­ness on the mask. To con­trol the amount of opac­ity, use this mask in a Blend node with two Uni­form Color nodes as the in­puts. All of these nodes are quickly avail­able through the space­bar short­cut.

19 make it tile

The Smart Auto Tile is a new node that can be found via Li­brary>ma­te­rial Fil­ters>scan Pro­cess­ing. You can plug the Color map, Nor­mal map and Opac­ity map into the three avail­able in­puts. One trick is to use the Height in­put for the Opac­ity map. As with the Multi Crop node, the last out­put is the pat­tern viewer/ed­i­tor.

20 ADD A height map

One map that’s miss­ing is the height or dis­place­ment map. By adding a Nor­mal to Height HQ node, we can con­vert our Nor­mal map to a Height map. Con­nect the Nor­mal out­put from the Smart Auto Tile node to this Nor­mal to Height HQ node. Since we set up the Multi-an­gle to Nor­mal on Di­rectx for­mat, do the same for the Nor­mal to Height HQ node. Play with the Re­lief Bal­ance and Height In­ten­sity to find a good bal­ance. Turn the Qual­ity to High.

21 Set the metal­lic map

In the Dis­ney PBR shader, we have to set pa­ram­e­ters for our ma­te­ri­als, choos­ing which will be di­elec­tric and which will be metal­lic. It’s re­ally use­ful when only one tex­ture set cov­ers mul­ti­ple ma­te­ri­als, like you would find in a char­ac­ter. With this in­for­ma­tion the shader can ap­ply a dif­fer­ent be­hav­iour.

22 ADD the rough­ness map

The fab­ric is com­posed by the same base ma­te­rial. This tex­tile has no ag­ing ei­ther. In this case, we can sup­pose the Rough­ness is uni­form. As with the metal­lic, you will also use a uni­form colour set to Grayscale, but here, the value de­pends on what you ob­serve when you ma­nip­u­late the fab­ric un­der the light. I set the value at 70.

23 ADD more out­puts

Like be­fore, press space­bar in the graph view and write ‘Out­put’. Then set one with the Opac­ity Us­age. The sec­ond will be used for the Spec­u­lar Level. With the Metal­lic/rough­ness def­i­ni­tion, when the Metal­lic is set to 0, the ma­te­rial is un­der­stood to be a di­elec­tric, and the re­flectance value at the Fres­nel zero an­gle or f0 is set to 4% re­flec­tive. The Spec­u­lar Level can be used to over­ride the de­fault 4% value used in the metal­lic/rough­ness def­i­ni­tion. For this ma­te­rial, a Spec­u­lar Level at 80 was per­fect.

24 cre­ate A run­time ma­te­rial

Our ma­te­rial is big, en­cap­su­lat­ing nine 4K, 16-bit im­ages. This is a huge amount of data if you want to ex­port your Sub­stance, use it in another 3D pack­age, or even share it with your friends or team mem­bers as a down­load­able file.

One so­lu­tion is sim­ply to ex­port the Base Color, Nor­mal and Opac­ity maps.

25 Dive into the hy­brid world

It might be nice to go fur­ther and change the colour of your ma­te­rial, or add a pat­tern on top of it. This is where hy­brid ma­te­ri­als come in. In the next steps, we’ll learn how to cus­tomise our scanned ma­te­rial us­ing the hy­brid tech­nol­ogy within Sub­stance De­signer.

26 match the colour

One of the best nodes for the hy­bridi­s­a­tion process is the Color Match node. You can find this node in the Li­brary, un­der Fil­ters>ad­just­ments. This node en­ables us to re­place a source colour with a tar­get colour. With a lot of con­trols for the colour vari­a­tion and the mask cre­ation, it’s a very ef­fi­cient node.

As you can see in this ex­am­ple, you can re­place the yel­low with a nice blue colour. This op­er­a­tion is clean with­out the loss of any fine de­tails.

27 cre­ate A pro­ce­dural pat­tern With the help of the Color Match node, the fab­ric now has two colours. Let’s com­bine them with a pro­ce­dural pat­tern.

In Li­brary>gen­er­a­tors>pat­terns you have a lot of ba­sic com­po­nents. In this ex­am­ple, we used the Poly­gon 1 node. Just drag and drop the node from the Li­brary to the graph view to start. This node is in­ter­est­ing due to its spe­cial Ex­plode pa­ram­e­ter. You can play around for hours and cre­ate hun­dreds of dif­fer­ent vari­a­tions with an artis­tic look. For this tu­to­rial, we have set up this node to cre­ate a dou­ble tri­an­gle pat­tern around a cir­cle.

28 ADD re­al­ism

A good ma­te­rial is of­ten one that’s close to re­al­ity. In our case, that means close to the in­dus­trial process. We can imag­ine our pat­tern like a printed colour on top of a fab­ric.

To cre­ate that ef­fect, use the Nor­mal map to cre­ate some vari­a­tions on the pat­tern. Un­der the Li­brary>fil­ters>ef­fects we find the Vec­tor Warp node for Grayscale in­put. Then plug in the node, the pat­tern and the Nor­mal map. Set the in­ten­sity and put the Vec­tor For­mat in Di­rectx. Next, add a Blur HQ Grayscale for a soft touch.

29 Blend­ing

A pro­ce­dural ap­proach fits well with the blend­ing con­cept, as it en­ables us to cre­ate masks from nodes, and then keep a blend con­sis­tency through­out our work. Any pat­tern changes made dur­ing it­er­a­tions will be re­flected in the mask. To sim­u­late a painted pat­tern on top of our fab­ric, we have to use our pat­tern as a mask.

30 ADD more con­trol

Sub­stance is in­cred­i­ble for con­trol­ling each as­pect of a ma­te­rial. One of these as­pects is the Nor­mal In­ten­sity. We have the abil­ity to fine-tune our Nor­mal and Height in­ten­sity and ad­just their force by us­ing a Nor­mal Blend node and a Nor­mal Color node. The Nor­mal Blend node is set with an Opac­ity at 1 and Use Mask at True. The Nor­mal Color node is set at 0. To con­trol the blend­ing, a Uni­form Color node set in Grayscale is re­quired.

31 pub­lish our Sub­stance

To fin­ish our work and cre­ate a Sub­stance with a hy­brid ma­te­rial, we have to ex­pose some of the pa­ram­e­ters. In do­ing this, you keep the abil­ity to mod­ify the ma­te­rial with­out any ac­cess to the node graph. You can ex­pose the Tar­get Color in the Color Match node. To ex­pose a node’s pa­ram­e­ter, click on the sine graph icon at the right of the pa­ram­e­ter name and choose Ex­pose.

32 play with your ma­te­rial

It’s now time to use your ma­te­rial in a project! Here is an ex­am­ple of the ma­te­rial ap­plied to a run­ning shoe. Ren­dered in Sub­stance De­signer with Iray, this .SBSAR file can be loaded by 3ds Max, Maya, Modo, Cinema 4D, Adobe Fuse, iclone, Hou­dini, Un­real En­gine 4, Unity and Lum­ber­yard.

If your ap­pli­ca­tion is not in this list, you can al­ways ex­port your tex­ture set (Base­c­olor, Nor­mal, Height, Rough­ness, Metal­lic, Opac­ity, Spec­u­lar Level and so on) from any Sub­stance tool and use it in your shader.

Scan AND ADAPT ma­te­ri­als here is our fi­nal re­sult: a hy­brid ma­te­rial based on our scans. the ren­der is achieved in Sub­stance De­signer with iray.

Newspapers in English

Newspapers from Australia

© PressReader. All rights reserved.