HOME | DD

SickleYield — [Tutorial] G1G2G3G8 Clothing in Blender 3
Published: 2014-01-23 00:52:47 +0000 UTC; Views: 18724; Favourites: 63; Downloads: 0
Redirect to original
Description This text tutorial continues the series on creating clothing for Genesis 1 and 2 for DAZ Studio in Blender.  Previous links:

Part 1
Part 2

In this tutorial we will explore texturing and, more specifically, using Blender to create sculpted normal maps and/or displacement.

From Part 1 and 2 you should have:

-A UV-mapped mesh, with materials assigned, at a poly count between 16k and 100k polygons (less is okay, more is not); at this point  you should have done your "base" sculpt and it should look basically like a piece of clothing, not a paper cutout overlying the body.  Buttons, lacing, etc. should be finished and a permanent part of the clothing, and you should have done your base rigging in DAZ Studio and saved it to the library as a .duf using the File--Save As--Support Assets--Figure/Prop Asset command (NOT Wearables ).

-An image editor that can handle layered files and/or various image file types; free/Open Source ones are plentiful now, and you can probably find one to suit you if you look around, but the GIMP and Krita are both especially recommended (Krita can handle 32 bit images, which is helpful, and both it and the GIMP can handle Photoshop .abr brush formats, which is fairly huge).  MyPaint has an interface that appeals to those who prefer freehand painting to a lot of mouse/brush work.   All of these are tablet-friendly, but you can at least make a good start with a mouse and a good brush collection.

---

Before we begin, a brief discussion on the theory of clothing design for figures in DAZ Studio.  This is important to how you choose to proceed.

You may have noticed in your own clothing library that there are different approaches to how clothing is textured.  Some items have baked-in shading highlights on top of sculpted meshes, which can create a hyper-real look that is not completely responsive to some kinds of scene lighting, but still works fine with most.  Streetwear and Luthbel are masters of this challenging technique, which looks marvelous in 90% of renders.  Sculpted normals and/or displacement give this technique an even more real look.

Some items have completely flat diffuse and bump textures, relying on their base sculpt to give the clothing a realistic look.  This is very responsive to different lighting environments, but it requires textures to be either light in color or very shiny (white specular highlights) in order to bring out those wrinkles.  Strong prints or dark/saturated matte colors will destroy the appearance of the sculpt and leave the item looking flat and unreal.  The advantage to this is that it can be done quickly and creates clothing that is very responsive to seamless shaders, provided they are pale or shiny and don't have a strongly repeating pattern.  Many DAZ Platinum Club clothing items are textured this way.  It is not hyper-realistic, but most renders are at least somewhat stylized anyway; this is an equally valid technique if you plan ahead and work with its strengths and weaknesses. 

When you see a freebie clothing set for a Plat Club item and it looks terrible, the reason is usually that it has no shading and is based on a dark, saturated, heavily patterned, or matte look.  It's easy to be tempted to add these looks when they don't come with the base texture set, but they're just not going to look right without highlights added in a very deliberate way. 

Over time, I've come to prefer to emphasize strong highlights in the bump and displacement map and subtler (but present) shading in the diffuse.  This is also why I prefer to have a solid mid-poly sculpt in place before starting on the more detailed displacement.  What is important is not that you choose one of these techniques; none is "wrong" or "right," and all are perfect in some situation.  What's important is that you think about them consciously and create your textures deliberately with a strategy in mind.

The important thing is that even in dim lighting, on a dark-colored shirt, you should be able to see folds in the fabric.  Things that are true in reality, like a dark piece of clothing in dim light looking like a black void, can ruin the aesthetic of a render.  We're still creating art, and one of the privileges of art is that it should only be ugly or odd-looking on purpose, never because of accident or laziness.

Some different design theories advocate that you should put lighter elements at the top of an outfit and darker ones toward the bottom.  I know I've mentioned esha before, but if you look at her store you'll find some excellent execution of this technique.  It's not mandatory (even esha doesn't do it 100% of the time), but it almost always looks better than dark top/light bottom.

---

If you look at how a piece of clothing moves and changes on a living body, you will see that no one sculpt is going to reproduce every position.  What we will therefore create is a set of "consensus" wrinkles, reflecting a combination of what wrinkles look like over several different poses.  Do a Google image search for your intended type of garment before you start and try to get an idea where all of the surface details you're going to add will go and what they will look like - the parallel wrinkles in the elbow and knee that are perpendicular to the longer ones down the legs and arms, etc.  Developing an artist's eye for this type of detail can take practice, but it is very doable.  Sometimes sketching out wrinkles on a piece of paper or in an image software helps with visualizing them.

Be sure to save a separate version of your exported mesh so that you don't lose it when you start sculpting at higher resolution.

When you're ready to start sculpting, there are a couple of ways to proceed.  I will cover both.  For now, select your clothing item and go back to the modifiers panel.  It is on the right panel of your interface and looks like a wrench.  Click on "Add Modifier" and choose "Multiresolution."  It's under the "Generate" heading in Blender 2.69, second from left.  Leave "Subdivide UVs" checked.  Checking "Optimal Display" will cause the screen to revert to showing your base poly count when you move the view in Blender, which can help greatly with lag when we get over a million polygons (it will snap back to showing the full polycount view when you stop moving the camera view).  For now, click Subdivide and notice that the numbers on the left - Preview, Sculpt and Render - go up. 

Leaving Catmull-Clark on above this smooths as you sculpt, whereas clicking Simple instead applies no smoothing (useful if adding more rigid details to armor or mechanical objects).  Remember that each time you click "Subdivide" and the numbers rise, you have added a level of subdivision, multiplying the face count by 4.  Experiment with how much subdivision your system can handle before moving in the viewport gets laggy.  If you need to go down a level, click the left-facing arrow beside Preview, Sculpt and Render to lower them to a lower subdivision and click "Delete Higher."

Another strategy for working at high poly counts is to selectively hide parts of a mesh you are not presently working on.  You can do this in edit mode by selecting faces and choosing H (alt+H gets them back).  The faces will not be hidden in Object mode but will be in Sculpt.  When using multiresolution, edit mode always shows your "base" poly count.  You can also hide everything but a wedge in Sculpt mode by using Alt+B and clicking and dragging (Alt+B again shows everything).

Once you have the multiresolution modifier set up in the way that works best for you, tab into Sculpt mode or click on the dropdown below the 3d window and choose "Sculpt Mode."  Remember, you can choose a brush from the Brush dialog on the bar, or by clicking on the picture of the brush in action on the upper left side of your screen.  F and Shift+F control size and strength of the brush, or use the options in the same left panel to control these settings.

Now sculpt in folds and wrinkles according to your plan, keeping in mind the size of folds that different fabrics may have and how tight or loose the clothing item is.  Usually tighter = smaller wrinkles that splay out from a body crease, looser = bigger wrinkles that travel from hem to hem or from gathered area to hem.  Some gathered fabrics can have lots and lots of tiny wrinkles from edge to edge, but they are a special case.  Wrinkles do not "fade out" in the middle of a limb or other straight area on a loose clothing item, but they do in a tight one.  Usually spandex or other stretchy fabrics are least wrinkled where they are pulled most taut, and that is in the flattest parts of the body (top of the breast, belly, front and back of the thigh and shin).

Once you have created a good sculpt, it's time to bake to a texture map to use it as a displacement and/or normal maps and/or for shading.

Go to Edit mode and the UV map screen.  Click Image and New Image.  In the popup, choose a good width and height (the biggest your system can handle, ideally; you can shrink it later when processing in your image editor, but for now, we want all the detail we can get).  Turn on 32 Bit Float.  This will give us a smoother-looking displacement.  We can get the look of it eventually with blurring and post-processing, but if your image editor can handle it, this way is faster.  For now, uncheck Alpha.

Tab into Object mode and go to the Render panel. It is farthest left in the top right panel on your screen and looks like a camera.

Scroll all the way down and click the word Bake to expand the Bake panel.  Click 16.  I'm not sure if this does anything or not, but just in case.

Under Bake Mode choose Displacement.

Clear is checked by default; this just means it will go ahead and overwrite the plain image we created with the new baked one.

Margin is how much it will pad the edges.  Do at least 5 or 6 on this to avoid "bleeding" at the edges that will create unwanted creases in DAZ Studio.

Do not check Low Resolution.  In the current version, it causes too many artifacts.  Just click Bake From Multires.

Go back to your Modifier panel where the multiresolution options are.

In order to calculate a displacement map, Blender needs to calculate the difference between the base (more or less) and the highest level of sculpted geometry we've added.  In this case that means we need to turn the Preview down to 1 while leaving Sculpt and Render at their highest.  You can even add a level to each of those here for increased smoothness if you want, and if you think your system can handle it.

Go back to the Bake panel and click Bake.

Now you should have a lovely displacement map appear in your UV screen.  Since we didn't check Alpha it will be on the neutral gray background, which is just what we want for saving to .jpg format.  Go to Image and Save As Image, then navigate to where you want to save it and give it a name.  You can save straight to jpg if you don't plan to work with it more, or to .png or .tiff if you want to use it for a shading layer (although more on that in a second).

You can also bake normal maps.  This is a better option than displacement in the Iray render engine because displacement requires you to set render subD in the surfaces to a high enough level that it will slow your renders.  Normal maps are much more efficient.  Normal maps also don't literally displace mesh, so they don't work in every situation; but consider carefully how badly you need those wrinkles to be super bumpy before you use displacement.

To base normals, you would choose the "Normals" option for Bake Mode instead of Displacement.  Check Bake from Multires and set your margins, as before.  In the dropdown below that, choose Tangent.  Creating the new image is the same, and the multiresolution in the Modifier panel still needs to have Preview set low and the other settings high.

When you click Bake on this, you will get a bluish-purple result.  This is a normal map.  Save it out as you would the displacement.  You can generate Ambient Occlusion from this same panel, which creates a gray shaded bake.  I don't recommend using this heavily in Iray, where shadowcasting is more realistic, but it can still add a little more realism if you don't overdo it.

When using a generated map as a shading layer, put it on a top layer of your .psd or .xcf of your base texture.  Under it should be the base fabric layer, and any details that will be on top of the fabric (e.g. small zippers, stitches, other details too small to realistically be on the mesh itself, and any dirt or grunge layers).  Set this top layer to soft light, or choose another blend mode and fiddle with the opacity until you get the result you want.  The idea is that the shading will add more visual detail and also add more realism to the displaced wrinkles regardless of what lighting the user has in a render.  When you are ready to test in DAZ Studio, export to .jpg to create a diffuse.  In most clothing items, you can create an adequate bump map by turning off the shading and grunge layers, right-clicking the top layer and choosing New From Visible (again, in GIMP), then desaturating that and turning up its contrast before exporting as .jpg again.  The important thing is that the bump map is for small details of fabric pattern, stitching, etc., not for details that appear in the displacement map.

---

In part 4 we will talk about setting up textures in DAZ Studio.

Did this tutorial series help you?  Did you have questions or comments?  Please share them below!
Related content
Comments: 5

cgartiste [2014-01-24 01:18:32 +0000 UTC]

Thus far I'm following along. This is precisely the kind of thing I've been looking for you've presented this in a realistic way that made it easy to follow and actually simple to try and dive right in. I had to learn the UI but overall I'm following along. Seriously looking forward to your next installment.


Question: Is this how you do all of your stuff? I mean did you use this method for the Impractical Rogue for instance? It's incredibly versatile for being so impractical. Actually I used a secondskin undergarment and used the outfit for a recent commercial project, so thanks!

👍: 0 ⏩: 1

SickleYield In reply to cgartiste [2014-01-24 02:03:07 +0000 UTC]

Yes, I did.  Of course, not sculpted displacement; the IR set doesn't have that because it doesn't have any textures at all, just a mid-poly sculpt. 

I have Zbrush now, but I use it in combination with Blender, not instead of it; so far it seems hard to get a good low-rez mesh out of Zbrush without going the long route of "sculpt something impractical and then retopo it."  I assume others have found a way to make that more efficient than it seems to me.  I use it for the InsertMesh brushes, the ease of generating displacement and morphs, and presumably in future it will replace 3dCoat as my tool for seamless diffuse painting (something Blender is bad at).

The other thing that I like about Blender is that I can tug and pull things around at the vertex level so that things look more lived-in and asymmetrical even at the lowest resolution; other modelers do their best to keep you away from touching the base verts and polys ever at all, and I don't want that until I'm ready to do the higher-res sculpt.

I'm glad you're finding this of use.

👍: 0 ⏩: 0

E3D99 [2014-01-23 14:21:37 +0000 UTC]

Very well written!  Thanks for sharing this tutorial.

👍: 0 ⏩: 1

SickleYield In reply to E3D99 [2014-01-23 18:03:16 +0000 UTC]

You're welcome!

👍: 0 ⏩: 0

JoswanKodaigo [2014-01-23 02:00:19 +0000 UTC]

Thank you!

👍: 0 ⏩: 0