Blender 2.8 Tips and Tricks
Below follows a collection of shaders, addons and general tips that I like to use when modeling and shading.
Diffuse texture for roughness
I found this shader setup in the You Say Armchair .blend file that you can download from blendswap. The model is created by piergi. The nice thing here, is that we use the diffuse texture directly for our roughness, so we don't need an extra texture and works perfectly.
You connect the diffuse texture to a
ColorRamp influences what range of colors you want to use for
the roughness. Next, you connect the
ColorRamp to a
node. You use this
MixRGB node to set the strength of the
roughness by making the color darker or brigher.
This material fades away based on the Z-height. This shader is
based on this one from Blender
You take the generated UV as input and attach it to a
Mapping node allows you to offset where we should
start fading away. To access the
z value from the UV, we use a
separate RGB. The value ranges from 0-1. We use a
flip this so that we have a range from 1-0 (1.0 at the bottom,
0.0 at the top). We then mix a transparent and emission node using
the output of the
- Use the
Mappingnode to change the offset for the effect.
- Use the
ColorRampto influence the falloff.
We can add a
Noise Texture to create a more dynamic shape. A
RGB Curves allows us to tweak the fallof a bit more.
I've got a renderer that uses a separate texture for roughness. Below I'll show you how to bake the roughness into a .png file. Let's say you've got this node setup:
A simple way to bake textures is to create a new separate
image node in the shader editor and make sure it's selected.
You add the image node, then press the
Now, make sure that this node is active and make sure that
your are using the
Cycles render engine. Open your
tab, scroll to the
Bake section. For the
Roughness and press the
Then you can open an image pane and save the generated
Export to GLTF using Principled BSDF Shader
GLTF and Blender use these channels:
- Occlusion = R
- Metallic = B
- Roughness = G
Use this node setup: