We can get a list of all available shader nodes by their type.
In Blender 2.83 in the EEVEE render engine the “Additive” and “Multiply” modes that were present in Blender 2.80 were removed from the possible transparency blending modes.
But if you need to use these transparency blending modes in Blender 2.83, you can get them with nodes.
Blender 3D add-on for converting material nodes into python source code and storing it in the library.
In Blender 2.8 node connectors in the “Shader Editor” window are straight by default, unlike earlier versions, where they bent curving. To return the usual connections bend, change the following settings:
- Open the “Preferences” window
- Switch to “Themes”
- Expand the “Node Editor” tree branch
- In the “Node Curving” field, set the value greater than 0. 0 means straight lines, the larger – the greater bend. A value of 4 corresponds to the bend that was in Blender 2.7x versions.
To shift the texture randomly on different objects, the easiest way is to change its location along any of the axes by a random value.
Procedural shader with Latin font made with Blender nodes.
By Sam (Worldsday) Brubaker
Available in the BIS library.
Simon Thommes published his stream about making a circuit board with shader nodes in the nodevember challenge.
Hans Chiu shared a stream about making a procedural animated zipper material.
The official Blender documentation provides a method to get the “Specular” value for the PBR-material reflections if the “IOR” value is known. To get the “Specular” value from the “IOR” value, we can use the following equation:
It is not difficult to create it with nodes:
There is a convenient opportunity in the Cycles render engine to render an object with shadows on a transparent background using material with the “shadow catcher” option. There is no such material in EEVEE render engine, however, in EEVEE we can make our own “shadow catcher” based only on nodes.
In Blender Cycles using common lamps we can illuminate objects with any texture, not just a single color.
Add an object, for example – sphere, to the scene:
shift+a – Mesh – UVSphere
and set a simple diffuse shader to it.
A single procedural element from the BIS library can be easily transformed into a repeating pattern.
Let’s get a single circular elemetn from the library and place it in the center of the plane.
Except for the “Gradient Texture” node, we can obtain a gradient factor by using some simple equations. Look for the mathematics with a spherical gradient sample.
- Uniform gradient
Can be created based on a downward-facing cone equation.
In Blender 2.8, the displacement node in Cycles render-engine was changed from scalar to vector. If you simply connect a black and white height map to the Displace input of the material output node, like in Blender 2.7, it will not give the desired result.
To make the correct node displacement in Blender 2.8 add “CombineXYZ” and “VectorDisplacement” nodes to the material node tree. Connect the height map to the “Y” input of the “CombineXYZ” node and its “Vector” output to the “Vector” input of the “VectorDisplacement” node. After that, connect the “Displacement” output of the “VectorDisplacement” node to the “Displacement” input of the material output node.
When we create a field on the add-on interface panel, the value of which changes something in the node tree, each time the user changes the field value the node tree recompiles. If the user changes the value in that field by holding and moving the mouse, too frequent node tree recompilation will cause Blender to hangs.
This problem can be solved using decorators for deferred updating of the node tree.
Code by Skarn.
Class for quick node creation by their type.
Code by Skarn.
def __init__( self
, node_tree : bpy.types.NodeTree
, x : float = -200
, y : float = -200
, delimeter : float = 300
self._x = x
self._y = y
self.tree = node_tree
self.delimeter = delimeter
for node in self.tree.nodes:
def add_node( self
, node_type : str
, node_name : str
, column : int
, row : int
, node_descr : str = ""
node = self.tree.nodes.new(node_type)
node.name = node_name
node.label = node_descr if node_descr else node_name
node.location = (self.delimeter * column + self._x, -self.delimeter * row + self._y)
The simplest way to pixelate texture, procedural or not – get the color from the single pixel and fill the region with required width and height (resolution) with this color.
Here is the gradient texture with red – green – blue colors:
To pixelate it with the first step of resolution we can make some vectors manipulations.
To make an integer input/output in the node group:
- Install the BIS add-on 1.5.2. version or later,
- Select the desired node group in the Node Editor,
- In T-panel in the “BIS” tab, “Tools” section: click “+ Input” to create an input or “+ Output” to create an output in the selected node group.
Example of tiling the procedural texture with random z-axis rotation with procedural nodes.
All used nodes are available in the Blender material library BIS.
Creating separate elements of procedural textures in Blender is quite simply – find the desired formula, rebuilt it using mathematical nodes, and as a result, get the desired shape. However, textures created this way have one feature – no tiling. Tiling – a cyclic texture duplication, most time is considered harmful, and professional 3D artists try to avoid texture tiling. But sometimes tiling is necessary, for example, when creating patterns or ornaments.
The procedural texture element is always created in a single instance. This is because all the mathematics that forms the actual procedural image is based on the initial data – coordinates that start from 0, spread out to infinity and not repeat. However, the same mathematics helps us to solve this problem.
All procedural textures in Blender are based on math. Even such irregular structures as “Voronoi” and “Noise” are actually generated according to the mathematical formulas. An exact mathematical algorithm is sewed up into each base material node to obtain the desired image as a result.
We can not specify such algorithms in Blender in the usual mathematical format. However, among other nodes, Blender provides us the “Math” nodes – the wrap over simple mathematical operations. Using these nodes we can build complex mathematical algorithms yourself, generating interesting textures.