I'm a noob at texturing, and was wondering if is possible to use multiple layers to have better control.


You can use a layer stack for texture painting if you've got the render engine set to Blender Internal, but there are plenty of caveats to be aware of and it's perhaps not as comparable to Photoshop as you might like, although it is workable.

First, set up your interface like this:

Layer paint interface setup

Stuff in brackets are knobs that need to be turned or fiddled with to have things working correctly. The UV/Image Editor should be set to Paint mode in the bottom bar, the viewport shading mode in the 3D View should be set to Material in the bottom bar, you should have the T panel open in the 3D View and set to the Tools tab, and you should have the Properties editor on the Textures tab, and then the Material Textures tab below that.

You can add layers in area 3 and change their blending modes. To "solo" a texture on the model, set the slot painting mode to Image and switch the 3D View view mode to Texture, then pick the layer of choice from the list. (The 3D View must be set to Multitexture in the N panel for this to work correctly.) Additionally, there's a button to save all of the layers that have changes, but that button will fail unless you've already saved out each new layer to your disk somewhere. Use area 4 to do that (and save them somewhere where you can remember where you put them) before using the Save All Images button or you'll get an error.

In area 1 you can reorder the layers with the up and down buttons, and delete the layers with the X button on the texture datablock just below.

In area 2 you can adjust the opacity of the layers. I recommend dragging this section of the properties up to the top using the little handle with eight dots on the upper right hand corner of each section.

I recommend using the baker to merge layers together. Make a new image and set it as the active image (easiest way to do this is by changing the painting mode to Image in area 3 and making a new image.) This image will hold the merged layers. Then, in your Properties editor in area 1 enable all of the texture layers that will contribute to the merged layer and disable all of the other texture layers. Go to the render settings tab of the Properties panel (it's the leftmost tab), go down to Bake, and set the bake mode to Textures. Make sure Selected to Active is unchecked, then press Bake, wait for the bake to happen, and save out the merged layer from the UV/Image editor. Go back to the Texture Properties tab and remove the texture slots that you have enabled and replace them with a new texture slot that uses the image you baked out.

A similar method can be used to convert procedural noises to something you can paint on.

The traditional blending modes work correctly with all color channels including diffuse and specular color. They don't work with scalar channels such as specular hardness, specular intensity, diffuse intensity, alpha, and emit, which use the DVar for blending instead.

If you just want to paint diffuse textures, you can safely ignore all of this DVar stuff.

First, for scalar channels, check RGB to Intensity for the texture slot so that you can paint with the regular old brushes.

The way that the DVar works is that Blender compares the value of DVar with the value of the scalar channel in the material properties. Then, if DVar is greater than that value, the texture slot will increase the value. But if DVar is less than that value, the texture slot will decrease the value. The more difference there is between the DVar and the value in the material, the more of a difference the texture makes, and if the texture is 100% white at a texel, the value of the scalar channel will be equal to that of the DVar.

It can be confusing, so let's use alpha transparency as an example. Most alpha maps are going to have white represent 100% opacity and black represent 100% transparency. To set this up with DVar, you first put the value that black represents in the material settings, which means on the Properties for that material you would enable Z Transparency and set Alpha and Specular Transparency (aka SpecTra in a few other places) to zero. Then, you would set the DVar to the value that white represents on your texture. In this case, where the texture is white it should have an alpha of one, so you should set the DVar to one. Here's the result of this setup:

How to paint an Alpha channel

The only scalar channel that's an exception to the rule is the specular hardness channel. For specular hardness, a DVar of 1.00 maps to a specular hardness of 255 and a DVar of 0.00 maps to a specular hardness of 1. So, if you're painting a texture for, say, a Dota 2 item and you want to be able to see the specular hardness map working as it would in the Source Engine, you would need to figure out the maximum specular hardness that's going to be used in your .vmt material file, and multiply it by 4 for compatibility between Blender and Source's Phong shader. So, if I'm painting an item for Faceless Void and I want the maximum Source specular hardness to be 20, the maximum specular hardness for Blender's Phong shader would be 80. You would then divide that by 255 to get the DVar you need to accurately depict the Dota 2 shader in Blender, so in this case I'd use 80/255=0.314 for the DVar for specular hardness and then on my specular hardness map black would map to a specular hardness of 1 (which I would set in the Material properties) and white would map to a specular hardness of 80.

If you want a texture to decrease a scalar value where it's white and leave it alone where it's black, you can do that by setting the material value to 1 and the DVar to 0.

  • $\begingroup$ OMG this is really good explanation, thank you sir, the last part about source is pretty interesting, I was thinking in try someday making a item for TF2, thanks again :D $\endgroup$ – Christian William Dec 9 '15 at 22:50

Yes, it is. Although rather than thinking in terms of "layers", try to think of it in terms of masks.

Here is an example of how to do this in Cycles. (Sorry, I'm probably not the best person to explain Blender Internal or I would add that too.)

Using a mask image to factor between two textures

So you create a third texture that is grayscale, and use this to factor the mix of the two textures. You can repeat this as many times as you like, expanding the node tree.

  • $\begingroup$ Oh thanks but it's not exactly what i'm looking for, but thanks again this might be useful in future projects :D $\endgroup$ – Christian William Dec 9 '15 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.