Sculpt a Tank in vr, part 2: Texturing
In this second chapter on hard-surface sculpting in VR, Martin Nebelong shares his workflow for taking models further using ‘traditional’ 3D packages and texturers
Part 2 of Martin Nebelong’s tutorial explores how to add details and textures to a Vr-sculpted model
welcome to part two of this tutorial series, demonstrating how to sculpt a hard-surface model in virtual reality and then take it to a finished level outside of VR.
Last issue, in part one of the tutorial, we sculpted a tank in Oculus Medium. In this part we will talk about how to unwrap, texture and then set that model up for rendering.
A lot of people have asked me whether or not sculpting in VR can be seen as anything but a gimmick, and if it could actually be used as part of a professional pipeline. Hopefully this tutorial will help to underline just how useful VR sculpting actually is as a pipeline tool.
The first part of this chapter will be about how you optimise your model in Zbrush and get it ready for UVS. This could also be done in 3D-coat, Blender or whatever 3D package you’re most comfortable with.
Then I’ll go over how I use Rizomuv (formerly Unfold3d) for almost fully automated unwrapping. Because honestly, I can’t think of anything less exciting than having to manually unwrap a model!
Then I’ll talk about how to texture that model using Substance Painter, and finally I’ll briefly go over the process of getting the textured model into a renderer.
01 import to zbrush
In part one of the tutorial I exported my tank as an FBX model. If you didn’t follow the first chapter, you can apply the steps in this tutorial to any high-res model that you want to unwrap and texture.
To import an FBX to Zbrush, go to the Zplugin menu and choose the FBX importer. Locate your file and hit Import. Once imported drag your model into the viewport and press ‘T’ to enter edit mode.
02 rotate and tweak
Once you’ve imported 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 rotate gizmo to rotate the model. If your model consists of multiple subtools, make sure Transpose All Selected Subtools is turned on. You can find this toggle right above your transform gizmo.
If your model is rotated on an angle divisible by 5 compared to the floor, you can hold down Shift to rotate in increments of 5.
If you exported your model as an FBX file, you should already have the subtools (layers) that you need. If so, you can skip this step, and also the Split step.
If you’ve exported your model in OBJ format however, you’ll have to break it up into fitting subtools. To do this, go to the Polygroups submenu and select Auto Groups. This will make sure all individual polygon parts are assigned a unique polygroup. If you have a lot of similar parts and want them in the same polygroup, select Merge Similar Groups.
If you want to merge groups manually, you can either jump ahead to the next step and then merge the autogroups 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 isolates the group. Then you Ctrl+shift-click it again which hides this group and shows the others. Now every time you Ctrl+shift-click a group, it’s hidden along with the first group. Then when you’ve hidden all groups you want to merge, Ctrl+shift-drag outside the model to invert your selection. You should now see the groups you want to merge. To assign a new polygroup to this selection, select Groupvisible in the Polygroups menu, or press Ctrl+w. Remember to show the polygroups in the viewport by enabling Draw Polyframe in the toolbar to the right of your viewport.
Next up we want to split all polygroups into ‘layers’ or subtools as they’re called in Zbrush. To split your polygroups, select the Groups Split function under the Split menu. Once you’ve done this, you might want to merge some layers if it makes sense in terms of the later UV and texturing process. So for example, a knight in shining armour could have all armour parts merged, so that those parts would need only one texture.
05 prepare to decimate
Meshes exported at 100% quality from VR are often quite polygon heavy, due to the nature of Medium and Masterpiecevr, which are the VR sculpting tools I use the most. Your exported mesh will have the same density in all of your model, unless you decide to decimate automatically when
you export, which you can in both Medium and Masterpiecevr. I usually do this step in Zbrush though, because I like the added level of control you have here. You can decimate across the whole model, or individually per subtool.
To decimate your mesh in Zbrush, first make a copy of your tool by clicking Clone in the Tool menu. The clone will be our high-res model, and the current one will be the low-res model.
Go to Zplugin>decimation Master and select Pre-process All or Pre-process Current depending on the level of control you want over individual subtools.
Select the level of decimation you want. The lower you can get the point count, the better in terms of making unwrapping a breeze, but make sure you don’t lose too much detail. Especially when you look at the silhouette of the model, you should try and keep it as close to the original as possible.
The example here shows the huge difference decimation can make to your mesh. The undecimated model is around 4 million polygons, and the decimated is 20.000. Keeping the polygon count low will also make rendering and working with the file easier later on in the process.
07 export subtools for unwrapping
Now that we have a proper low-res mesh, we need each subtool to have the most uniform UV coordinates with the least amount of manual work. I usually use Rizomuv for this. Although I also like Zbrush’s built-in unwrapper, UV Master, it requires some work to produce a good result, and it can be picky about certain meshes. We only need UVS on our low-res model; if you don’t have access to Rizomuv, 3D-coat’s auto unwrap works really well too.
Rizomuv is the closest I’ve come to a one-click solution, even though you might have to do a bit of manual tweaking or at least experiment with different auto functions. I export each subtool as OBJS and then load the first into Rizomuv. You might get a warning about topology errors, but this shouldn’t matter.
Make sure you are in edge mode (‘F2’). Then under Auto Seams>full Auto UVS, you can click pelt or mosaic mode under Master Seam Tool Selector. Mosaic is usually good for hard surface and pelt is good for more organic models. If none of these work well for you, experiment with the other options. In the example here, I used the Auto Select Box function. I usually try a few different options until I get the result with less stretching in the checker texture. To show this texture, click the Viewport Texture Check Board above your 3D viewport.
09 rinse and repeat
Now jump back into Zbrush, select the subtool you just Uv’ed in Rizomuv and select Import. Import the Uv’ed OBJ. This will replace the subtool. Move onto the next file and keep going until all subtools have been unwrapped.
If you have subtools that don’t need elaborate UVS, you can use Zbrush to quickly generate a simple UV unwrap. You can do this through UV Map>create and then just select something like ‘Uvb’ (UV Box). I usually do this for things like emissive layers where I know I won’t need any details because 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 Zplugin>fbx Exportimport submenu. If you experience any problems with, for example, vertex colour, try and select another version of the FBX exporter (I’ve found the 2014 version usually works well). Remember not to move any elements around in either the lowres or high-res tool. It’s important for the bake that the models occupy the same world space.
11 import to substance painter
Everything should now be lined up for import into Substance Painter. Fire up the program and select New Project from the menu. Locate your low-res mesh and create the new project. If you skipped the step where we rotated our mesh to line up with the floor in Zbrush, your mesh might come in at an odd angle. This will influence the way Substance Painter generates certain effects, so make sure this is in order. There’s no way to edit your mesh in Substance Painter, as it’s strictly for painting textures.
You might also notice how there’s suddenly some additional details in my model, in the form of grass around the tank. I made these elements in VR with Quill. It’s too much to go over in this tutorial, but might be material for a future one.
12 bake Maps
Next up, we want to bake detail from the high-res mesh into the low-res mesh. To do this, head to the Texture Set Settings tab, and select Bake Mesh Maps. I usually leave everything to the default settings here except for adding my high-res mesh to bake from. Do this by clicking the page symbol in the High Definition Meshes area.
We also need to select what size we want to bake our maps at. This could be different from layer to layer, depending on the detail level. Usually 2,048 is fine and that’s what I go for here. Hit ‘Bake all texture sets’ and let the baker do its thing.
If you find out later that you need more details in your bake, you can always go back and redo this step.
13 add base Materials
Our mesh now appears much more detailed than before the bake. We can drag out standard materials from the Materials and Smart Materials shelves. With a recent update to the program, you can quickly drag and drop materials like this onto each layer of the model from the material shelves.
I select the Steel Tank Painted Smart Material and drag that onto the top of my tank model. ‘Smart Materials’ are basically a group of different layers and effects that you apply to your model. ‘Materials’ are contained in a single layer.
Since Steel Tank Painted is a Smart Material, we can open the folder it consists of and tweak individual parts of the material. We can, for example, change the base colour of the material by going to the Base layer and clicking the Base Color slot.
Or we can turn off the edge wear and rust, by clicking the small circle to the left of the individual effects. You can also go into things like the edge wear, and tweak the settings it’s applied with to have a stronger or softer effect. It’s outside the scope of this tutorial to go into detail about all the parameters here, but I advise you to play around as much as possible to see what all the settings do. I generally find it to be a good idea to tweak at least some of the parameters, to make the material your own.
14 Quick intro to layers
In Substance Painter you have several different layer types with individual uses and settings. It’s quite easy to make your own materials once you get the hang of the basics.
When I’m not just using a preset material, the layer types I use most often are the standard layer that you can paint on with a brush, or the fill layer where you apply a uniform fill to the whole model and mask this using either a custom-painted mask or ‘Smart Masks’.
Regardless of whether you use a standard layer, a fill layer or one of the presets, you can choose what channels the layer affects. A basic fill layer affects both the color, metal, roughness, normal and the height channel. But you’ll often find that you only need to affect a certain channel or a few channels only, and you can then easily turn off the other channels by clicking the corresponding channel in the Material tab of the layer.
For the normal layer type, you change this on a brush basis though, and you can also have
various different material types on the same layer.
Above the layer stack you have the different channels, and you can switch between them to see what you’re painting, on the height channel for example.
15 layer Modes
If you know Photoshop, you’re already familiar with the concept of blend modes. Substance Painter has the same and some additional blend modes, so you’re able to overlay effects, recolour underlying materials and so on. At the same time, each layer also allows you to tweak individual channels like base colour, height channel 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 material look more ‘used’. I do this by first adding a Smart Material called Mud Drops. If the effect is too small or big, then simply go into the newly created group and tweak the individual layers. In the case of this particular material, I had to go into the Mud Drops sublayer and change the scale of the Stains 01 fill effect.
Next, I make a black fill layer and add a Smart Mask called Dirt. I tweak the settings of the mask to add a bit more contrast. You can Alt+click a mask to see its effect in the viewport. To see the normal material again, just Alt+click on the material in the layer stack.
If you don’t like the auto masks and want to make a mask yourself, right-click the layer you want to mask, and select Add Black Mask (or white if the situation calls for that). If you select this mask, you can paint an individual mask using brushes or particle brushes.
In the example you can see what it looks like when you show the mask in your 3D viewport.
17 add extra small details
Adding some additional details to your model is quite easy in Substance Painter. I want to add some screws around the top of the tank, and for that I make a new basic layer and make sure the color/ metal/rough/nrm/height channels are all enabled under the paint properties of my brush.
I use a modified version of the basic hard brush that you find under Brushes in the shelf. As my brush alpha I select ‘Cross forbidden full’ from the alpha shelf. This makes for a nice screw.
To rotate an alpha, hold down Ctrl and drag with the left mouse button down. Some alphas have settings that you can tweak under the brush settings. For example the square alpha might allow you to make round corners or to make the alpha softer. I tweak the Metallic, Roughness and Height sliders at the bottom of the brush settings to get the right look for my screw. I also choose a grey colour. Now it’s just a matter of painting in the screws where you need them.
On the same layer I also add some bullet impact holes using the Bullet Impact tool you find in the Tools tab of the shelf.
Last but not least, I move all layers into a new group, and apply a Sharpen filter on top of it from the Filters tab of the shelf. Using filters you can also tweak colours, add rust and a lot of other useful things.
19 Mask by uv chunks
Using the techniques explained on the previous page I add the rest of the materials. One technique that is also very useful is to mask based on UV islands. This is very handy if you have elements on the same layer that are separated in the UV mapping, but not in the model itself. It can end up being difficult to paint the masks manually in such cases.
To mask by UV islands, first add a black mask by right-clicking the layer you need to mask, and selecting Add Black Mask. Then select Polygon Fill in the toolbar at the left side of the screen. Under Properties select UV Chunk Fill and click the parts in the scene that you want to mask. There’s also a slider between black and white here, which enables you to either add or remove from your mask.
In the example you’ll see how I can quickly mask out individual elements of my layer.
20 add emissive Materials
For the small lamps on my tank, I need to add an emissive material for the lamps to emit light. Since an emissive channel is not enabled by default, we need to add one under Texture Set Settings. Press the small + next to the Channels text and select Emissive. Now we have an emissive channel, and you should be able to see this under the layer settings and brush settings.
To make the lamps emit light, we then need to make a new fill layer, set it to affect the emissive channel only, select a colour, add a black mask and then paint in where on the model we want the effect to appear.
If you’d like the effect to be more pronounced in the viewport, you can go to the shader settings of the scene (upper-right corner to the right of the layer stack), and tweak the emissive amount.
Right above this tab, you’ll find the display settings where you can change HDRI backgrounds, tweak shadow settings and so on.
21 use built-in renderer
Substance Painter has a built-in Iray renderer that is good for previewing how your texture looks in a raytracer. To preview your model there, click the little camera symbol in the upper-right corner of your viewport.
You can add a few effects in here too, like vignette, camera distortion and depth of field. To add depth of field, tweak the Aperture slider under the camera settings. Ctrl+middle mouse click to select your point of focus.
You can’t set individual lights in here, but you can get quite far with just using the supplied HDRI maps, or you can load in your own.
22 export your Materials
When it comes to exporting your materials, you have several options. You can do it manually through the Export Textures function, but I highly recommend that you get the Substance Painter plugin called Substance Painter Live Link. It automates the export of materials to Marmoset Toolbag 3, Cinema 4D, 3ds Max, Maya, Blender, Modo and Houdini. In this example I’ll show you how it works with Marmoset.
Once you’ve installed the plugin using the included instructions, you click the little green turtle icon in your toolbar at the left side of the screen. From here you choose the destination of your textures, in this case Marmoset Toolbag. We select the output path and the texture size, enable export geometry and hit ‘Send all’.
23 Marmoset toolbag
Once in Marmoset Toolbag we go to Edit>plugins>hhconnect, select our export path and hit Import Geo, then Load Materials. Now our model appears with all the correct materials. Before the Live Link, I’d have to go in and set up each material one by one, plugging in all the individual maps one by one. For a scene such as this, with nine materials each with normal maps, roughness, metallic and albedo maps… you can imagine how long this used to take! •