Quick Reference: Using Normal Maps in BI and Cycles

[box color=”gray”]Normals and Material Masking Series – Part 1 | Part 2 | Part 3[/box]

QR-Baking-Normals-from-Bump_Heading-Image

In Part 1 of this series I covered how to bake a normal map from a bump map using Blender Internal’s texture baking abilities. This part demonstrates how to properly apply a normal map to a material in both Blender Internal and Cycles.

To quickly review, I have a simple subdivided cube, with some holding loops, unwrapped and the UVs arranged to maximize the sides of the cube facing the camera. I have also loaded the normal map image into the UV/Image Editor workspace.

QR-Using-Normal-Maps-In-BI-And-Cycles_Cube-And-UVs
Cube UV layout and normal map

Using a Normal Map in Blender Internal

To apply a normal map to a material in Blender Internal, first add a material to the cube then add a new texture to the material. Next, select “Image or Movie” and load in the normal map image. Under Image Sampling check the box next to Normal Map. It’s also a good idea to check Minimum Filter Size under Filter and set the Filter Size to 0.10 (the lowest setting possible). This will give a better quality result, especially if the normal map image is not particularly large. Set the Mapping to UV and, under Influence, check Normal and set the value to 1.

QR-Using-Normal-Maps-In-BI-And-Cycles_BI-Texture-Settings
Texture settings for normal map in Blender Internal (Click for larger view)

Using a Normal Map in Cycles

To apply the normal map to the cube in Cycles, first, add a material to the cube. Now bring up the Node Editor workspace (I generally split the window vertically with the Node Editor on the top and the 3D Viewport on the bottom.) By default, you will have a Diffuse BSDF shader node plugged into the “Surface” socket of a Material Output node. We’ll just use the diffuse shader, but give it a sexy color.

QR-Using-Normal-Maps-In-BI-And-Cycles_Default-Nodes
Default Cycles material nodes

Now we need to get the normal map image into the mix and we’ll do that with two nodes: Texture Coordinate and Image Texture. First, hit SHIFT+A to add a node and select Input -> Texture Coordinate, we’ll use this to map the image to the UV coordinates of the cube. Then add an Image Texture node (Texture -> Image Texture). Plug the “UV” output socket of the Texture Coordinate node into the “Vector” input socket of the Image Texture node. Also, change the drop-down box below the image file on the Image Texture node from “Color” to “Non-Color Data.”

QR-Using-Normal-Maps-In-BI-And-Cycles_TexCoord-ImageTex-Nodes
Texture Coordinate and Image Texture nodes (Click for larger view)

Now at this point, there are two things I’ve seen people do that are not the best way to apply a normal map:

[list icon=”busy”]

  •  Plugging the “Color” output socket of the Image Texture Node into the “Displacement” input socket of the Material Output node.
  •  Adding a Normal node, plugging the “Color” output socket of the Image Texture node into the “Normal” input socket of the Normal Node and the “Dot” output socket into the “Displacement” input socket of the Material Output node.

[/list]

Doing either of these is mismatching data types, which are indicated by the color of the sockets. Though in some circumstances this works fine, it is usually best practice to avoid plugging a socket into a socket of a different color. In this case, though you will get some displacement as a result, you are essentially turning the normal map back into a bump map by limiting the range of data being used. (For more info on data types, etc. keep an eye out for an upcoming post: Understanding the Node Interface.)

QR-Using-Normal-Maps-In-BI-And-Cycles_Incorrect-Nodes
How NOT to set up a normal map (Click for larger view)

The proper way to apply the normal map is to add – no surprise here – a Normal Map node (Vector -> Normal Map). Then plug the “Color” output from the Image Texture node into the “Color” input of the Normal Map node and the “Vector” output into the “Normal” input of the Diffuse BSDF node. This converts the color data from the image (yellow socket) into vector data (purple socket) and applies it to the normal of the shader node. Make sure the drop-down box is set to “Tangent Space” and the UV box is set to “UV Map” (or whatever the name is of your object’s UV map to which the normal map is aligned.) I’m not sure why this UV option is here; the Image Texture node vector is already set to UV, but best to do both.

QR-Using-Normal-Maps-In-BI-And-Cycles_Proper-Nodes
Using the Normal Map node (Click for larger view)
QR-Using-Normal-Maps-In-BI-And-Cycles_Cycles-Render
Cube render with normal map in Cycles

If you are building a material that mixes multiple shader nodes, simply plug the Normal Map “Vector” output socket into the “Normal” input socket of all the shader nodes. (Not all shader nodes have a “Normal” input, such as Emitter shader nodes.) As an example, I’ve mixed a Glossy shader with the Diffuse shader and applied the normal map to both. (I’ve collapsed some nodes in the image below to save space.)

QR-Using-Normal-Maps-In-BI-And-Cycles_Mixed-Shader-Niodes
Using a normal map in a material with multiple shaders (Click for larger view)
QR-Using-Normal-Maps-In-BI-And-Cycles_Cycles-Render-Glossy
Cube render in Cycles with mixed shader material

The next part of this series, Material Masking in Cycles, will demonstrate how to use mask images derived from the original bump map to mix several shaders, producing the result below with one material.

QR-Baking-Normals-from-Bump_Final-Box

<- Part 1: Baking Normals from a Bump MapPart 3: Material Masking in Cycles ->

Some textures used in creating models appearing in imagery on this post are from CGTextures.com, a most excellent source for photo textures.

10 thoughts on “Quick Reference: Using Normal Maps in BI and Cycles

  1. Pingback: Material Masking in Cycles | theZEDLAB

  2. THANKYOU!
    This is terrific, not complicated at all, and easy to use.
    More tutorials should be like this.

    Cheers!
    Mealea

  3. Thanks I have tried this 11 ways with 11 different tutorials.
    looks like the twelfth one is the charm.
    I will be reading all you have.

  4. Pingback: How to use Normal Maps in Blender (Cycles) | JAY VERSLUIS

  5. На сайтах с низкой посещаемостью возможно показать за час-два и поправить за неделю.

    Проблемы которые сейчас я предлагаю разрешить:

    -Проинспектировать как работает с сайтом ваш специалист и проверить его компетентность?
    -Найду просчеты сделанные ранее и построю проект по исправлению ситуации.
    -Продемонстрирую как контролировать работу SEO эксперта.

    Планируете нанять SEO профессионала?

    -Проведу собеседование потенциальногоSEO специалиста. Разберем по каким стандартам оценивать его уровень.
    – Проанализируем различия между нанятым в штат SEO, делегированном SEO и раскрутке сайтов личными средствами.

    Желаете сами раскрутить существующий веб-сайт. Расскажу все насчет продвижения, после консультирования вам будет понятно:

    -Сколько будет стоить разработка вашего сайта
    -Сколько по времени необходимо будет его продвигать для того чтобы достичь топов
    -Из каких пунктов состоит само продвижение, в общем и целом разберем каждый из них.
    -Проанализируем в связи с чем не надо пользоваться услугами компаний, оказывающих обслуживание по SEO

    Намереваетесь создать сайт и организовать его продвижение?

    -Расскажу и также продемонстрирую как сделать весьма экономный и надежный вариант интернет-сайта.
    -Насколько объемным или сложным может быть ваш личный вебсайт чтобы составлять конкуренцию в топе.
    -Как много вбухивают ваши конкуренты в продвижение.
    -в какой мере осуществимо войти в топы с вашим вебсайтом и с вашим бюджетом.

    Хотите проверить окупится ли консультирование?

    Позвоните по телефону либо в скайп – я отвечу на все вопросы касающиеся SEO и любого веб-сайта.

    Любые вопросы – звоните +7(812)9114848 или по скайпу admin1.ru
    Часовая консультация стоит 3тыс руб, имеется возможность заключение соглашения и платеж на расчетный счет.
    Оказываю безвозмездные консультации за рекомендации (т.к. у подавляющей массы вебсайтов проблему видно практически сразу)

    acol7wns24

  6. Hi admin, i must say you have high quality posts here.
    Your blog should go viral. You need initial traffic
    boost only. How to get it? Search for: Mertiso’s tips go viral

Leave a Reply

Your email address will not be published. Required fields are marked *