Sculpt a Tank in vr, part 2: Tex­tur­ing

In this se­cond chap­ter on hard-sur­face sculpt­ing in VR, Martin Ne­be­long shares his work­flow for tak­ing mod­els fur­ther us­ing ‘tra­di­tional’ 3D pack­ages and tex­tur­ers

3D World - - CONTENTS - Martin ne­be­long Martin is a free­lance artist liv­ing in Den­mark. He has been work­ing as a 2D artist for 15 years, but since he got his VR head­set, 3D is be­com­ing an in­creas­ingly big­ger part of his work.­sta­­tin­ity

Part 2 of Martin Ne­be­long’s tu­to­rial ex­plores how to add de­tails and tex­tures to a Vr-sculpted model

wel­come to part two of this tu­to­rial se­ries, demon­strat­ing how to sculpt a hard-sur­face model in vir­tual re­al­ity and then take it to a fin­ished level out­side of VR.

Last is­sue, in part one of the tu­to­rial, we sculpted a tank in Ocu­lus Medium. In this part we will talk about how to un­wrap, tex­ture and then set that model up for ren­der­ing.

A lot of peo­ple have asked me whether or not sculpt­ing in VR can be seen as any­thing but a gim­mick, and if it could ac­tu­ally be used as part of a pro­fes­sional pipe­line. Hope­fully this tu­to­rial will help to un­der­line just how use­ful VR sculpt­ing ac­tu­ally is as a pipe­line tool.

The first part of this chap­ter will be about how you op­ti­mise your model in Zbrush and get it ready for UVS. This could also be done in 3D-coat, Blender or what­ever 3D pack­age you’re most com­fort­able with.

Then I’ll go over how I use Ri­zomuv (for­merly Un­fold3d) for al­most fully au­to­mated un­wrap­ping. Be­cause hon­estly, I can’t think of any­thing less ex­cit­ing than hav­ing to man­u­ally un­wrap a model!

Then I’ll talk about how to tex­ture that model us­ing Sub­stance Pain­ter, and fi­nally I’ll briefly go over the process of get­ting the tex­tured model into a ren­derer.

01 im­port to zbrush

In part one of the tu­to­rial I ex­ported my tank as an FBX model. If you didn’t fol­low the first chap­ter, you can ap­ply the steps in this tu­to­rial to any high-res model that you want to un­wrap and tex­ture.

To im­port an FBX to Zbrush, go to the Zplu­gin menu and choose the FBX im­porter. Lo­cate your file and hit Im­port. Once im­ported drag your model into the view­port and press ‘T’ to en­ter edit mode.

02 ro­tate and tweak

Once you’ve im­ported your model to Zbrush you should make sure the model aligns to the floor plane. To do this, turn on the floor plane and use the ro­tate gizmo to ro­tate the model. If your model con­sists of mul­ti­ple subtools, make sure Trans­pose All Se­lected Subtools is turned on. You can find this tog­gle right above your trans­form gizmo.

If your model is ro­tated on an an­gle di­vis­i­ble by 5 com­pared to the floor, you can hold down Shift to ro­tate in in­cre­ments of 5.

03 poly­groups

If you ex­ported your model as an FBX file, you should al­ready have the subtools (lay­ers) that you need. If so, you can skip this step, and also the Split step.

If you’ve ex­ported your model in OBJ for­mat how­ever, you’ll have to break it up into fit­ting subtools. To do this, go to the Poly­groups sub­menu and select Auto Groups. This will make sure all in­di­vid­ual poly­gon parts are as­signed a unique poly­group. If you have a lot of sim­i­lar parts and want them in the same poly­group, select Merge Sim­i­lar Groups.

If you want to merge groups man­u­ally, you can ei­ther jump ahead to the next step and then merge the au­to­groups one by one in the subtool stack, or you can select the draw tool (‘Q’), and Ctrl+shift-click the first group you want to merge. This iso­lates the group. Then you Ctrl+shift-click it again which hides this group and shows the oth­ers. Now ev­ery time you Ctrl+shift-click a group, it’s hid­den along with the first group. Then when you’ve hid­den all groups you want to merge, Ctrl+shift-drag out­side the model to in­vert your se­lec­tion. You should now see the groups you want to merge. To as­sign a new poly­group to this se­lec­tion, select Groupvis­i­ble in the Poly­groups menu, or press Ctrl+w. Re­mem­ber to show the poly­groups in the view­port by en­abling Draw Polyframe in the tool­bar to the right of your view­port.

04 split

Next up we want to split all poly­groups into ‘lay­ers’ or subtools as they’re called in Zbrush. To split your poly­groups, select the Groups Split func­tion un­der the Split menu. Once you’ve done this, you might want to merge some lay­ers if it makes sense in terms of the later UV and tex­tur­ing process. So for ex­am­ple, a knight in shin­ing ar­mour could have all ar­mour parts merged, so that those parts would need only one tex­ture.

05 pre­pare to dec­i­mate

Meshes ex­ported at 100% qual­ity from VR are of­ten quite poly­gon heavy, due to the na­ture of Medium and Master­piecevr, which are the VR sculpt­ing tools I use the most. Your ex­ported mesh will have the same den­sity in all of your model, un­less you de­cide to dec­i­mate au­to­mat­i­cally when

you ex­port, which you can in both Medium and Master­piecevr. I usu­ally do this step in Zbrush though, be­cause I like the added level of con­trol you have here. You can dec­i­mate across the whole model, or in­di­vid­u­ally per subtool.

To dec­i­mate your mesh in Zbrush, first make a copy of your tool by click­ing Clone in the Tool menu. The clone will be our high-res model, and the cur­rent one will be the low-res model.

06 dec­i­mate

Go to Zplu­gin>dec­i­ma­tion Master and select Pre-process All or Pre-process Cur­rent depend­ing on the level of con­trol you want over in­di­vid­ual subtools.

Select the level of dec­i­ma­tion you want. The lower you can get the point count, the bet­ter in terms of mak­ing un­wrap­ping a breeze, but make sure you don’t lose too much de­tail. Es­pe­cially when you look at the sil­hou­ette of the model, you should try and keep it as close to the orig­i­nal as pos­si­ble.

The ex­am­ple here shows the huge dif­fer­ence dec­i­ma­tion can make to your mesh. The un­dec­i­mated model is around 4 mil­lion poly­gons, and the dec­i­mated is 20.000. Keep­ing the poly­gon count low will also make ren­der­ing and work­ing with the file eas­ier later on in the process.

07 ex­port subtools for un­wrap­ping

Now that we have a proper low-res mesh, we need each subtool to have the most uni­form UV co­or­di­nates with the least amount of man­ual work. I usu­ally use Ri­zomuv for this. Although I also like Zbrush’s built-in un­wrap­per, UV Master, it re­quires some work to pro­duce a good re­sult, and it can be picky about cer­tain meshes. We only need UVS on our low-res model; if you don’t have ac­cess to Ri­zomuv, 3D-coat’s auto un­wrap works re­ally well too.

Ri­zomuv is the clos­est I’ve come to a one-click so­lu­tion, even though you might have to do a bit of man­ual tweak­ing or at least ex­per­i­ment with dif­fer­ent auto func­tions. I ex­port each subtool as OBJS and then load the first into Ri­zomuv. You might get a warn­ing about topol­ogy er­rors, but this shouldn’t mat­ter.

08 un­wrap

Make sure you are in edge mode (‘F2’). Then un­der Auto Seams>full Auto UVS, you can click pelt or mo­saic mode un­der Master Seam Tool Se­lec­tor. Mo­saic is usu­ally good for hard sur­face and pelt is good for more or­ganic mod­els. If none of these work well for you, ex­per­i­ment with the other op­tions. In the ex­am­ple here, I used the Auto Select Box func­tion. I usu­ally try a few dif­fer­ent op­tions un­til I get the re­sult with less stretch­ing in the checker tex­ture. To show this tex­ture, click the View­port Tex­ture Check Board above your 3D view­port.

09 rinse and re­peat

Now jump back into Zbrush, select the subtool you just Uv’ed in Ri­zomuv and select Im­port. Im­port the Uv’ed OBJ. This will re­place the subtool. Move onto the next file and keep go­ing un­til all subtools have been un­wrapped.

If you have subtools that don’t need elab­o­rate UVS, you can use Zbrush to quickly gen­er­ate a sim­ple UV un­wrap. You can do this through UV Map>cre­ate and then just select some­thing like ‘Uvb’ (UV Box). I usu­ally do this for things like emis­sive lay­ers where I know I won’t need any de­tails be­cause the light blocks it out.

10 save low and High

Now we need to save out both our tweaked high-res and low-res model. Do this through the Zplu­gin>fbx Ex­portim­port sub­menu. If you ex­pe­ri­ence any prob­lems with, for ex­am­ple, ver­tex colour, try and select an­other ver­sion of the FBX ex­porter (I’ve found the 2014 ver­sion usu­ally works well). Re­mem­ber not to move any el­e­ments around in ei­ther the lowres or high-res tool. It’s im­por­tant for the bake that the mod­els oc­cupy the same world space.

11 im­port to sub­stance pain­ter

Ev­ery­thing should now be lined up for im­port into Sub­stance Pain­ter. Fire up the pro­gram and select New Pro­ject from the menu. Lo­cate your low-res mesh and cre­ate the new pro­ject. If you skipped the step where we ro­tated our mesh to line up with the floor in Zbrush, your mesh might come in at an odd an­gle. This will in­flu­ence the way Sub­stance Pain­ter gen­er­ates cer­tain ef­fects, so make sure this is in or­der. There’s no way to edit your mesh in Sub­stance Pain­ter, as it’s strictly for paint­ing tex­tures.

You might also no­tice how there’s sud­denly some ad­di­tional de­tails in my model, in the form of grass around the tank. I made these el­e­ments in VR with Quill. It’s too much to go over in this tu­to­rial, but might be ma­te­rial for a fu­ture one.

12 bake Maps

Next up, we want to bake de­tail from the high-res mesh into the low-res mesh. To do this, head to the Tex­ture Set Set­tings tab, and select Bake Mesh Maps. I usu­ally leave ev­ery­thing to the de­fault set­tings here ex­cept for adding my high-res mesh to bake from. Do this by click­ing the page sym­bol in the High Def­i­ni­tion Meshes area.

We also need to select what size we want to bake our maps at. This could be dif­fer­ent from layer to layer, depend­ing on the de­tail level. Usu­ally 2,048 is fine and that’s what I go for here. Hit ‘Bake all tex­ture sets’ and let the baker do its thing.

If you find out later that you need more de­tails in your bake, you can al­ways go back and redo this step.

13 add base Ma­te­ri­als

Our mesh now ap­pears much more de­tailed than be­fore the bake. We can drag out stan­dard ma­te­ri­als from the Ma­te­ri­als and Smart Ma­te­ri­als shelves. With a re­cent up­date to the pro­gram, you can quickly drag and drop ma­te­ri­als like this onto each layer of the model from the ma­te­rial shelves.

I select the Steel Tank Painted Smart Ma­te­rial and drag that onto the top of my tank model. ‘Smart Ma­te­ri­als’ are ba­si­cally a group of dif­fer­ent lay­ers and ef­fects that you ap­ply to your model. ‘Ma­te­ri­als’ are con­tained in a sin­gle layer.

Since Steel Tank Painted is a Smart Ma­te­rial, we can open the folder it con­sists of and tweak in­di­vid­ual parts of the ma­te­rial. We can, for ex­am­ple, change the base colour of the ma­te­rial by go­ing to the Base layer and click­ing the Base Color slot.

Or we can turn off the edge wear and rust, by click­ing the small cir­cle to the left of the in­di­vid­ual ef­fects. You can also go into things like the edge wear, and tweak the set­tings it’s ap­plied with to have a stronger or softer ef­fect. It’s out­side the scope of this tu­to­rial to go into de­tail about all the pa­ram­e­ters here, but I ad­vise you to play around as much as pos­si­ble to see what all the set­tings do. I gen­er­ally find it to be a good idea to tweak at least some of the pa­ram­e­ters, to make the ma­te­rial your own.

14 Quick in­tro to lay­ers

In Sub­stance Pain­ter you have sev­eral dif­fer­ent layer types with in­di­vid­ual uses and set­tings. It’s quite easy to make your own ma­te­ri­als once you get the hang of the ba­sics.

When I’m not just us­ing a pre­set ma­te­rial, the layer types I use most of­ten are the stan­dard layer that you can paint on with a brush, or the fill layer where you ap­ply a uni­form fill to the whole model and mask this us­ing ei­ther a cus­tom-painted mask or ‘Smart Masks’.

Re­gard­less of whether you use a stan­dard layer, a fill layer or one of the pre­sets, you can choose what channels the layer af­fects. A ba­sic fill layer af­fects both the color, metal, rough­ness, nor­mal and the height chan­nel. But you’ll of­ten find that you only need to af­fect a cer­tain chan­nel or a few channels only, and you can then eas­ily turn off the other channels by click­ing the cor­re­spond­ing chan­nel in the Ma­te­rial tab of the layer.

For the nor­mal layer type, you change this on a brush ba­sis though, and you can also have

var­i­ous dif­fer­ent ma­te­rial types on the same layer.

Above the layer stack you have the dif­fer­ent channels, and you can switch be­tween them to see what you’re paint­ing, on the height chan­nel for ex­am­ple.

15 layer Modes

If you know Pho­to­shop, you’re al­ready fa­mil­iar with the con­cept of blend modes. Sub­stance Pain­ter has the same and some ad­di­tional blend modes, so you’re able to over­lay ef­fects, re­colour un­der­ly­ing ma­te­ri­als and so on. At the same time, each layer also al­lows you to tweak in­di­vid­ual channels like base colour, height chan­nel etc. You’ll find blend modes next to the layer name and channels at the top of the layer stack.

16 add wear and tear

The next step is to make the ma­te­rial look more ‘used’. I do this by first adding a Smart Ma­te­rial called Mud Drops. If the ef­fect is too small or big, then sim­ply go into the newly cre­ated group and tweak the in­di­vid­ual lay­ers. In the case of this par­tic­u­lar ma­te­rial, I had to go into the Mud Drops sub­layer and change the scale of the Stains 01 fill ef­fect.

Next, I make a black fill layer and add a Smart Mask called Dirt. I tweak the set­tings of the mask to add a bit more con­trast. You can Alt+click a mask to see its ef­fect in the view­port. To see the nor­mal ma­te­rial again, just Alt+click on the ma­te­rial in the layer stack.

If you don’t like the auto masks and want to make a mask your­self, right-click the layer you want to mask, and select Add Black Mask (or white if the sit­u­a­tion calls for that). If you select this mask, you can paint an in­di­vid­ual mask us­ing brushes or par­ti­cle brushes.

In the ex­am­ple you can see what it looks like when you show the mask in your 3D view­port.

17 add ex­tra small de­tails

Adding some ad­di­tional de­tails to your model is quite easy in Sub­stance Pain­ter. I want to add some screws around the top of the tank, and for that I make a new ba­sic layer and make sure the color/ metal/rough/nrm/height channels are all en­abled un­der the paint prop­er­ties of my brush.

I use a mod­i­fied ver­sion of the ba­sic hard brush that you find un­der Brushes in the shelf. As my brush al­pha I select ‘Cross for­bid­den full’ from the al­pha shelf. This makes for a nice screw.

To ro­tate an al­pha, hold down Ctrl and drag with the left mouse but­ton down. Some al­phas have set­tings that you can tweak un­der the brush set­tings. For ex­am­ple the square al­pha might al­low you to make round cor­ners or to make the al­pha softer. I tweak the Metal­lic, Rough­ness and Height slid­ers at the bot­tom of the brush set­tings to get the right look for my screw. I also choose a grey colour. Now it’s just a mat­ter of paint­ing in the screws where you need them.

On the same layer I also add some bul­let im­pact holes us­ing the Bul­let Im­pact tool you find in the Tools tab of the shelf.

18 fil­ters

Last but not least, I move all lay­ers into a new group, and ap­ply a Sharpen fil­ter on top of it from the Fil­ters tab of the shelf. Us­ing fil­ters you can also tweak colours, add rust and a lot of other use­ful things.

19 Mask by uv chunks

Us­ing the tech­niques ex­plained on the pre­vi­ous page I add the rest of the ma­te­ri­als. One tech­nique that is also very use­ful is to mask based on UV is­lands. This is very handy if you have el­e­ments on the same layer that are sep­a­rated in the UV map­ping, but not in the model it­self. It can end up be­ing dif­fi­cult to paint the masks man­u­ally in such cases.

To mask by UV is­lands, first add a black mask by right-click­ing the layer you need to mask, and se­lect­ing Add Black Mask. Then select Poly­gon Fill in the tool­bar at the left side of the screen. Un­der Prop­er­ties select UV Chunk Fill and click the parts in the scene that you want to mask. There’s also a slider be­tween black and white here, which en­ables you to ei­ther add or re­move from your mask.

In the ex­am­ple you’ll see how I can quickly mask out in­di­vid­ual el­e­ments of my layer.

20 add emis­sive Ma­te­ri­als

For the small lamps on my tank, I need to add an emis­sive ma­te­rial for the lamps to emit light. Since an emis­sive chan­nel is not en­abled by de­fault, we need to add one un­der Tex­ture Set Set­tings. Press the small + next to the Channels text and select Emis­sive. Now we have an emis­sive chan­nel, and you should be able to see this un­der the layer set­tings and brush set­tings.

To make the lamps emit light, we then need to make a new fill layer, set it to af­fect the emis­sive chan­nel only, select a colour, add a black mask and then paint in where on the model we want the ef­fect to ap­pear.

If you’d like the ef­fect to be more pro­nounced in the view­port, you can go to the shader set­tings of the scene (up­per-right cor­ner to the right of the layer stack), and tweak the emis­sive amount.

Right above this tab, you’ll find the dis­play set­tings where you can change HDRI back­grounds, tweak shadow set­tings and so on.

21 use built-in ren­derer

Sub­stance Pain­ter has a built-in Iray ren­derer that is good for pre­view­ing how your tex­ture looks in a ray­tracer. To pre­view your model there, click the lit­tle cam­era sym­bol in the up­per-right cor­ner of your view­port.

You can add a few ef­fects in here too, like vi­gnette, cam­era dis­tor­tion and depth of field. To add depth of field, tweak the Aper­ture slider un­der the cam­era set­tings. Ctrl+mid­dle mouse click to select your point of fo­cus.

You can’t set in­di­vid­ual lights in here, but you can get quite far with just us­ing the sup­plied HDRI maps, or you can load in your own.

22 ex­port your Ma­te­ri­als

When it comes to ex­port­ing your ma­te­ri­als, you have sev­eral op­tions. You can do it man­u­ally through the Ex­port Tex­tures func­tion, but I highly rec­om­mend that you get the Sub­stance Pain­ter plugin called Sub­stance Pain­ter Live Link. It au­to­mates the ex­port of ma­te­ri­als to Mar­moset Tool­bag 3, Cin­ema 4D, 3ds Max, Maya, Blender, Modo and Hou­dini. In this ex­am­ple I’ll show you how it works with Mar­moset.

Once you’ve in­stalled the plugin us­ing the in­cluded in­struc­tions, you click the lit­tle green tur­tle icon in your tool­bar at the left side of the screen. From here you choose the des­ti­na­tion of your tex­tures, in this case Mar­moset Tool­bag. We select the out­put path and the tex­ture size, en­able ex­port ge­om­e­try and hit ‘Send all’.

23 Mar­moset tool­bag

Once in Mar­moset Tool­bag we go to Edit>plug­ins>hh­con­nect, select our ex­port path and hit Im­port Geo, then Load Ma­te­ri­als. Now our model ap­pears with all the cor­rect ma­te­ri­als. Be­fore the Live Link, I’d have to go in and set up each ma­te­rial one by one, plug­ging in all the in­di­vid­ual maps one by one. For a scene such as this, with nine ma­te­ri­als each with nor­mal maps, rough­ness, metal­lic and albedo maps… you can imag­ine how long this used to take! •













Newspapers in English

Newspapers from Australia

© PressReader. All rights reserved.