Tuesday, 12 August 2014

Experimental Cycles render Normal map and displacement map examples

I think I have Blender’s massively awkward node system starting to bleed into my brain

Here is a picture of the brick wall I am experimenting with

mybrickwall

Now I have taken this brick wall texture from http://www.cgtextures.com/ ‘cus most of these how do you texture examples always use a brick wall and that nearly always comes from cgtextures

Brick wall Texture

Using GIMP and insane bump plugin (which takes some fiddling with a text editor to get it to work but that's another tale) we can easily generate a range of normal maps and a displacement map

Normal Map

And

Displacement map

So to get any of this to work we must first UV unwrap the thing we want the texture to go on, in this case one side of a wall.

Next for the displacement map we need plenty of mesh so we have to subdivide that wall a good number of times, I chose 30 in this case.

Now comes the tricky part making the nodes.

Blender adds the Diffuse shader and Material Output nodes for you but we must add in a UV Map (under Input…) and set it to the UVmap we just made

Then to each of these jpgs of the wall we have each gets its own image texture node, each one of which is connected to the UV Map node.

justtexture

Which gives this

justtexture

The Normal map can either link to the Normal input of the diffuse shader or to the displacement input of the Material Output

normalmap-to-normal-shader-Which gives this

texture-normalmap-to-normalshader

Or

normalmap-to-displacement-o

texture-normalmap-to-Displacement output

The displacement map seems to only go to the displacement input of the Material output node

texture-and-displacement-on

Which gives this

texture and displacement only

And as you know doubt have notice each mapping texture I have connected to a Math node (Add –> Convertor –> Math) which just needs changing to multiply so you can adjust the strength of the effect.

POST SCRIPT

Looks like you don’t need to subdivide the mesh for displacement!

no need to subdivide

And this node layout (I have inserted a neutral diffuser so all we see is the displacement, that's the lower one that is connected to the output)

displacementonly

No comments: