Delaney King

Delaney King



Great question :) So in 3d school you learn to make models, unwrap them and make textures for the model, usually by hand painting or baking. However...

A shader is, in very simple terms, a recipe for how your GPU draws your model. It samples the textures, colors and values you feed it in the material settings, and then combines these with the UV coordinates, vertex colors, vertex normals, lighting information and...

...a bunch of other things and spits out colors onto the pixels (aka fragments) of a finished image (a buffer). The finished buffer is then drawn to the screen or combined with other buffers to do other bits of technical visual magic.

With the recipe analogy, a shader can take all these components you feed it and combine them all in countless ways. So when I am talking about not putting fine details into your model and baking that to your texture, and instead "doing it with a shader"...

It means you create a shader that takes pixels from two images - one of the models basic normals and combines it with data taken from a second very fine noise texture (usually called a detail map). Each texture you sample pixels from can have different UV coordines fed in.

This allows you to have one texture repeat once, but another texture repeat many times. You then combine the two sampled textured together using a function such as add, multiply, subtract, LERP (linear interpolate) or normal combine to produce the final image. It is a recipe.

If you are using unity, the bottom part of the material that uses the standard shader is dedicated to detail mapping already. You can also add a detail mask to say where you want those details to show or not.

A typical use for detail mapping is cloth. Rather than bake in the fabric texture, you repeat a tiling cloth like this maybe a hundred times over, and blend it with the baked textures that you repeat once.

Because you can tile as much as you like, there is no texture resolution limit. You can use this to zoom right into to pore level of a character, or to the fine dust on a table surface.

Imagine the bitmap size you would need to capture all this texture properly. A 4k isn't enough, and that is the size of a cinema screen. Just for a jumper or some jeans.

So don't bake these into your model normal map kids, do it with shaders.

Support my lessons by shouting me a coffee here...

I will be covering various ways to combine textures,masks and uv sets in my book series. Stay tuned.

Follow us on Twitter

to be informed of the latest developments and updates!

You can easily use to @tivitikothread bot for create more readable thread!
Donate 💲

You can keep this app free of charge by supporting 😊

for server charges...