Blender Studio
  • Films
  • Projects
  • Training
  • Characters
  • Tools
  • Blog
  • Join
  • BLENDER.ORG

    • Download

      Get the latest Blender, older versions, or experimental builds.

    • What's New

      Stay up-to-date with the new features in the latest Blender releases.

    LEARNING & RESOURCES

    • Blender Studio

      Access production assets and knowledge from the open movies.

    • Manual

      Documentation on the usage and features in Blender.

    DEVELOPMENT

    • Developers Blog

      Latest development updates, by Blender developers.

    • Documentation

      Guidelines, release notes and development docs.

    • Benchmark

      A platform to collect and share results of the Blender Benchmark.

    • Blender Conference

      The yearly event that brings the community together.

    DONATE

    • Development Fund

      Support core development with a monthly contribution.

    • One-time Donations

      Perform a single donation with more payment options available.

Training Highlights
Stylized Rendering with Brushstrokes
Geometry Nodes from Scratch
Procedural Shading Fundamentals
Stylized Character Workflow

Training types
Course Documentation Production Lesson Workshop

Training categories
Animation Geometry Nodes Lighting Rendering Rigging Shading
Film Highlights
Wing It!
2023
Charge
2022
Sprite Fright
2021
Spring
2019
Project Highlights
Project DogWalk
Interactive
Gold
Showcase
BCON24 Identity
Showcase
Fighting with Grease Pencil
Article
Course
Procedural Shading: Fundamentals and Beyond
Introduction
  1. 01

    Introduction

    Free
  2. 02

    Definition

  3. 03

    Content Overview

  4. 04

    The Shader Editor

1: Fundamentals
  1. 01

    Colors, Values & Vectors

  2. 02

    Vectors and Pixels

  3. 03

    Coordinate Types

  4. 04

    Value Control

2: Procedural Textures
  1. 01

    Noise Textures

  2. 02

    Shape Control

  3. 03

    Repetition

  4. 04

    Texture Composition

  5. 05

    Space Manipulation

3: Shading Principles
  1. 01

    PBR

  2. 02

    Geometric Dependency - Context Sensitivity

  3. 03

    Generating PBR Maps

4: Shader Composition
  1. 01

    Blending & Masking

  2. 02

    Randomization

  3. 03

    Semi-Procedural Workflow

  4. 04

    Volumetric Shaders

5: Modular Setup
  1. 01

    Parametrization

  2. 02

    Nodegroups

6: Automation
  1. 01

    Drivers

  2. 02

    Animation

Workflow Examples
  1. 01

    Walls (Chapter 2+)

  2. 02

    Wood (Chapter 3+)

  3. 03

    Dynamic Walls (Chapter 4+)

  4. 04

    Wooden Boards (Chapter 5+)

  5. 05

    Fire (Chapter 6+)

  6. 06

    Rainy Window (Chapter 6+)

Files & Tools
  1. Example Scene
  2. Example Scene - Simplified Free
  3. Visualization (Chapter 1-4): Value Graph
  4. Visualization (Chapter 2-5): Space Origami
  5. Example Shader (Chapter 3-1): Rock
  6. Example Shader (Chapter 4-1): Dilapidated Cube Scene
  7. Example Shader (Chapter 4-3): Image Texture De-Tiling
  8. Example Shader (Chapter 4-3): Semi-Procedural Fishbones Boards
  9. Example Shader (Chapter 4-4): Procedural Volumetric Clouds

Login to view this content

Join Blender Studio for just €11.50/month and get instant access to all of our training and film assets!

Login Join Blender Studio
Simon Thommes
Simon Thommes Author
License CC-BY
Report Problem
2: Procedural Textures

Shape Control

You can get the file for the Value Graph Tool here: https://cloud.blender.org/p/procedural-shading/5f075c60f11c51bf02b95fa1

Download the resulting file here:

Blender File · 850.6 KB · CC-BY chapter_2-2.blend
Download File

Join to leave a comment.

33 comments
Antonia Mertes
Antonia Mertes
July 31st, 2024

I'm not sure if the comments here are still monitored, but I would have loved an explanation for why/how we know which value to plug into with input for the subtract node. As in, I don't really understand why the RGB Curves node is plugged into the B input of the Subtract - an explanation or maybe simple visual demonstration of how to decide where to plug which node would have been super helpful!

Simon Thommes
Simon Thommes
July 31st, 2024

@Antonia Mertes To understand which operation to use in which situation it's best to develop a mathematical intuition for what the operations do. I tried to fill this course with visual examples.If the different topics are not yet coming together for you, maybe you can try to go back a few chapters, where I talk about value control.

MOHAMMED AIMAN IZZUDDIN BIN ABD MALIK
MOHAMMED AIMAN IZZUDDIN BIN ABD MALIK
Jan. 10th, 2023

Hello Simon, can i know how blender process when i divide some value by 0 ?

Simon Thommes
Simon Thommes
Jan. 11th, 2023

@MOHAMMED AIMAN IZZUDDIN BIN ABD MALIK You should always try to avoid this. As correct behavior for this is not defined you will get unintended results in any case. In a shader this usually results in incredibly high/low values that are different per pixel.

MOHAMMED AIMAN IZZUDDIN BIN ABD MALIK
MOHAMMED AIMAN IZZUDDIN BIN ABD MALIK
Jan. 12th, 2023

@Simon Thommes i see, thank you Simon

Bora Semiz
Bora Semiz
Sept. 12th, 2021

Are there any books that you can recommend for beginners to familiarize themselves with application of these math subjects?

Simon Thommes
Simon Thommes
Sept. 12th, 2021

@Bora Semiz Besides my general math education from school/university I'm primarily self-taught, so I don't have specific literature that I can recommend fro my own experience, sorry. A resource that people kept bringing up when it came to this question in the past it thebookofshaders.com and from browsing it a bit it seems to be a fantastic resource. Even though it is not blender-specific, the concepts are universal.

Bora Semiz
Bora Semiz
Sept. 13th, 2021

@Simon Thommes Thank you very much. I just skimmed through the book you sent, it looks like something like what I am looking for.

Domas Astrauskas
Domas Astrauskas
Sept. 12th, 2021

Thnaks for this tutorial :)))

Chidi Jenkins-Johnston
Chidi Jenkins-Johnston
March 10th, 2021

I can't seem to download the chapter_2-2.blend file, I get an access denied. Other than that tutorial is fantastic!  Thank you!

Simon Thommes
Simon Thommes
March 11th, 2021

@Chidi Jenkins-Johnston Hm, for me it works, even without being logged in... Can you maybe report this as a bug? Instructions are here: https://cloud.blender.org/contact/

Tyler Stephens
Tyler Stephens
Feb. 24th, 2021

Why does Arctan2(X/Y) provide values outside the functions range of [-pi/2,  pi/2]. Also how does it handle it when Y is 0?

Simon Thommes
Simon Thommes
March 2nd, 2021

@Tyler Stephens The great thing about arctan2 is that you don't only pass in the quotient of the coordinates x/y but both coordinates individually. That's how you don't have to worry about the divisor being 0 and that's also how it's possible to gain values of the full 2pi range.

How it works is basically that the function is evaluated differently depending on what quadrant the coordinates are in.

Tighe Racicot
Tighe Racicot
Feb. 17th, 2021

@Simon I'm just about through this episode. It's taken me on a journey of basic trig, arctan2, polar coordinates. Circling back, I just wanted to confirm why removing the z coordinate to work with cylindrical coords vs spherical coords matters. After testing this on a cube instead of a plane, if I don't drop the z coordinate, everthing is black (or white, depending on the operation between the angle and radius). Is this because the third additional component causes the length to be too large? The angle is mapped to 0-1, but the length could then be greater than 1 or less than -1. Then again, there should be some intermittent values that would result in 0-1 output in the shader. So, I don't fully understand why keeping the z component would cause problems with spherical coordinates.

Simon Thommes
Simon Thommes
Feb. 17th, 2021

@Tighe Racicot The length of 3D coordinates is simply their distance from the origin. So on a cube that has a dimension on the z axis the z component also contributes to that distance. On a plane, where z=0 this does not matter but with the cube for example it does, as the z-component distorts the distance from the center. You can see the effect gradually have an effect when you scale the cube on the z-axis in edit mode down to a plane.

By ignoring the z-component you essentially use the distance from the z-axis, instead of the distance to the origin point. (cylindric vs spherical)

Tighe Racicot
Tighe Racicot
Feb. 11th, 2021

I realize I'm going to need to dive into some math if I want to level up in this area. @Simon, when you graph the arctan2 result of x and y, I can't wrap my head around why it's 3D (z values). The z coordinate was dropped off at the Separate XYZ. I had to research the arctan2 function itself. Given two coordinates, it can determine the signed angle (specific quadrant), starting at the positive x axis, outputting a range of values from -pi to +pi. But... why does it spiral vertically?

Simon Thommes
Simon Thommes
Feb. 12th, 2021

@Tighe Racicot The graph that is shown is simply a representation of the value that is shown. With this you are not looking at actual 3D data. Just the one-dimensional result of arctan2 on a two-dimensional plane (x,y). The fact that this is displayed along the z axis is due to the value graph tool that I introduced in Chapter 1-4 https://cloud.blender.org/training/procedural-shading/5f07557cb710f162b1d6b5a3

Tighe Racicot
Tighe Racicot
Feb. 13th, 2021

@Simon Thommes Thanks so much. I reviewed the video and it clicked.

Ellie MacQueen
Ellie MacQueen
Nov. 11th, 2020

Hello Simon, thanks for this fantastic tutorial series. It's saving my life this #nodevember ! Question, could you explain why the Multiply Add mode does the same thing as the Map Range nodes in vector terms? I understand that both operations are re-mapping the limited 0-1 range to a wider range (-1 to 1). But how does one multiply and add the vectors here to achieve that same end? Thank you!

Simon Thommes
Simon Thommes
Nov. 12th, 2020

@Ellie MacQueen I'm glad you're enjoying it! Basically the 'Map Range' node, under the hood, does the same thing as the multiply add node. It is just much more convenient due to the inputs that it takes.

In this example: Multiplying by 0.5 brings values from a range [-1 : 1] to a range [-0.5 : 0.5]. Then adding 0.5 brings it from there to [0 : 1]. So in total from [-1 : 1] to [0 : 1], which can directly specify as limits in the 'Map Range' node. The 'Map Range' node essentially just uses its inputs to find out what values it needs to multiply and add.

To be honest, if I made this video today, I wouldn't have included the 'Multiply Add' node at all here, as it just unnecessarily complicates things. But I hope this helps!

I'm not sure what you mean with 'in vector terms' here. Both nodes operate on values and a vector in Blender is just a container of 3 independent values. So to apply the same mapping to vectors you would have to either separate the components and control them individually or use vector math operations. (there is also a 'Vector Curves' node that I keep forgetting about)

Greg McKim
Greg McKim
Oct. 13th, 2020

It would be nice to see either an image with the finished node tree or a Blender file containing the final material

Simon Thommes
Simon Thommes
Oct. 13th, 2020

*@Greg McKim* You are right, I added the file in the description

Greg McKim
Greg McKim
Oct. 14th, 2020

*@Simon Thommes* Thanks much!

kroneborge
kroneborge
Sept. 21st, 2020

So much good info here, but I'm going to need to watch it about 10 times, lol

Michael Schwarz
Michael Schwarz
Aug. 20th, 2020

Using the Map Range Node before the RGB Curves node leads to negative values at the output of the RGB Curves node. Is that correct? (Min 2:16)

Simon Thommes
Simon Thommes
Aug. 20th, 2020

*@Michael Schwarz* The optput of the map range node, because clamping is activated, is strictly between its 'To' range (0 and 1). And because the RGB Curves node operates between 0 and 1 as well, the output of that node is also in that range.

The map range node is there to map the range of coordinates that the shape will be created on to the range in which the RGB Curves node operates.

Michael Schwarz
Michael Schwarz
Aug. 21st, 2020

*@Simon Thommes* Thanks for the reply. It took me some time and some trying but now I'd got it.

Pablo Gonzalez
Pablo Gonzalez
Aug. 19th, 2020

Hi Simon, in the latest version 2.83.4 the absolute node doesn´t works as expected (exactly , it does nothing) Is that hapend to you also? or I´m doing somethin wrong

Simon Thommes
Simon Thommes
Aug. 19th, 2020

*@Pablo Gonzalez* There should not have been any changes regarding the absolute node. I tested it on 2.83.5 and it works fine. My guess would be that you are accidentally clamping the negative values to 0 in an operation before, but that is hard to pin down without seeing the setup. You can post a screenshot and I'll take a look.

fu233
fu233
Sept. 12th, 2022

@Simon Thommes what is the function of CLAMP? I also made the same mistake.

Simon Thommes
Simon Thommes
Sept. 13th, 2022

@fu233 Clamping makes sure that your values don't go beyond a certain maximum/minimum. Usually in Blender nodes that is [0-1]. That is sometimes useful to make sure you are not working with values outside of the visible range, but oftentimes also a math operation requires the values outside of those bounds and clamping can give an incorrect result.

Pablo Gonzalez
Pablo Gonzalez
Aug. 19th, 2020

*@Simon Thommes* Exactly !! It was clamped. Thank you for your fast answer

Vsion Studio
Vsion Studio
Aug. 15th, 2020

Simon, this series is pure gold, but I'd encourage everybody who isn't a genius to play it at 0.75x speed, my brain can process it that way!

Films Projects Training Blog Blender Studio for Teams
Pipeline and Tools
  • CloudRig
  • Blender Kitsu
  • Brushstroke Tools Add-on
  • Blender Studio Extensions
Characters
  • Mikassa
  • Whale
  • Ballan Wrasse
  • Snow
Studio
  • Terms & Conditions
  • Privacy Policy
  • Contact
  • Remixing Music
Blender Studio

The creators who share.

Artistic freedom starts with Blender The Free and Open Source 3D Creation Suite