Home Technical Talk

Complete Noob PBR workflow and pipeline questions, little help? (long list included)

polycounter lvl 2
Offline / Send Message
Mirr polycounter lvl 2
Hi everyone,

Explanation Part:
So recently, I've just got back into 3D modelling. Like my old self, I've had only little experience in the texturing process of working in next gen hard surface 3D game asset creation and so far I've only covered these procedures in the low poly to high poly pipeline including:

1. making the base mesh in Maya (2k15)
2. unwrapping the base mesh .obj using UVLayout and Nightshade
3. preparing the low poly mesh for zBrush high definition sculpting by making a mid poly of the low poly version file
4. working with the really useful GoZ tool in maya and exporting it to zBrush
5. making a high subdiv in zbrush
6. baking the Low and High poly normal and AO maps into xNormal or alternatively bake the maps in maya with the transfer maps (any preferred method of baking are welcome too but considering the masses love xNormal, I've loved it not because everyone says so but because it's good at what it does!)
7. and this is the part where my hair starts to fall off (follicle by follicle)...

... so I've now baked my normal and AO maps, I've imported the base mesh into marmoset toolbag 2 along with the AO and normal map that I've generated with in xNormal, everything looks fine until I realized, ohmahgah, there's no textures! *hyperventilates* and I've looked through a long list of tutorials including the likes such as youtube and digital tutors about the texturing process, some have a required(?) programmes such as Knald to progress by needing to have a convexity and concavity maps that are produced in it which I don't have access to(?) because of this problem on my GTX 970 GPU driver being latest and not supporting Knald in result to blurring out the normal maps. I know xNormal can also produce Cavity maps but do correct and enlighten me some info if I'm wrong if there are any alternative names to concavity maps that I don't know of prior to my understanding of how Albedo map is sometimes mistaken as diffuse map (again do correct me if I'm wrong).

And alternatively, I've looked into pure PBR workflow tool Quixel Suite and so far I've yet to learn the many things Quixel's tools have in hand, the after results look superb.

Questions Part:
To conclude this long post here are my question thus far:
- How does one create a base texture with only an AO and normal map in hand?
- What are the next steps to creating the albedo/diffuse map without having the need of convexity and concavity maps?
- Are there any alternative methods? ie. spotlight
- Fix for the Knald GPU driver problem?

Replies

  • JedTheKrampus
    Options
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    You can generate a curvature map from your normal map in XNormal or Substance Designer as well as Knald. You can also bake a curvature map in XNormal. The reason why you usually would want to have a curvature map is because it helps you create wear on the edges of your model and dust and dirt in the crevasses, so you should have one to help you texture.

    To generate curvature in Xnormal, go to the Tools tab on the right, click the "Tangent-space normal map to cavity map" button (top row, second column), right click on the left transparency checkerboard, click "Browse tangent space normal map", find your normal bake, open it, change "Method" to "EMB" under the right transparency checkerboard, right click the right transparency checkerboard, and click "Generate". Inspect the results and if you're satisfied click on the new curvature map and click "Save cavity map."

    You can also generate a cavity map with the method "EDT". You can multiply your spec map by this to get some specular micro-occlusion.

    To bake these maps within xNormal proper, pick "Cavity map" (EDT equivalent) and "Curvature map" (EMB equivalent) in the Baking Options tab. If you want a monochrome curvature map exactly like you'd get from the EMB generator, change the Curvature map options to "Monochrome". If you leave the setting on 3-color you can take the R and G channels separately in Photoshop to get just convexity or concavity. You'll probably need to mess with the curvature search distance as well to get a good result, so set the number of rays low to start out with so you can bake test maps quickly. Later on you can increase the number of rays to get a better bake. I also like to check "Jitter," but that's strictly optional and makes things more noisy.

    If you have a few different materials you want to represent on your texture, you can paint masks for them in Zbrush using polypaint with a -100 focal shift brush. (Or, convert polygroups to polypaint.) Bake the polypaint out in Xnormal (don't forget to uncheck Ignore Vertex color for this) and use Select By Color and Save Selection to make a .psd with each material ID in a separate layer. Your model should look like this in Zbrush:

    NSBlockout2.jpg?1393269836

    (remember, no lighting information in this texture or you will regret it)

    Now that you have your curvature maps, you can use them to help you make masks in Photoshop. Probably the two best uses of your time in Photoshop for making PBR textures are putting layer masks together and painting, compositing, or generating details into the gloss/smoothness/roughness map. I maintain a "mask library" PSD and a "mask stack" PSD for PBR texturing. The "mask library" is in grayscale and has selection masks derived from the material ID map I polypainted in Zbrush as well as ambient occlusion, cavity, and curvature bakes (both concavity and convexity.) BTW if you got a monochrome curvature map from xNormal here's how to convert it to concavity and convexity masks:

    Concavity:
    Y5ZELWG.png

    Convexity:
    592BUiA.png

    Again, typically you'll use concavity for dust and dirt (you can also use ambient occlusion to mask this) and convexity for edge wear.

    Once I have this mask library set up, optionally including some grunge maps I think might look neat, I will define each material that I want to use. Reference like scan data and charts can be useful here, as well as photo reference. If you're using a shader with a specular map you MUST use reference for the specular map, or you will fail. Metallic shader like Unreal are a little more forgiving, though it still usually pays to check reference charts or scans for the base color. Quixel Megascans have still not been released, but you can get some scan data to refer to with Toolbag 2. (Check data/mat/textures in the installation directory, and be warned that the specularity values are a little too high for some scans.)

    The charts are also useful. Metallic shader chart:

    dontnodgraphicchartforunrealengine4.png

    Specularity shader chart (spec only, use scans or the previous chart for diffuse/albedo maps)

    PBR_CheatSheet.png?version=1&modificationDate=1392916124000&api=v2

    So, if I know I want to do painted metal with some edge wear, I know I am going to need two layers. One will have the metal, and the other will have the paint. If I'm targeting a spec/gloss shader like Marmoset or Cryengine, my metal layer will have a bright color in the specular map, above the 2/3rds mark value-wise, black in the diffuse map, and whatever roughness or glossiness value I want. (Typically I like metal around .2 roughness, or .8 gloss. It can help to pick colors from the chart.) My paint layer will have a middling color value-wise in the diffuse map, somewhere around the halfway point. It will have a specular color of exactly 58 sRGB and a high gloss value because I like shiny paint. Then, for each layer I will build a mask in my "mask stack" PSD. Let's say that I want both materials to only show up on my model's arm. I will search my "mask library" in the Material ID layer group for the "arm" layer and copy that to the layer group that I've made for each material layer in my mask stack. I want to make sure that no matter what goes in the mask stack from this point forwards, the material will be limited to the arm. So, I will set each of these layers in the mask stack to Multiply and put all other masks below the material ID. The next thing to do is to make sure that there's some edge wear on the parts of the arm where it would logically show up. To make this happen, I need there to be no paint where the geometry is convex. So, I will go to my mask library, find my convexity map that I got from Xnormal, and make a copy in the mask stack for my paint layer, under the material ID mask. Set the blending mode to multiply and invert the layer, and you'll have no paint in convex areas. You're still not quite done, though, because in most cases this will look awfully artificial. So, you should paint white over some areas of this mask so that only parts of the arms will have the paint chipped off on the edges.

    Now that you have some masks, it's time to propagate them to your texture maps. So, hide all the layer that aren't in the metal material mask by alt-clicking the eye next to the layer group for the metal mask. Select everything and copy merged (Ctrl+Shift+C) and make a layer mask in the diffuse texture on the metal layer. Paste the mask in place (Ctrl+Shift+V). Paste the mask into a layer mask on your other textures too. Then go back to your mask stack and alt-click the eye next to the next layer group to get the next mask. Copy and paste this mask to the paint layer in each texture. Then add some detail to the roughness/gloss map (in a way that makes sense given the context of the item, how it's used, etc. etc.) and you're good to go.

    Basically all that Ddo does is speed this process up a lot.

    You can get a more complicated texture by photosourcing some of the material properties, like gloss and roughness. I also like to have a group for each material in the gloss map instead of just a layer, which makes it really easy to do different things with the gloss map. If you're photosourcing the diffuse map you may want to remove some lighting information. You can do this by converting the image to Lab colorspace, selecting the L channel, and running a high-pass filter, then converting the image back to RGB. You should try not to go overboard on this. You can always duplicate the layer, run the Lab highpass on one of the duplicates, then lower its opacity to get closer to the original photo. You should also ALWAYS keep the values of the photo in mind. Histogram use is essential to getting a good texture, and comparing a material histogram to that of some scan data is a good way to find out if you're on the right track with photosourcing complex materials like rocks or wood.

    I hope this has been helpful to you. Happy texturing!
  • Mirr
    Options
    Offline / Send Message
    Mirr polycounter lvl 2
    Thanks for taking the time and effort JedTheKrampus, I'll be trying these stuff out as soon as i get a hold of my PC, you're a star Jed!
  • Joltya
    Options
    Offline / Send Message
    Joltya polycounter lvl 10
    Holy crap Jed that was an amazing write up! You see a lot of stuff about how PBR works, but never any direct workflow tips! Thanks a lot! :thumbup:
  • beefaroni
    Options
    Offline / Send Message
    beefaroni sublime tool
    Wow. Ya, great writeup. I always did the R,G curvature map from Xnormal and just isolated either the Red or Green channel. I didn't know there was a easy way to use the monochrome map.
Sign In or Register to comment.