# Technical Documentation: RodZill4/material-maker

> ℹ️ **Provenance:** Multi-Tier Ingestion · [CodeWiki Reference](https://codewiki.google/github.com/RodZill4/material-maker)

### Overview (README.md)

# Material Maker

This is a tool based on [Godot Engine](https://godotengine.org/) that can
be used to create textures procedurally and paint 3D models.

Its user interface is based on Godot's GraphEdit node: textures and brushes are
described as interconnected nodes.



## Download

- **[itch.io](https://rodzilla.itch.io/material-maker)**
- **[Steam](https://store.steampowered.com/app/4110830/Material_Maker/)**

On Windows, you can also install Material Maker using [Scoop](https://scoop.sh):

```text
scoop bucket add extras
scoop install material-maker
```
... or [Chocolatey](https://chocolatey.org/) (default or portable install):
```text
choco install material-maker
```
```text
choco install material-maker.portable
```

on macOS, you can also install Material Maker using [Homebrew](https://brew.sh/):

```text
brew install material-maker
```

Can't wait for next release? Automated builds from master branch are available (use at your own risk):

[](https://github.com/RodZill4/material-maker/actions/workflows/dev-desktop-builds.yml?query=branch%3Amaster)

## Documentation

- **[User manual](https://rodzill4.github.io/material-maker/doc/)**

## Translations

Translation files can be installed using the **Install** button in the **Preferences** dialog.

- [Chinese translation](https://raw.githubusercontent.com/RodZill4/material-maker/f1be50b21a0f4991ac39e12a5362f5c5eb4c83a0/material_maker/locale/translations/zh.csv) (Created by **free_king**)

## Community

- **[Discord server](https://discord.gg/PF5V3mFwFM)**
- **[Material Maker subreddit](https://www.reddit.com/r/MaterialMaker/)**

## License

Copyright (c) 2018-present Rodolphe Suescun and contributors

Unless otherwise specified, files in this repository are licensed under the
MIT license. See [LICENSE.md](LICENSE.md) for more information.

---

### Material Maker Doc Aperture Nodes (`material_maker/doc/aperture_nodes.rst`)

Aperture Nodes
~~~~~~~~~~~~~~

**Aperture** nodes can be used to make connections
without a visible link.

.. image:: images/node_miscellaneous_aperture_in.png
	:align: left
	
.. image:: images/node_miscellaneous_aperture_out.png
  :align: left

In/Out nodes are connected via an identifier displayed as a
label on top of the node. This can be set by double-clicking the
node/label or pressing F2/Enter when a node is selected.

Label color can be changed by pressing F when a node is selected.

While multiple output nodes can use the same identifier to reference
the same input node, input nodes must use unique(to the current graph/subgraph) identifiers.

.. image:: images/aperture_node.gif
	:align: center

---

### Material Maker Doc Base Library (`material_maker/doc/base_library.rst`)

Nodes library
=============

This section describes all nodes that are provided in the base library
to describe procedural materials.

.. toctree::
	:maxdepth: 2

	nodes_material
	nodes_simple
	nodes_3d
	nodes_pattern
	nodes_noise
	nodes_filter
	nodes_transform
	nodes_workflow
	nodes_miscellaneous

---

### Material Maker Doc Command Line (`material_maker/doc/command_line.rst`)

Command line arguments
======================

When launched with no command line argument, Material Maker will start with an empty project.

When launched with the path of a .ptex file as command line argument, Material Maker will
start with this project file. Material Maker can thus be associated to files with .ptex
extension so double-clicking on them will directly open them.

Material Maker can also be used to export several .ptex file with the following command line:

 material_maker --export-material --target <engine> -o <output_path> <input_files>

Where:

* **engine** is the target engine/platform (Blender, Godot, Unity or Unreal)
* **output_path** is the path where files will be generated
* **input_files** is the list of input files (wildcards are accepted)

---

### Material Maker Doc Export (`material_maker/doc/export.rst`)

.. _export-section:

Exporting Materials
===================

When exporting a material, using either the Export submenu or the command line arguments,
Material Maker generates PNG image files for all elements of the material as well as
specific files for the target game engine.

In all cases, the generated PNG files (and especially the normal map) are generated in the
correct format.

Blender
-----------------

When exporting for Blender, Material Maker will only generate PNG/EXR images, thus the material must be built manually using the shader editor.

The `Add Principled Texture Setup <https://docs.blender.org/manual/en/latest/addons/node/node_wrangler.html#add-principled-texture-setup>`_ feature from the `Node Wrangler <https://docs.blender.org/manual/en/latest/addons/node/node_wrangler.html>`_ add-on can be helpful to automate the material creation process down to several clicks:

.. image:: images/blender_mat_demo.gif
  :align: center

Godot game engine
-----------------

When exporting for the Godot game engine, Material Maker will generate a .tres file that
describes a fully configured SpatialMaterial.

Unity game engine
-----------------

When exporting for the Unity game engine, Material Maker will generate a .mat file that
describes a fully configured material. It is thus possible to export materials directly
into one of your project assets directory, and Unity will automatically detect the newly
exported materials.

Depending on the Material node type, several Unity targets may be available.

Unreal game engine
------------------

Unreal Engine 4
^^^^^^^^^^^^^^^

When exporting for the Unreal game engine version 4.x, Material Maker will only
generate PNG images and a .mm2ue file. The material must be built manually inside
the Unreal Engine editor by following the instructions in this file.

This will generally consist in:

* Copying a material file from the **export** directory in Material Maker installation

* in the newly created material:

  * assigning generated textures

  * copying the shader generated in the .mm2ue file into a Custom node

  * creating new inputs in the custom node and TextureObject nodes, assigning the textures and connecting them

.. image:: images/unreal_export.png
  :align: center

Unreal Engine 5
^^^^^^^^^^^^^^^

When exporting for the Unreal game engine version 5.x, Material Maker will generate a
Python script that creates the material in Unreal.

Initial setup
~~~~~~~~~~~~~

Before exporting a material, it is necessary to configure a python path in Unreal for
Material Maker:

* in Unreal Engine, open the Project Settings window using the **Edit/Project Settings...** menu

* in this window, type "Python" in the search bar or select the **Plugins/Python** section

* in the **Additional paths** array, add the full path of the **export** directory of your Material Maker installation

* Unreal Engine will prompt to restart. When this is done, the project is ready to import generated materials

.. image:: images/ue5_setup.png
  :align: center

Exporting materials
~~~~~~~~~~~~~~~~~~~

When exporting a material for Unreal Engine 5, Material Maker will generate a python script,
texture files and a shader file, and will store the full path of the script into the clipboard,
so you just have to paste it into Unreal's 5 Python prompt and execute it to create the material.

When exporting, the target path is not that important (all necessary files will be imported into
the Unreal project), but the file name will be used as material name.

---

### Material Maker Doc Index (`material_maker/doc/index.rst`)

Material Maker User Manual
==========================

.. toctree::
   :maxdepth: 2

   intro
   user_interface
   nodes
   base_library
   export
   command_line

---

### Material Maker Doc Intro (`material_maker/doc/intro.rst`)

Introduction
============

Material Maker is a PBR procedural material editor as well as a texture painting tool based on
the Godot Engine.

As a procedural procedural material authoring tool, it can be used to describe the textures
that define a material by interconnecting basic nodes that generate, transform, filter or
combine their input textures in a graph.

.. image:: images/screenshot.png

As a texture painting tool, it provides a way to describe brushes using the same nodes,
and paint directly on 3D models.

.. image:: images/painting_screenshot.png

Being based on the Physically Based Rendering approach, Material Maker can be used to
describe the Albedo, Metallic, Roughness, and Emission channels of a material, as well
as a normal and a Depth map. Those channels can also be painted on 3D models in the
painting tool.

---

### Material Maker Doc Material Nodes (`material_maker/doc/material_nodes.rst`)

Material nodes
--------------

Material nodes are a specific type of shader nodes, with the following differences:

* their outputs cannot be connected in the material graph, but are used to generate
  image files when exporting

* they define a preview shader used in the Preview Panel and to generate preview for
  the website

* they define export targets for the material

There can be only one material node in a material graph.

.. image:: images/material_node.png
	:align: center

The type of material can be modified using the context menu. Custom material nodes
can also be copied and pasted using this menu.

A material node can be made editable using the *Control+W* keyboard shortcut.
This shows buttons to edit, load and save the node.

Editing a material node will show the **Material Editor** window.

Creating and modifying Material nodes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Material nodes have a node editor dialog similar to the shader node editor, with an
additional **Preview** tab where a shader can be defined for the 3D preview of the
material.

.. image:: images/material_editor_general.png
	:align: center

The preview shader must be specified using the Godot Shading Language for the
3D preview.

Specific directives can be used to insert code generated from inputs and parameters:

* **$if** directives can be used to define conditional sections in the preview shader,
  and the conditional expressions can check parameter values (using the **$(param:param_name)**
  syntax) and if input ports are connected (using the **$(connected:port_name)**
  syntax).
* uniforms of type sampler2D can be assigned a generated texture, defined by an output,
  specified by adding **$output(output_index)** as comment after the uniform declaration. 
* **$begin_generate** /  **$end_generate** can be used to define sections where
  parameters and inputs (prtefixed with a $ character) are replaced with
  corresponding generated code.
* **$definitions** can be used to generate all definitions (of uniforms, functions,
  etc.) necessary for all generated code.

Adding and modifying export targets
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Material nodes can be assigned export targets to generate materials for various
game engines and tools. Those export targets can be defined using the **Edit
export targets** entry of the node's context menu, that will show the **Material
Export Editor** window.

.. image:: images/material_editor_export.png
	:align: center

The **Material Export Editor** window consists of:

* a toolbar where targets can be selected, duplicated, renamed, loaded and saved

* an **Export** tab where export targets can be created with the definition of all
  files that must be generated

* a **Custom** tab where text filter functions can be defined in GDScript to be used
  in the export templates 

Export Editor Toolbar
~~~~~~~~~~~~~~~~~~~~~

The export editor toolbar has buttons and controls, from left to right, to:

* Create a new export target

* Load an export target from a file (this option does not check that the export target is
  suited for the current material, so it can exsily be used to adapt existing targets to
  another material node type)

* Select the current export target

* Rename the current export target

* Specify if the current export target should be stored in the material or as a separate
  file (this option is only available for default material types)

* Save the current export target to a file. Files saved using this option can be loaded
  using the load button of the Export Editor, or installed by dropping the file into
  the Material Maker application window

* Duplicate the current export target

* Delete the current export target

* Select the - the current export target

Exports tab
~~~~~~~~~~~

The exports tab can be used to create export targets for the material.

Export targets can be created, removed, duplicated, and their main file extension
defined. 

For each export target, it is possible to define several generated files.

Each file has a name (where **$(path_prefix)** is replaced), and an optional
condition that can be used to skip useless generated files. Supported conditions
are in the form **$(connected:input_name)**.

Files also have a **Prompt overwrite** option that makes it possible to not
overwrite them when exporting (this is useful when you manually updated an
exported material).

There are 4 types of generated files:

* Texture files, that are defined by an output index or an expression that uses
  inputs and parameters of the material node. The corresponding output or expression
  will be rendered and saved as a file. Supported formats are PNG and EXR.

* Template files are text files, modified using the following directives:

  * **$begin_generate** / **$end_generate** can be used to define sections where
    parameters and inputs (prefixed with a $ character) are replaced with
    corresponding generated code. Those sections accept a list of keywords that
    describe text filters to be applied to the section. Predefined filters are
    **float_uniform_to_const**, **rename_buffers**, **unity**, **unreal**...
  
  * **$definitions** can be used to generate all definitions (of uniforms, functions,
    etc.) necessary for all generated code. Filters are also accepted.
  
  * **$if** / **$fi** sections can be used to remove parts of the generated files,
    using the file condition syntax described above.

  * **$begin_buffers** / **$end_buffers** sections repeat their contents for each
    buffer used in generated shaders. In those sections, **$(file_prefix)** and 
    **$(buffer_index)** will be replaced with their values.
  
* Buffer files are similar to Texture files and are generated for each
  buffer used in generated shaders. In the file name, **$(file_prefix)** and 
  **$(buffer_index)** will be replaced with their values.

* Buffer templates are Templates defined for each buffer used in generated shaders.

Custom
~~~~~~

The custom tab can be used to create custom text filters for **$begin_generate** /
**$end_generate** and **$definitions** sections in GDScript.

---

### Material Maker Doc Node 3d Box (`material_maker/doc/node_3d_box.rst`)

Box node
~~~~~~~~

The **Box** node outputs a grayscale image that represents the depth of a 3D box.

.. image:: images/node_3d_box.png
	:align: center

Inputs
++++++

The **Box** node does not accept any input.

Outputs
+++++++

The **Box** node provides an output that generates a grayscale image showing the
selected 3D box.

Parameters
++++++++++

The **Box** node has the following parameters:

* the *box center position* as X, Y and Z coordinates
* the *box size* along X, Y and Z axes
* the *rotation of the box* around X, Y and Z axes

Example images
++++++++++++++

.. image:: images/node_3d_box_samples.png
	:align: center

---

### Material Maker Doc Node 3d Sdf (`material_maker/doc/node_3d_sdf.rst`)

3D signed distance function geometry nodes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The signed distance function nodes can be used to define complex 3D geometry using simple
shapes.

They are based on a very small set of basic shapes, that can be combined using operators,
and finally output as a grayscale heightmap and a color normal map using the **render** node.

Describing 3D objects using SDF primitives is more difficult than using existing meshes, but this
method integrates smoothly with shader generation, and (as many nodes in Material Maker) is
resolution independant.

All shapes can be associated to a color index that can be used to apply different (2D or 3D) textures
to the result.

All output samples shown in this section are preview images.

All Signed Distance Functions nodes are based on code written by Inigo Quilez that can be found
`on this page`__.

.. _sdf3dpage: https://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm

__ sdf3dpage_

.. toctree::
	:maxdepth: 1

	node_3d_sdf_render
	node_3d_sdf_color

Shapes
++++++

.. toctree::
	:maxdepth: 1

	node_3d_sdf_shapes_sphere
	node_3d_sdf_shapes_box
	node_3d_sdf_shapes_cylinder
	node_3d_sdf_shapes_capsule
	node_3d_sdf_shapes_cone
	node_3d_sdf_shapes_torus
	node_3d_sdf_shapes_plane
	node_3d_sdf_shapes_angle
	node_3d_sdf_shapes_link
	node_3d_sdf_shapes_hex_prism
	node_3d_sdf_shapes_cut_sphere
	node_3d_sdf_shapes_box_frame
	node_3d_sdf_shapes_solid_angle
	node_3d_sdf_shapes_pyramid
	node_3d_sdf_shapes_ellipsoid
	node_3d_sdf_shapes_octahedron

Operators
+++++++++

.. toctree::
	:maxdepth: 1

	node_3d_sdf_operators_boolean
	node_3d_sdf_operators_smoothboolean
	node_3d_sdf_operators_rounded
	node_3d_sdf_operators_elongation
	node_3d_sdf_operators_repeat
	node_3d_sdf_operators_circlerepeat
	node_3d_sdf_operators_extrusion
	node_3d_sdf_operators_revolution
	node_3d_sdf_operators_morph
	node_3d_sdf_operators_sdf_fbm

Transforms
++++++++++

.. toctree::
	:maxdepth: 1

	node_3d_sdf_transforms_translate
	node_3d_sdf_transforms_scale
	node_3d_sdf_transforms_scale_xyz
	node_3d_sdf_transforms_rotate

Example images
++++++++++++++

.. image:: images/node_sdf3d_samples.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Color (`material_maker/doc/node_3d_sdf_color.rst`)

Color node
..........

The **Color** node is variadic and assigns a color index to the 3D signed distance function it receives as input.
The color index map is generated when rendering the 3D scene using the **Render** node and can be
used later to assign different materials to different shapes.

.. image:: images/node_3d_sdf_color.png
	:align: center

Inputs
::::::

The **Color** node accepts one or more inputs in 3D signed distance function format.

Outputs
:::::::

The **Color** node generates a colored signed distance function.

Parameters
::::::::::

The **Color** node accepts the color index (a float value between 0 and 1) that will be assigned.

---

### Material Maker Doc Node 3d Sdf Operators Boolean (`material_maker/doc/node_3d_sdf_operators_boolean.rst`)

Boolean node
............

The **Boolean** node generates a 3D signed distance function for the combination (union,
intersection or difference) of its inputs. If the input shapes are associated to color indexes, the
boolean node applies them to the output.

.. image:: images/node_3d_sdf_operators_boolean.png
	:align: center

Inputs
::::::

The **Boolean** node accepts two or more inputs in 3D signed distance function format.

This node is variadic, and more shapes can be added.

Outputs
:::::::

The **Boolean** node generates a signed distance function of the
combination of its inputs.

Parameters
::::::::::

The **Boolean** node accepts *the operator it applies (union, intersection or
difference)* as parameter.

Example images
::::::::::::::

.. image:: images/node_sdf3d_boolean_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Operators Circlerepeat (`material_maker/doc/node_3d_sdf_operators_circlerepeat.rst`)

CircleRepeat node
.................

The **CircleRepeat** node generates a 3D signed distance image of a circular repetition of its
input. The source object must be offset in the positive Y direction from the center.

.. image:: images/node_3d_sdf_operators_circle_repeat.png
	:align: center

Inputs
::::::

The **CircleRepeat** node accepts an input in 3D signed distance function format.

Outputs
:::::::

The **CircleRepeat** node generates a signed distance function of the
repeated version of the input shape.

Parameters
::::::::::

The **CircleRepeat** node accepts the following parameters: 

* *Count* controls the number of copies of the input
* *Variations* controls whether the input is sampled with variations

Example images
::::::::::::::

.. image:: images/node_sdf3d_circlerepeat_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Operators Elongation (`material_maker/doc/node_3d_sdf_operators_elongation.rst`)

Elongation node
...............

The **Elongation** node generates a 3D signed distance function of a shape
based on its input that has been elongated from its center.

.. image:: images/node_3d_sdf_operators_elongation.png
	:align: center

Inputs
::::::

The **Elongation** node accepts an input in 3D signed distance function format.

Outputs
:::::::

The **Elongation** node generates a signed distance function of the
elongated version of the input shape.

Parameters
::::::::::

The **Elongation** node accepts 3 X, Y and Z parameters that specify the elongation amount along each axis.

Example images
::::::::::::::

.. image:: images/node_3d_sdf_operators_elongation_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Operators Extrusion (`material_maker/doc/node_3d_sdf_operators_extrusion.rst`)

Extrusion node
..............

The **Extrusion** node generates a 3D signed distance function of a shape based on
its (2D signed function) input extruded along the specified axis.

.. image:: images/node_3d_sdf_operators_extrusion.png
	:align: center

Inputs
::::::

The **Extrusion** node accepts an input in 2D signed distance function format.

Outputs
:::::::

The **Extrusion** node generates a signed distance function of the
extruded version of the input shape.

Parameters
::::::::::

The **Extrusion** node accepts the *length* of the extruded shape 
and *axis* to be extruded from as parameters. 

Example images
::::::::::::::

.. image:: images/node_sdf3d_extrusion_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Operators Morph (`material_maker/doc/node_3d_sdf_operators_morph.rst`)

Morph node
..........

The **Morph** node generates a 3D signed distance function obtained by mixing two input
3D signed distance functions.

.. image:: images/node_3d_sdf_operators_morph.png
	:align: center

Inputs
::::::

The **Morph** node accepts 2 inputs in 3D signed distance function format.

Outputs
:::::::

The **Morph** node generates a signed distance function of the
combination of its inputs.

Parameters
::::::::::

The **Morph** node accepts *the mix factor* as parameter.

Example images
::::::::::::::

.. image:: images/node_sdf3d_morph_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Operators Repeat (`material_maker/doc/node_3d_sdf_operators_repeat.rst`)

Repeat node
...........

The **Repeat** node generates a 3D signed distance image of a repetition of its
input on the X and Y axes. It can also apply a random rotation to the repeated
object instances.

.. image:: images/node_3d_sdf_operators_repeat.png
	:align: center

Inputs
::::::

The **Repeat** node accepts an input in 3D signed distance function format.

Outputs
:::::::

The **Repeat** node generates a signed distance function of the
repeated version of the input shape.

Parameters
::::::::::

The **Repeat** node accepts the following parameters:

* *the repetition offset* for both X and Y axes
* *the amount of random rotation* applied to all instances
* *variation* controls whether the input is sampled with variations

Example images
::::::::::::::

.. image:: images/node_sdf3d_repeat_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Operators Revolution (`material_maker/doc/node_3d_sdf_operators_revolution.rst`)

Revolution node
...............

The **Revolution** node generates a 3D signed distance function of a shape based on
the revolution along the specified axis of its (2D signed function) input.

.. image:: images/node_3d_sdf_operators_revolution.png
	:align: center

Inputs
::::::

The **Revolution** node accepts an input in 2D signed distance function format.

Outputs
:::::::

The **Revolution** node generates a signed distance function of the
revolution of the input shape.

Parameters
::::::::::

The **Revolution** node accepts the *axis* and *radius* of the revolution
operation as parameters. 

Example images
::::::::::::::

.. image:: images/node_sdf3d_revolution_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Operators Rounded (`material_maker/doc/node_3d_sdf_operators_rounded.rst`)

Rounded node
............

The **Rounded** node generates a 3D signed distance function of a rounded shape
based on its input, by substracting a constant from its input (i.e.
"growing" it towards the outside).

.. image:: images/node_3d_sdf_operators_rounded.png
	:align: center

Inputs
::::::

The **Rounded** node accepts an input in 3D signed distance function format.

Outputs
:::::::

The **Rounded** node generates a signed distance function of the
rounded version of the input shape.

Parameters
::::::::::

The **Rounded** node accepts the following parameters:

* *the distance* to be substracted from the function

Example images
::::::::::::::

.. image:: images/node_sdf3d_roundedshape_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Operators Sdf Fbm (`material_maker/doc/node_3d_sdf_operators_sdf_fbm.rst`)

SDF FBM node
............

The **SDF FBM** node adds layers of noise to a base 3D SDF shape.

.. image:: images/node_3d_sdf_operators_sdf_fbm.png
	:align: center

Inputs
::::::

The **SDF FBM** node accepts a single input in 3D signed distance function format.

Outputs
:::::::

The **SDF FBM** node generates a signed distance field of the base shape with the noise applied to it.

Parameters
::::::::::

The **SDF FBM** node accepts the following parameters.

* The *Mode* of the operation, either additive of subtractive.

* The amount of *Iterations* performed.

* The *Smoothness* of the boolean operation performed at each iteration.

* A *Scaling* control to adjust how much the size of the noise is adjusted at each iteration.

Example images
::::::::::::::

.. image:: images/node_sdf3d_sdf_fbm_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Operators Smoothboolean (`material_maker/doc/node_3d_sdf_operators_smoothboolean.rst`)

SmoothBoolean node
..................

The **SmoothBoolean** node generates a 3D signed distance image for the combination (union,
intersection or difference) of its inputs. If the input shapes are associated to color indexes, the
smooth boolean node applies them to the output.

.. image:: images/node_3d_sdf_operators_smooth_boolean.png
	:align: center

Inputs
::::::

The **SmoothBoolean** node accepts two or more inputs in signed distance function format.

This node is variadic, and more shapes can be added.

Outputs
:::::::

The **SmoothBoolean** node generates a signed distance function of the
combination of its inputs.

Parameters
::::::::::

The **SmoothBoolean** node accepts the following parameters:

* *the operator it applies (union, intersection or difference)*
* *the smoothness* of the operation

Example images
::::::::::::::

.. image:: images/node_sdf3d_smoothboolean_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Render (`material_maker/doc/node_3d_sdf_render.rst`)

Render node
...........

The **Render** node generates images from a 3D signed distance function inputs.

.. image:: images/node_3d_sdf_render.png
	:align: center

Inputs
::::::

The **Render** node accepts an input in 3D signed distance function format.

Outputs
:::::::

The **Render** node generates two images from its input:

* a *height map* of the rendered input along the Z axis
* a *normal map* of the rendered input calculated directly
  using the 3D signed function (and consequently more
  accurate than a normal map generated from the height map)

Parameters
::::::::::

The **Render** node does no accept any parameter.

---

### Material Maker Doc Node 3d Sdf Shapes Angle (`material_maker/doc/node_3d_sdf_shapes_angle.rst`)

Angle node
..........

The **Angle** node generates a 3d signed distance function for two planes that form a given angle.
It has little use on its own and will generatty be used to cut or intersect other shapes.

.. image:: images/node_3d_sdf_shapes_angle.png
	:align: center

Inputs
::::::

The **Angle** node does not accept any input.

Outputs
:::::::

The **Angle** node generates a signed distance function for both planes.

Parameters
::::::::::

The **Angle** node accepts as parameters the axis and value of the angle.

---

### Material Maker Doc Node 3d Sdf Shapes Box (`material_maker/doc/node_3d_sdf_shapes_box.rst`)

Box node
........

The **Box** node generates a 3d signed distance function for a box with rounded corners.

.. image:: images/node_3d_sdf_shapes_box.png
	:align: center

Inputs
::::::

The **Box** node does not accept any input.

Outputs
:::::::

The **Box** node generates a signed distance function for a box.

Parameters
::::::::::

The **Box** node accepts the following parameters:

* the X, Y and Z sizes of the box (not including the rounded corners and edges)
* the radius of the rounded corners and edges

Example images
::::::::::::::

.. image:: images/node_sdf3d_box_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Shapes Box Frame (`material_maker/doc/node_3d_sdf_shapes_box_frame.rst`)

Box Frame node
..............

The **Box Frame** node generates a 3d signed distance function for a box frame.

.. image:: images/node_3d_sdf_shapes_box_frame.png
	:align: center

Inputs
::::::

The **Box Frame** node does not accept any input.

Outputs
:::::::

The **Box Frame** node generates a signed distance function for a box frame.

Parameters
::::::::::

The **Box Frame** node accepts the following parameters:

* The X, Y and Z sizes of the box (not including the rounded corners and edges).

* The **Thickness** of the frame.

* The **Radius** of the rounded corners and edges.


Example images
::::::::::::::

.. image:: images/node_sdf3d_box_frame_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Shapes Capsule (`material_maker/doc/node_3d_sdf_shapes_capsule.rst`)

Capsule node
............

The **Capsule** node generates a 3d signed distance function for a capsule.

.. image:: images/node_3d_sdf_shapes_capsule.png
	:align: center

Inputs
::::::

The **Capsule** node accepts an optional profile as input (use a Tonality node to create it).

Outputs
:::::::

The **Capsule** node generates a signed distance function for a capsule.

Parameters
::::::::::

The **Capsule** node accepts as parameters the length of the capsule and its radius.

Example images
::::::::::::::

.. image:: images/node_sdf3d_capsule_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Shapes Cone (`material_maker/doc/node_3d_sdf_shapes_cone.rst`)

Cone node
............

The **Cone** node generates a 3d signed distance function for an infinite cone.

.. image:: images/node_3d_sdf_shapes_cone.png
	:align: center

Inputs
::::::

The **Cone** node does not accept any input.

Outputs
:::::::

The **Cone** node generates a signed distance function for a cone.

Parameters
::::::::::

The **Cone** node accepts as parameters the *angle* of the cone.

Example images
::::::::::::::

.. image:: images/node_sdf3d_cone_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Shapes Cut Sphere (`material_maker/doc/node_3d_sdf_shapes_cut_sphere.rst`)

Cut Sphere node
...............

The **Cut Sphere** node generates a 3d signed distance function for a sphere cut by a plane.

.. image:: images/node_3d_sdf_shapes_cut_sphere.png
	:align: center

Inputs
::::::

The **Cut Sphere** node does not accept any input.

Outputs
:::::::

The **Cut Sphere** node generates a signed distance function for a sphere cut by a plane.

Parameters
::::::::::

The **Cut Sphere** node accepts the following parameters:

* The **Radius** of the sphere.

* The **Amount** defines the portion of the sphere to be cut.

Example images
::::::::::::::

.. image:: images/node_sdf3d_cut_sphere_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Shapes Cylinder (`material_maker/doc/node_3d_sdf_shapes_cylinder.rst`)

Cylinder node
.............

The **Cylinder** node generates a 3d signed distance function for a cylinder.

.. image:: images/node_3d_sdf_shapes_cylinder.png
	:align: center

Inputs
::::::

The **Cylinder** node does not accept any input.

Outputs
:::::::

The **Cylinder** node generates a signed distance function for a cylinder.

Parameters
::::::::::

The **Cylinder** node accepts as parameters the length of the cylinder and its radius.

Example images
::::::::::::::

.. image:: images/node_sdf3d_cylinder_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Shapes Ellipsoid (`material_maker/doc/node_3d_sdf_shapes_ellipsoid.rst`)

Ellipsoid node
~~~~~~~~~~~~~~

The **Ellipsoid** node generates a 3d signed distance function for an ellipsoid.

.. image:: images/node_3d_sdf_shapes_ellipsoid.png
	:align: center

Inputs
++++++

The **Ellipsoid** node does not accept any input.

Outputs
+++++++

The **Ellipsoid** node generates a signed distance function for an ellipsoid.

Parameters
++++++++++

The **Ellipsoid** node accepts the following parameters:

* **X** , **Y** and **Z** sizes of the ellipsoid

Example images
++++++++++++++

.. image:: images/node_sdf3d_ellipsoid_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Shapes Hex Prism (`material_maker/doc/node_3d_sdf_shapes_hex_prism.rst`)

Hexagonal Prism node
....................

The **Link** node generates a 3d signed distance function for a hexagonal prism.

.. image:: images/node_3d_sdf_shapes_hexagonal_prism.png
	:align: center

Inputs
::::::

The **Hexagonal Prism** node does not accept any input.

Outputs
:::::::

The **Hexagonal Prism** node generates a signed distance function for a hexagonal prism.

Parameters
::::::::::

The **Hexagonal Prism** node accepts **Radius** and **Height** of the hexagonal prism as parameters.

Example images
::::::::::::::

.. image:: images/node_sdf3d_hex_prism_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Shapes Link (`material_maker/doc/node_3d_sdf_shapes_link.rst`)

Link node
.........

The **Link** node generates a 3d signed distance function for a link.

.. image:: images/node_3d_sdf_shapes_link.png
	:align: center

Inputs
::::::

The **Link** node does not accept any input.

Outputs
:::::::

The **Link** node generates a signed distance function for a link.

Parameters
::::::::::

The **Link** node accepts the following parameters:

* The **Length** of the link.

* The **Major Raidus** and **Minor Radius** of the link.

Example images
::::::::::::::

.. image:: images/node_sdf3d_link_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Shapes Octahedron (`material_maker/doc/node_3d_sdf_shapes_octahedron.rst`)

Octahedron node
~~~~~~~~~~~~~~~

The **Octahedron** node generates a 3d signed distance function for an octahedron.

.. image:: images/node_3d_sdf_shapes_octahedron.png
	:align: center

Inputs
++++++

The **Octahedron** node does not accept any input.

Outputs
+++++++

The **Octahedron** node generates a signed distance function for an octahedron.

Parameters
++++++++++

The **Octahedron** node accepts a single parameter, its radius.

Example images
++++++++++++++

.. image:: images/node_sdf3d_octahedron_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Shapes Plane (`material_maker/doc/node_3d_sdf_shapes_plane.rst`)

Plane node
..........

The **Plane** node generates a 3d signed distance function for a plane.
It has little use on its own and will generatty be used to cut or intersect other shapes.

.. image:: images/node_3d_sdf_shapes_plane.png
	:align: center

Inputs
::::::

The **Plane** node does not accept any input.

Outputs
:::::::

The **Plane** node generates a signed distance function for a plane.

Parameters
::::::::::

The **Plane** node accepts as parameter the axis of the plane.

---

### Material Maker Doc Node 3d Sdf Shapes Pyramid (`material_maker/doc/node_3d_sdf_shapes_pyramid.rst`)

Pyramid node
~~~~~~~~~~~~

The **Torus** node generates a 3d signed distance function for a pyramid.

.. image:: images/node_3d_sdf_shapes_pyramid.png
	:align: center

Inputs
++++++

The **Pyramid** node does not accept any input.

Outputs
+++++++

The **Pyramid** node generates a signed distance function for a pyramid.

Parameters
++++++++++

The **Pyramid** node accepts the following parameters:

* **Axis** of the pyramid

* **Height** of the pyramid

* Base **Radius** of the pyramid

Example images
++++++++++++++

.. image:: images/node_sdf3d_pyramid_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Shapes Solid Angle (`material_maker/doc/node_3d_sdf_shapes_solid_angle.rst`)

Solid Angle node
................

The **Solid Angle** node generates a 3d signed distance function for a solid angle.

.. image:: images/node_3d_sdf_shapes_solid_angle.png
	:align: center

Inputs
::::::

The **Solid Angle** node does not accept any input.

Outputs
:::::::

The **Solid Angle** node generates a signed distance function for a solid angle.

Parameters
::::::::::

The **Solid Angle** node accepts the following parameters:

* The **Angle** of the solid angle's apex.

* The **Radius** of the sphere that houses the solid angle.

Example images
::::::::::::::

.. image:: images/node_sdf3d_solid_angle.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Shapes Sphere (`material_maker/doc/node_3d_sdf_shapes_sphere.rst`)

Sphere node
...........

The **Sphere** node generates a 3d signed distance function for a sphere.

.. image:: images/node_3d_sdf_shapes_sphere.png
	:align: center

Inputs
::::::

The **Sphere** node does not accept any input.

Outputs
:::::::

The **Sphere** node generates a signed distance function for a sphere.

Parameters
::::::::::

The **Sphere** node accepts a single parameter, its radius.

Example images
::::::::::::::

.. image:: images/node_sdf3d_sphere_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Shapes Torus (`material_maker/doc/node_3d_sdf_shapes_torus.rst`)

Torus node
..........

The **Torus** node generates a 3d signed distance function for a torus.

.. image:: images/node_3d_sdf_shapes_torus.png
	:align: center

Inputs
::::::

The **Torus** node does not accept any input.

Outputs
:::::::

The **Torus** node generates a signed distance function for a torus.

Parameters
::::::::::

The **Torus** node accepts as parameters both radiuses of the torus.

Example images
::::::::::::::

.. image:: images/node_sdf3d_torus_sample.png
	:align: center

---

### Material Maker Doc Node 3d Sdf Transforms Rotate (`material_maker/doc/node_3d_sdf_transforms_rotate.rst`)

Rotate node
...........

The **Rotate** node is variadic and generates 3D signed distance functions of rotated scenes
based on its inputs. If the input shapes are associated to color indexes, the
rotate node applies them to the outputs.

.. image:: images/node_3d_sdf_transforms_rotate.png
	:align: center

Inputs
::::::

The **Rotate** node accepts one or more inputs in 3D signed distance function format.

Outputs
:::::::

The **Rotate** node generates signed distance functions of the
rotated input shapes.

Parameters
::::::::::

The **Rotate** node accepts *the angles of the rotations around the X, Y and Z axes* as parameters.

---

### Material Maker Doc Node 3d Sdf Transforms Scale (`material_maker/doc/node_3d_sdf_transforms_scale.rst`)

Scale node
..........

The **Scale** node is variadic and generates 3D signed distance functions of scaled shapes
based on its inputs. If the input shapes are associated to color indexes, the
scale node applies them to the output.

.. image:: images/node_3d_sdf_transforms_scale.png
	:align: center

Inputs
::::::

The **Scale** node accepts one or more inputs in 3D signed distance function format.

Outputs
:::::::

The **Scale** node generates signed distance functions of the
scaled input shapes.

Parameters
::::::::::

The **Scale** node accepts *its scale factor* as parameters.

---

### Material Maker Doc Node 3d Sdf Transforms Scale Xyz (`material_maker/doc/node_3d_sdf_transforms_scale_xyz.rst`)

Scale XYZ node
..............

The **Scale XYZ** node is variadic and generates 3D signed distance functions of scaled shapes
based on its inputs in a non uniform way. 
The result shapes are no longer correct signed distance functions, but can be used for many operations like ray marching.

.. image:: images/node_3d_sdf_transforms_scale_xyz.png
	:align: center

Inputs
::::::

The **Scale XYZ** node accepts an input in 3D signed distance function format.

Outputs
:::::::

The **Scale XYZ** node generates a signed distance function of the
scaled input shape.

Parameters
::::::::::

The **Scale XYZ** node has four parameters:

* The *Scale* used as a uniform scale factor.

* The *Scale X* parameter defines the scale ratio along the X axis.

* The *Scale Y* parameter defines the scale ratio along the Y axis.

* The *Scale Z* parameter defines the scale ratio along the Z axis.

---

### Material Maker Doc Node 3d Sdf Transforms Translate (`material_maker/doc/node_3d_sdf_transforms_translate.rst`)

Translate node
..............

The **Translate** node is variadic and generates 3D signed distance functiosn of translated shapes
based on its inputs. If the input shapes are associated to color indexes, the
translate node applies them to the output.

.. image:: images/node_3d_sdf_transforms_translate.png
	:align: center

Inputs
::::::

The **Translate** node accepts one or more inputs in 3D signed distance function format.

Outputs
:::::::

The **Translate** node generates signed distance functions of the
translated input shapes.

Parameters
::::::::::

The **Translate** node accepts *the X, Y and Z components of the translation* as parameters.

---

### Material Maker Doc Node 3d Sphere (`material_maker/doc/node_3d_sphere.rst`)

Sphere node
~~~~~~~~~~~

The **Sphere** node outputs a grayscale image that represents the depth of a 3D sphere.

.. image:: images/node_3d_sphere.png
	:align: center

Inputs
++++++

The **Sphere** node does not accept any input.

Outputs
+++++++

The **Sphere** node provides an output that generates a grayscale image showing the
selected 3D sphere.

Parameters
++++++++++

The **Sphere** node accepts the following parameters:

* the *shere center position* as X and Y coordinates
* the *radius* of the sphere
* whether output is *normalized*

Example images
++++++++++++++

.. image:: images/node_3d_sphere_samples.png
	:align: center

---

### Material Maker Doc Node 3d Texture (`material_maker/doc/node_3d_texture.rst`)

3D textures
~~~~~~~~~~~

3D textures can be applied to objects defined by a heightmap, that can be generated
either as a regular grayscale image, or from a 3D scene defined using signed distance
functions.

In both cases, the **Apply** node is used to define 3D coordinates to query 3D textures,
and the **Select** node can be used to apply different 3D textures depending on a color
index.

.. toctree::
	:maxdepth: 1

	node_3d_texture_apply
	node_3d_texture_select
	node_3d_texture_shape_select
	node_3d_texture_from2d
	node_3d_texture_pattern
	node_3d_texture_fbm
	node_3d_texture_blend
	node_3d_texture_colorize
	node_3d_texture_rotate
	node_3d_texture_distort
	node_3d_texture_uniform
	node_3d_texture_scale
	node_3d_texture_translate
	node_3d_texture_tones_step
	node_3d_texture_math
	node_3d_texture_tones_range
	node_3d_texture_tones_map
	node_3d_texture_v3_math
	node_3d_texture_quantize
	node_3d_texture_uv
	node_3d_texture_invert
	node_3d_texture_tonality
	node_3d_texture_combine
	node_3d_texture_decompose
	node_3d_texture_smooth_minmax
	node_3d_texture_warp

---

### Material Maker Doc Node 3d Texture Apply (`material_maker/doc/node_3d_texture_apply.rst`)

Apply node
~~~~~~~~~~

The **Apply** node applies a 3D texture on a surface defined by a heightmap. It can be used
to apply several different 3D textures accoding to a color index map.

.. image:: images/node_3d_texture_apply.png
	:align: center

Inputs
......

The **Apply** node accepts 3 inputs:

* the height map defined by a grayscale texture that defines the 3D surface
* the color index map defined by a grayscale texture that can be used to define which 3D texture should be applied for each pixel of the result
* the 3D texture (or several 3D textures using the **Select** node)

Outputs
.......

The **Apply** node generates a color image where the 3D textures are applied to the surface.

Parameters
..........

The **Apply** node does not accept parameters

---

### Material Maker Doc Node 3d Texture Blend (`material_maker/doc/node_3d_texture_blend.rst`)

Blend node
~~~~~~~~~~

The **Blend** node blends two or more 3D textures using an optional opacity. It performs a blend operation
defined by the blend mode between the inputs, and mixes the result with the background input
using the opacity (defines by the *opacity* parameter, or the optional grayscale input).

.. image:: images/node_3d_texture_blend.png
	:align: center

Inputs
......

The **Blend** node accepts three inputs:

* The first input is the background layer.

* The second input is the first layer.

* The third input is an optional mask that will be used instead of the opacity parameter.

This node is variadic, and more layers and associated masks can be added.

Outputs
.......

The **Blend** node outputs the result of the blend operation.

Parameters
..........

The **Blend** node has two or more parameters:

* The *blend mode*, that can be one of the following: *Normal*, *Dissolve*, *Multiply*, *Screen*,
  *Overlay*, *Hard Light*, *Soft Light*, *Linear Light*, *Vivid Light*, *Pin Light*, *Burn*, *Dodge*,
  *Lighten*, *Darken*, *Difference*, *Additive*, *AddSub*, *Hard Mix*, *Exclusion*, *Hue*, *Saturation*,
  *Color*, *Value*.

* The *opacity* used when mixing the result of the blend operation with the bottom input
  when the corresponding input is not connected. When connected, the opacity channel is
  converted to grayscale and multiplied with that parameter.

Both parameters are repeated for each additional layer.

Blending modes
++++++++++++++

.. |blend_normal| image:: images/blend_normal.png

.. |blend_dissolve| image:: images/blend_dissolve.png

.. |blend_multiply| image:: images/blend_multiply.png

.. |blend_screen| image:: images/blend_screen.png

.. |blend_overlay| image:: images/blend_overlay.png

.. |blend_hard_light| image:: images/blend_hard_light.png

.. |blend_soft_light| image:: images/blend_soft_light.png

.. |blend_burn| image:: images/blend_burn.png

.. |blend_dodge| image:: images/blend_dodge.png

.. |blend_lighten| image:: images/blend_lighten.png

.. |blend_darken| image:: images/blend_darken.png

.. |blend_difference| image:: images/blend_difference.png

.. |blend_additive| image:: images/blend_additive.png

.. |blend_addsub| image:: images/blend_addsub.png

.. |blend_linear_light| image:: images/blend_linear_light.png

.. |blend_vivid_light| image:: images/blend_vivid_light.png

.. |blend_pin_light| image:: images/blend_pin_light.png

.. |blend_hard_mix| image:: images/blend_hard_mix.png

.. |blend_exclusion| image:: images/blend_exclusion.png

.. |blend_hue| image:: images/blend_hue.png

.. |blend_saturation| image:: images/blend_saturation.png

.. |blend_color| image:: images/blend_color.png

.. |blend_value| image:: images/blend_value.png

+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Blend mode            | Example                       | Description                                                                                                                   |
+=======================+===============================+===============================================================================================================================+
| Normal                | |blend_normal|                | This is the default blend mode. It simply displays the top layer over the bottom layer without any blending                   |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Dissolve              | |blend_dissolve|              | This blend mode randomly replaces the pixels of the top layer with the pixels of the bottom layer                             |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Multiply              | |blend_multiply|              | This blend mode multiplies the colors of the two layers, resulting in a darker image                                          |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Screen                | |blend_screen|                | This blend mode multiplies the inverse of the colors of the two layers, resulting in a lighter image                          |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Overlay               | |blend_overlay|               | This blend mode multiplies the darker colors and screens the lighter colors. It increases the contrast of the image           |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Hard Light            | |blend_hard_light|            | This blend mode is similar to Overlay, but it is more intense                                                                 |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Soft Light            | |blend_soft_light|            | This blend mode multiplies the darker colors and screens the lighter colors, but it is less intense than Overlay              |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Burn                  | |blend_burn|                  | This blend mode darkens the bottom layer to reflect the top layer. It increases the contrast between the two layers           |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Dodge                 | |blend_dodge|                 | This blend mode lightens the bottom layer to reflect the top layer. It decreases the contrast between the two layers          |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Lighten               | |blend_lighten|               | This blend mode compares the colors of the two layers and keeps the lighter of the two colors                                 |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Darken                | |blend_darken|                | This blend mode compares the colors of the two layers and keeps the darker of the two colors                                  |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Difference            | |blend_difference|            | This blend mode substracts the color of the two layers                                                                        |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Additive              | |blend_additive|              | This blend mode adds the color of the two layers                                                                              |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| AddSub                | |blend_addsub|                | This blend mode adds or substract the foreground layer depending on its luminosity                                            |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Linear Light          | |blend_linear_light|          | This blend mode is a combination of Linear Dodge and Linear Burn                                                              |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Vivid Light           | |blend_vivid_light|           | This blend mode is similar to Color Dodge and Color Burn, but it is more intense                                              |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Pin Light             | |blend_pin_light|             | This blend mode replaces colors of the bottom layer with those of the top layer depending on the luminosity of the top layer  |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Hard Mix              | |blend_hard_mix|              | This blend mode multiplies the colors of the two layers, and maps the resulting color to the nearest primary color            |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Exclusion             | |blend_exclusion|             | This blend mode is similar to Difference, but it is less intense                                                              |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Hue                   | |blend_hue|                   | This blend mode takes the hue of the top layer and combines them with the saturation and value of the bottom layer            |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Saturation            | |blend_saturation|            | This blend mode takes the saturation of the top layer and combines them with the hue and value of the bottom layer            |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Color                 | |blend_color|                 | This blend mode takes the hue and saturation of the top layer and combines them with the value of the bottom layer            |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Value                 | |blend_value|                 | This blend mode takes the value of the top layer and combines them with the hue and saturation of the bottom layer            |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+

Example images
..............

.. image:: images/node_3d_texture_blend_sample.png
	:align: center

---

### Material Maker Doc Node 3d Texture Colorize (`material_maker/doc/node_3d_texture_colorize.rst`)

Colorize node
~~~~~~~~~~~~~

The **Colorize** node applies a user-defined gradient to a 3D texture: black pixels
will be colored with the leftmost color of the gradient and white pixels will take
the rightmost color.

.. image:: images/node_3d_texture_colorize.png
	:align: center

Inputs
......

The **Colorize** node inputs a 3D texture and implicitely converts it to grayscale.

Outputs
.......

The **Colorize** node provides a single color 3D texture.

Parameters
..........

The **Colorize** node has a single parameter that defines the gradient to be applied to
the input texture.

Example images
..............

.. image:: images/node_3d_texture_colorize_sample.png
	:align: center

---

### Material Maker Doc Node 3d Texture Combine (`material_maker/doc/node_3d_texture_combine.rst`)

Combine node
~~~~~~~~~~~~

The **Combine** node combines three grayscale 3D texture inputs into a 3D texture.

.. image:: images/node_3d_texture_combine.png
	:align: center

Inputs
++++++

The **Combine** node has 3 inputs, one for each (red, green, blue) channel.

Outputs
+++++++

The **Combine** node outputs a 3D texture.

---

### Material Maker Doc Node 3d Texture Decompose (`material_maker/doc/node_3d_texture_decompose.rst`)

Decompose node
~~~~~~~~~~~~~~

The **Decompose** node decomposes a 3D texture into three grayscale 3D textures.

.. image:: images/node_3d_texture_decompose.png
	:align: center

Inputs
++++++

The **Decompose** node has a single 3D texture input.

Outputs
+++++++

The **Decompose** node outputs three 3D grayscale textures , one for each (red, green, blue) channel.

---

### Material Maker Doc Node 3d Texture Distort (`material_maker/doc/node_3d_texture_distort.rst`)

Distort node
~~~~~~~~~~~~

The **Distort** node distorts a 3D texture.

.. image:: images/node_3d_texture_distort.png
	:align: center

Inputs
......

The **Distort** node inputs a 3D texture to be distorted and a 3D textures whose R, G and B channels define the distortion alongall 3 axes.

Outputs
.......

The **Distort** node provides a distorted 3D texture.

Parameters
..........

The **Distort** node accepts a parameter that defines the strength of the distortion.

Example images
..............

.. image:: images/node_3d_texture_distort_sample.png
	:align: center

---

### Material Maker Doc Node 3d Texture Fbm (`material_maker/doc/node_3d_texture_fbm.rst`)

FBM node
~~~~~~~~

The **FBM** node outputs a 3D fractional Brownian motion texture.
FBM is obtained by repeating a noise pattern with smaller and smaller details.

.. image:: images/node_3d_texture_fbm.png
	:align: center

Inputs
......

The **FBM** node does not accept any input.

Outputs
.......

The **FBM** node provides a grayscale 3D texture.

Parameters
..........

The FBM node accepts the following parameters:

* the noise type: value noise, fractal noise or cellular noise, and their non-repetitive counterparts
* the *X*, *Y* and *Z* scale of the first octave noise
* the number of iterations
* the persistance, i.e. the strength of each subsequent iteration

Example images
..............

.. image:: images/node_3d_texture_fbm_sample.png
	:align: center

---

### Material Maker Doc Node 3d Texture From2d (`material_maker/doc/node_3d_texture_from2d.rst`)

From2D node
~~~~~~~~~~~

The **From2D** node generates a 3D texture from a 2D texture by projecting it along a specified axis.

.. image:: images/node_3d_texture_from2d.png
	:align: center

Inputs
......

The **From2D** node accepts a single 2D texture as input

Outputs
.......

The **From2D** node generates a 3D texture.

Parameters
..........

The **From2D** node accepts the projection *Axis* as a parameter.

Example images
..............

.. image:: images/node_3d_texture_from2d_sample.png
	:align: center

---

### Material Maker Doc Node 3d Texture Invert (`material_maker/doc/node_3d_texture_invert.rst`)

Invert node
~~~~~~~~~~~

The **Invert** node inverts the input 3D texture. The R, G and B channel are inverted.

.. image:: images/node_3d_texture_invert.png
	:align: center

Inputs
++++++

The **Invert** node requires a input 3D texture.

Outputs
+++++++

The **Invert** node provides a single 3D texture.

Parameters
++++++++++

The **Invert** node does not have any parameter.

Example images
++++++++++++++

.. image:: images/node_invert_samples.png
	:align: center

---

### Material Maker Doc Node 3d Texture Math (`material_maker/doc/node_3d_texture_math.rst`)

Math node
~~~~~~~~~

The **Math** node performs various math operations between its inputs.

.. image:: images/node_3d_texture_math.png
	:align: center

Inputs
++++++

The **Math** node accepts two grayscale 3D texture inputs. Those inputs are optional, and when
left unconnected, the corresponding parameter value is used

Outputs
+++++++

The **Math** node generates a single grayscale 3D texture that contains the result
of the math operation.

Parameters
++++++++++

The **Math** node accepts the following parameters:

* the *operation* to be performed
* *default values* to be used in place of the inputs when left unconnected
* a boolean that specifies if the result must be clamped between 0 and 1

---

### Material Maker Doc Node 3d Texture Pattern (`material_maker/doc/node_3d_texture_pattern.rst`)

Pattern node
~~~~~~~~~~~~

The **Pattern** node outputs a 3D pattern texture generated from common waveform shapes.

.. image:: images/node_3d_texture_pattern.png
	:align: center

Inputs
......

The **Pattern** node does not accept any input.

Outputs
.......

The **Pattern** node provides a grayscale 3D texture obtained by mixing a pattern on each X, Y and Z axes.

Many different patterns can be created using this node, do not hesitate to experiment.

Parameters
..........

The Pattern node accepts the following parameters:

* the *X*, *Y* and *Z* parameters define the pattern and their number of repetitions
  that will be propagated along the X, Y and Y axes.
  The following patterns are available:

  * Sine: the value follows a sinus waveform

  * Triangle: the value follows a triangle waveform (changes linearly from 0 to 1 and from 1 to 0)

  * Square: the value follows a square waveform (stays constant at 0, then 1)

  * Sawtooth: the value follows a sawtooth waveform (changes linearly from 0 to 1, then jumps back to 0)

  * Constant: the value is 1

  * Bounce: the value follows a half-circle waveform

* the *Combiner* parameter is the function used to combine the *X*, *Y* and *Z* patterns. The available
  functions are *multiply*, *add*, *max*, *min*, *xor* and *pow*

Example images
..............

.. image:: images/node_3d_texture_pattern_sample.png
	:align: center

---

### Material Maker Doc Node 3d Texture Quantize (`material_maker/doc/node_3d_texture_quantize.rst`)

Quantize node
~~~~~~~~~~~~~

The **Quantize** node approximates the colors of the input 3D texture.

.. image:: images/node_3d_texture_quantize.png
	:align: center

Inputs
++++++

The **Quantize** node accepts one or more 3D textures.

Outputs
+++++++

The **Quantize** node outputs 3D textures.

Parameters
++++++++++

The **Quantize** node accepts the *number of steps* as parameter.

Example images
++++++++++++++

.. image:: images/node_quantize_samples.png
	:align: center

---

### Material Maker Doc Node 3d Texture Rotate (`material_maker/doc/node_3d_texture_rotate.rst`)

Rotate node
~~~~~~~~~~~

The **Rotate** node is variadic and applies rotations to 3D textures.

.. image:: images/node_3d_texture_rotate.png
	:align: center

Inputs
......

The **Rotate** node inputs one or more 3D textures.

Outputs
.......

The **Rotate** node provides rotated 3D textures.

Parameters
..........

The **Rotate** node has X, Y and Z parameters that define the rotations around each axis.

Example images
..............

.. image:: images/node_3d_texture_rotate_sample.png
	:align: center

---

### Material Maker Doc Node 3d Texture Scale (`material_maker/doc/node_3d_texture_scale.rst`)

Scale node
~~~~~~~~~~

The **Scale** node is variadic and scales 3D textures.

.. image:: images/node_3d_texture_scale.png
	:align: center

Inputs
......

The **Scale** node inputs one or more 3D textures.

Outputs
.......

The **Scale** node provides scaled 3D textures.

Parameters
..........

The **Scale** node has X, Y and Z parameters that define the scaling on each axis.

Example images
..............

.. image:: images/node_3d_texture_scale_sample.png
	:align: center

---

### Material Maker Doc Node 3d Texture Select (`material_maker/doc/node_3d_texture_select.rst`)

Select node
~~~~~~~~~~~

The **Select** node assigns one or more 3D textures based on
samples whose color index match the color parameter.

.. image:: images/node_3d_texture_select.png
	:align: center

Inputs
......

The **Select** node accepts two or more 3D texture inputs:

* The default texture, used for all samples that don't match the color parameter.

* Selected texture that is assigned to all samples that match.

This node is variadic, and more inputs with associated color indicies can be added.

Outputs
.......

The **Select** node generates a merged 3D texture.

Parameters
..........

The **Select** node accepts 2 parameters:

* A color index that is compared with the color index of each sample

* A tolerance value used when comparing the color parameter with the sample's color index

---

### Material Maker Doc Node 3d Texture Shape Select (`material_maker/doc/node_3d_texture_shape_select.rst`)

Shape Select node
~~~~~~~~~~~~~~~~~

The **Shape Select** merges two or more 3D textures by assigning
them based on input selection shapes

.. image:: images/node_3d_texture_select_shape.png
	:align: center

Inputs
......

The **Shape Select** node accepts two or more 3D texture inputs:

* The default texture, used for all samples that are outside the selection shape

* The selected texture that is assigned to all samples that are inside the selection shape

* The shape where the first input is applied

This node is variadic, and more inputs and associated selection shapes can be added.

Outputs
.......

The **Shape Select** node generates a merged 3D texture.

Parameters
..........

The **Shape Select** node accepts a smoothness parameter that defines the width of the area
where textures are mixed.

---

### Material Maker Doc Node 3d Texture Smooth Minmax (`material_maker/doc/node_3d_texture_smooth_minmax.rst`)

Smooth MinMax node
~~~~~~~~~~~~~~~~~~

The **Smooth MinMax** node performs a smooth minimum or smooth maximum math operation between its inputs.

.. image:: images/node_3d_texture_smooth_minmax.png
	:align: center

Inputs
++++++

The **Smooth MinMax** node accepts two grayscale 3D texture inputs. Those inputs are optional, and when
left unconnected, the corresponding parameter value is used.

Outputs
+++++++

The **Smooth MinMax** node generates a single grayscale 3D texture that contains the result
of the operation.

Parameters
++++++++++

The **Smooth MinMax** node accepts the following parameters:

* the *operation* to be performed
* *default values* to be used in place of the inputs when left unconnected
* the *smoothness* to be applied during the minimum or maximum operation
* a boolean that specifies if the result must be clamped between 0 and 1

Example images
++++++++++++++

.. image:: images/node_smooth_minmax_samples.png
	:align: center

---

### Material Maker Doc Node 3d Texture Tonality (`material_maker/doc/node_3d_texture_tonality.rst`)

Tonality node
~~~~~~~~~~~~~

The **Tonality** node is variadic and applies a user-defined curve to grayscale 3D textures.

.. image:: images/node_3d_texture_tonality.png
	:align: center

Inputs
++++++

The **Tonality** node accepts one or more grayscale 3D textures.

Outputs
+++++++

The **Tonality** node outputs grayscale 3D textures.

Parameters
++++++++++

The **Tonality** node has a single parameter that defines the tonality curve to be applied to
the input 3D texture.

Notes
+++++

The input will be considered (and implicitly converted to) grayscale 3D texture if it is a 3D texture.

---

### Material Maker Doc Node 3d Texture Tones Map (`material_maker/doc/node_3d_texture_tones_map.rst`)

Tones Map node
~~~~~~~~~~~~~~

The **Tones Map** node is variadic and remaps 3D textures, given input and output tone intervals.
If necessary, the remap operation is extrapolated linearly beyond the specified intervals.

.. image:: images/node_3d_texture_tones_map.png
	:align: center

Inputs
++++++

The **Tones Map** node accepts one or more 3D input textures.

Outputs
+++++++

The **Tones Map** node outputs one or more 3D textures.

Parameters
++++++++++

The **Tones Map** node accepts 4 parameters:

* the minimum and maximum input tones

* the minimum and maximum output tones

---

### Material Maker Doc Node 3d Texture Tones Range (`material_maker/doc/node_3d_texture_tones_range.rst`)

Tones Range node
~~~~~~~~~~~~~~~~

The **Tones Range** node selects a range of the input around a specified value.

.. image:: images/node_3d_texture_tones_range.png
	:align: center

Inputs
++++++

The **Tones Range** node requires a 3D grayscale texture.

Outputs
+++++++

The **Tones Range** node provides a single 3D grayscale texture.

Parameters
++++++++++

The **Tones Range** node accepts 4 parameters:

* the *Value* around which the tones are selected

* the *Width* (in tones space) of the gradient around the value

* the *Contrast* of the gradient

* the *Invert* option that will invert the result if checked

---

### Material Maker Doc Node 3d Texture Tones Step (`material_maker/doc/node_3d_texture_tones_step.rst`)

Tones Step node
~~~~~~~~~~~~~~~

The **Tones Step** node emphasizes the light and dark tones around a specified value.

.. image:: images/node_3d_texture_tones_step.png
	:align: center

Inputs
++++++

The **Tones Step** node requires a 3D input texture.

Outputs
+++++++

The **Tones Step** node provides a single 3D texture.

Parameters
++++++++++

The **Tones Step** node accepts 3 parameters:

* the *Value* around which the tones are emphasized

* the *Width* (in tones space) of the gradient between black and white areas

* the *Invert* option that will invert the result if checked

---

### Material Maker Doc Node 3d Texture Translate (`material_maker/doc/node_3d_texture_translate.rst`)

Translate node
~~~~~~~~~~~~~~

The **Translate** node is variadic and translates 3D textures.

.. image:: images/node_3d_texture_translate.png
	:align: center

Inputs
......

The **Translate** node inputs one or more 3D textures.

Outputs
.......

The **Translate** node provides translated 3D textures.

Parameters
..........

The **Translate** node has X, Y and Z parameters that define the translation along each axis.

Example images
..............

.. image:: images/node_3d_texture_translate_sample.png
	:align: center

---

### Material Maker Doc Node 3d Texture Uniform (`material_maker/doc/node_3d_texture_uniform.rst`)

Uniform node
~~~~~~~~~~~~

The **Uniform** and **Uniform/Grayscale** node outputs a single uniform 3D texture
whose color is configurable.

.. image:: images/node_3d_texture_uniform.png
	:align: center

.. image:: images/node_3d_texture_uniform_grayscale.png
	:align: center

Inputs
++++++

The uniform node does not accept any input.

Outputs
+++++++

The uniform node provides an output that generates a uniform 3D color texture.

Parameters
++++++++++

The **Uniform** node has a single *color* parameter that defines the color of
the output 3D texture. The **Uniform/Grayscale** node has a single *float* parameter.

---

### Material Maker Doc Node 3d Texture Uv (`material_maker/doc/node_3d_texture_uv.rst`)

UV node
~~~~~~~

The **UV** node shows the 3D coordinates as a 3D texture.

.. image:: images/node_3d_texture_uv.png
	:align: center

Inputs
++++++

The **UV** node does not accept any input

Outputs
+++++++

The **UV** node outputs a single 3D texture.

Parameters
++++++++++

The **UV** node does not have any parameters.

Example images
++++++++++++++

.. image:: images/node_3d_texture_uv_samples.png
	:align: center

---

### Material Maker Doc Node 3d Texture V3 Math (`material_maker/doc/node_3d_texture_v3_math.rst`)

Vec3 Math node
~~~~~~~~~~~~~~

The **Vec3 Math** node performs various vector math operations between its inputs.

.. image:: images/node_3d_texture_math_vec3.png
	:align: center

Inputs
++++++

The **Vec3 Math** node accepts two 3D texture inputs. Those inputs are optional, and when
left unconnected, the corresponding parameter value is used

Outputs
+++++++

The **Vec3 Math** node generates a single 3D texture that contains the result
of the vector math operation.

Parameters
++++++++++

The **Vec3 Math** node accepts the following parameters:

* the *operation* to be performed
* *default values* to be used in place of the inputs when left unconnected
* a boolean that specifies if the result must be clamped between 0 and 1

---

### Material Maker Doc Node 3d Texture Warp (`material_maker/doc/node_3d_texture_warp.rst`)

Warp node
~~~~~~~~~

The **Warp** node is variadic and deform one or more 3D textures according to the
derivative of a grayscale 3D texture.

.. image:: images/node_3d_texture_warp.png
	:align: center

Inputs
++++++

The **Warp** node accepts three inputs:

* The *Source* input is the image to be deformed.

* The *Height map* input is a grayscale 3D texture whose derivative will be used to deform the source.

* Optional *Strength map* which multiplies the *strength* parameter by the map value.

Outputs
+++++++

The **Warp** node outputs the deformed 3D texture.

Parameters
++++++++++

The **Warp** node has three parameters:

* *mode*, that defines how the warp node calculates the offset it applies. *Slope* offsets by
  a distance calculated from the slope, and *Distance to top* offsets by a distance calculated
  from the slope and the distance to the top (this mode makes it posible to make all points
  of a slope get their value from the top, hence generating mosaic-like patterns).

* *strength* to scale the warp effect.

* *epsilon* is used to evaluate the second input's derivative.

Example images
++++++++++++++

.. image:: images/node_warp_samples.png
	:align: center

---

### Material Maker Doc Node Filter Adjust Hsv (`material_maker/doc/node_filter_adjust_hsv.rst`)

Adjust HSV node
~~~~~~~~~~~~~~~

The **Adjust HSV** node adjusts the hue, saturation and value of the input image.

.. image:: images/node_filter_adjust_hsv.png
	:align: center

Inputs
++++++

The **Adjust HSV** node requires a color input texture.

Outputs
+++++++

The **Adjust HSV** node provides a single color texture.

Parameters
++++++++++

The **Adjust HSV** node has the following parameters:

* *Hue* defines how hue is affected.

* *Saturation* defines how the colorfulness or the texture is affected.

* *Value* defines how the lightness is affected.

Example images
++++++++++++++

.. image:: images/node_adjust_hsv_samples.png
	:align: center

---

### Material Maker Doc Node Filter Alter Hsv (`material_maker/doc/node_filter_alter_hsv.rst`)

Alter HSV node
~~~~~~~~~~~~~~

The **Alter HSV** node modifies the hue, saturation and value of the input image, according
to dedicated input maps. It can be used to easily apply variations to its input.

.. image:: images/node_filter_alter_hsv.png
	:align: center

Inputs
++++++

The **Alter HSV** node requires a color input texture. It also has 3 grayscale input maps,
one for hue, one for value, and one for saturation. Values above 0.5 increase the associated
channel, and values below 0.5 decrease it.

Outputs
+++++++

The **Alter HSV** node provides a single color texture.

Parameters
++++++++++

The **Alter HSV** node has the following parameters:

* *All* is used as a multiplier for all input maps and can be used to modify the overall alteration
  intensity.

* *Hue* defines how hue is affected, and is used as a multiplier for the corresponding input map.

* *Value* defines how the lightness is affected, and is used as a multiplier
  for the corresponding input map.

* *Saturation* defines how the colorfulness or the texture is affected, and is used as a multiplier
  for the corresponding input map.

Example images
++++++++++++++

.. image:: images/node_alter_hsv_samples.png
	:align: center

---

### Material Maker Doc Node Filter Anisotropic Kuwahara (`material_maker/doc/node_filter_anisotropic_kuwahara.rst`)

Anisotropic Kuwahara node
~~~~~~~~~~~~~~~~~~~~~~~~~

The **Anisotropic Kuwahara** node applies an edge-preserving smoothing filter to its input
which better preserves directional features compared to the classic and
generalized implementations of the kuwahara filter.

This can be used to create stylized images with effects similar to painted brushstrokes.

.. image:: images/node_filter_anisotropic_kuwahara.png
	:align: center

Inputs
++++++

The **Anisotropic Kuwahara** node has a single input.

Outputs
+++++++

The **Anisotropic Kuwahara** node outputs the result of the smoothing filter.

Parameters
++++++++++

See also `Kuwahara node <https://docs.blender.org/manual/en/4.0/compositing/types/filter/kuwahara.html>`_
on Blender docs for more details on **Uniformity** and **Eccentricity**.

The **Anisotropic Kuwahara** node accepts the following parameters:

*  **Resolution** used to sample the input image.

*  **Size** of the filter. Higher values can produce more stylized results, but also slows down the filter.

*  **Uniformity** of the image edges' directions.

*  **Sharpness** of the edges of the image.

*  **Eccentricity** affects directionality of the filter. Higher values preserve directional features better,
	whereas lower values produce a more isotropic result.

Example images
++++++++++++++

.. image:: images/node_anisotropic_kuwahara_samples.png
	:align: center

---

### Material Maker Doc Node Filter Auto Tones (`material_maker/doc/node_filter_auto_tones.rst`)

Auto Tones node
~~~~~~~~~~~~~~~

The **Auto Tones** node finds the minimum and maximum values in the input texture and tone maps it to the full 0.0 - 1.0 range.

.. image:: images/node_filter_tones_auto_tones.png
	:align: center

Inputs
++++++

The **Auto Tones** node requires a grayscale input texture.

Outputs
+++++++

The **Auto Tones** node provides a single grayscale texture.

Parameters
++++++++++

* The *Size* of the buffers used to find the mininum and maximum values for the input image.
  If the input has small details a higher resolution buffer might be needed to capture precise
  min and max values. 

Note: The output itself will not be buffered.

---

### Material Maker Doc Node Filter Bevel (`material_maker/doc/node_filter_bevel.rst`)

Bevel node
~~~~~~~~~~

The **Bevel** node adds an edge bevel to the input mask based on a customizable curve.

.. image:: images/node_filter_bevel.png
	:align: center

Inputs
++++++

The **Bevel** node accepts:

* a mask grayscale input whose light parts will be beveled

Outputs
+++++++

The **Bevel** node generates a single grayscale texture.

Parameters
++++++++++

The **Bevel** node accepts the following parameters:

* *resolution* is the resolution of the effect.
* *distance* is the distance of the bevel effect.
* *profile* is the curve used to shape the bevel.

Example images
++++++++++++++

.. image:: images/node_bevel_samples.png
	:align: center

---

### Material Maker Doc Node Filter Binary Smooth (`material_maker/doc/node_filter_binary_smooth.rst`)

Binary Smooth node
~~~~~~~~~~~~~~~~~~

The **Binary Smooth** node smoothes the shape of a mask.

.. image:: images/node_filter_binary_smooth.png
	:align: center

Inputs
++++++

The **Binary Smooth** node accepts a grayscale mask input to be smoothed.

Outputs
+++++++

The **Binary Smooth** node outputs the result of the smoothing operation.

Parameters
++++++++++

The **Binary Smooth** node has four parameters:

* The *resolution* used for the blur effect. Note the output is not limited to this resolution.

* The *smooth* parameter defines how much the mask will be smoothed.

* The *offset* can be modified to expand or contract the smoothed shape.

* The *bevel* parameter controls the width of the edge for a bevel effect. Note this bevel will not be linear.


Example images
++++++++++++++

.. image:: images/node_binary_smooth_samples.png
	:align: center

---

### Material Maker Doc Node Filter Blend (`material_maker/doc/node_filter_blend.rst`)

Blend node
~~~~~~~~~~

The **Blend** node blends two or more inputs using an optional opacity. It performs a blend operation
defined by the blend mode between the inputs, and mixes the result with the background input
using the opacity (defined by the *opacity* parameter multiplied by the grayscale input).

.. image:: images/node_filter_blend.png
	:align: center

Inputs
++++++

The **Blend** node accepts three or more inputs:

* The first input is the background layer.

* The second input is the first layer.

* The third input is an optional mask that will be multiplied by the
  opacity parameter for the first layer.

This node is variadic, and more layers and associated masks can be added.

Outputs
+++++++

The **Blend** node outputs the result of the blend operation.

Parameters
++++++++++

The **Blend** node has two or more parameters:

* The *blend mode*, that can be one of the following: *Normal*, *Dissolve*, *Multiply*, *Screen*,
  *Overlay*, *Hard Light*, *Soft Light*, *Linear Light*, *Vivid Light*, *Pin Light*, *Burn*, *Dodge*,
  *Lighten*, *Darken*, *Difference*, *Additive*, *AddSub*, *Hard Mix*, *Exclusion*, *Hue*, *Saturation*,
  *Color*, *Value*.

* The *opacity* is used when mixing the result of the blend operation with the background input
  when the corresponding input is not connected. When connected, the opacity channel is
  multiplied with that parameter.

Both parameters are repeated for each additional layer.

Blending modes
++++++++++++++

.. |blend_normal| image:: images/blend_normal.png

.. |blend_dissolve| image:: images/blend_dissolve.png

.. |blend_multiply| image:: images/blend_multiply.png

.. |blend_screen| image:: images/blend_screen.png

.. |blend_overlay| image:: images/blend_overlay.png

.. |blend_hard_light| image:: images/blend_hard_light.png

.. |blend_soft_light| image:: images/blend_soft_light.png

.. |blend_burn| image:: images/blend_burn.png

.. |blend_dodge| image:: images/blend_dodge.png

.. |blend_lighten| image:: images/blend_lighten.png

.. |blend_darken| image:: images/blend_darken.png

.. |blend_difference| image:: images/blend_difference.png

.. |blend_additive| image:: images/blend_additive.png

.. |blend_addsub| image:: images/blend_addsub.png

.. |blend_linear_light| image:: images/blend_linear_light.png

.. |blend_vivid_light| image:: images/blend_vivid_light.png

.. |blend_pin_light| image:: images/blend_pin_light.png

.. |blend_hard_mix| image:: images/blend_hard_mix.png

.. |blend_exclusion| image:: images/blend_exclusion.png

.. |blend_hue| image:: images/blend_hue.png

.. |blend_saturation| image:: images/blend_saturation.png

.. |blend_color| image:: images/blend_color.png

.. |blend_value| image:: images/blend_value.png

+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Blend mode            | Example                       | Description                                                                                                                   |
+=======================+===============================+===============================================================================================================================+
| Normal                | |blend_normal|                | This is the default blend mode. It simply displays the top layer over the bottom layer without any blending                   |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Dissolve              | |blend_dissolve|              | This blend mode randomly replaces the pixels of the top layer with the pixels of the bottom layer                             |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Multiply              | |blend_multiply|              | This blend mode multiplies the colors of the two layers, resulting in a darker image                                          |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Screen                | |blend_screen|                | This blend mode multiplies the inverse of the colors of the two layers, resulting in a lighter image                          |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Overlay               | |blend_overlay|               | This blend mode multiplies the darker colors and screens the lighter colors. It increases the contrast of the image           |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Hard Light            | |blend_hard_light|            | This blend mode is similar to Overlay, but it is more intense                                                                 |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Soft Light            | |blend_soft_light|            | This blend mode multiplies the darker colors and screens the lighter colors, but it is less intense than Overlay              |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Burn                  | |blend_burn|                  | This blend mode darkens the bottom layer to reflect the top layer. It increases the contrast between the two layers           |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Dodge                 | |blend_dodge|                 | This blend mode lightens the bottom layer to reflect the top layer. It decreases the contrast between the two layers          |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Lighten               | |blend_lighten|               | This blend mode compares the colors of the two layers and keeps the lighter of the two colors                                 |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Darken                | |blend_darken|                | This blend mode compares the colors of the two layers and keeps the darker of the two colors                                  |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Difference            | |blend_difference|            | This blend mode substracts the color of the two layers                                                                        |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Additive              | |blend_additive|              | This blend mode adds the color of the two layers                                                                              |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| AddSub                | |blend_addsub|                | This blend mode adds or substract the foreground layer depending on its luminosity                                            |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Linear Light          | |blend_linear_light|          | This blend mode is a combination of Linear Dodge and Linear Burn                                                              |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Vivid Light           | |blend_vivid_light|           | This blend mode is similar to Color Dodge and Color Burn, but it is more intense                                              |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Pin Light             | |blend_pin_light|             | This blend mode replaces colors of the bottom layer with those of the top layer depending on the luminosity of the top layer  |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Hard Mix              | |blend_hard_mix|              | This blend mode multiplies the colors of the two layers, and maps the resulting color to the nearest primary color            |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Exclusion             | |blend_exclusion|             | This blend mode is similar to Difference, but it is less intense                                                              |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Hue                   | |blend_hue|                   | This blend mode takes the hue of the top layer and combines them with the saturation and value of the bottom layer            |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Saturation            | |blend_saturation|            | This blend mode takes the saturation of the top layer and combines them with the hue and value of the bottom layer            |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Color                 | |blend_color|                 | This blend mode takes the hue and saturation of the top layer and combines them with the value of the bottom layer            |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Value                 | |blend_value|                 | This blend mode takes the value of the top layer and combines them with the hue and saturation of the bottom layer            |
+-----------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------+

Notes
+++++

The *opacity* input will be considered (and implicitly converted to) grayscale if it is a color texture.

Example images
++++++++++++++

.. image:: images/node_blend_samples.png
	:align: center

---

### Material Maker Doc Node Filter Blur (`material_maker/doc/node_filter_blur.rst`)

Blur node
~~~~~~~~~

The **Blur** node applies a Gaussian blur algorithm to its input.

.. image:: images/node_filter_blur.png
	:align: center

Inputs
++++++

The **Blur** node accepts an RGBA input to be blurred and an optional blur mask
that defines the intensity of the blur effect.

Outputs
+++++++

The **Blur** node outputs the result of the blur operation.

Parameters
++++++++++

The **Blur** node has three parameters:

* The *grid size* defines the size of the output image.

* The *direction* specifies if the blur algorithm is applied horizontally, vertically or both.

* The *sigma* parameter defines how smooth the output will be.

Notes
+++++

This node outputs an image that has a fixed size.

Example images
++++++++++++++

.. image:: images/node_blur_samples.png
	:align: center

---

### Material Maker Doc Node Filter Blur Directional (`material_maker/doc/node_filter_blur_directional.rst`)

Directional Blur node
~~~~~~~~~~~~~~~~~~~~~

The **Directional Blur** node applies a Gaussian blur algorithm to its input in a given direction.

.. image:: images/node_filter_blur_directional.png
	:align: center

Inputs
++++++

The **Directional Blur** node accepts an RGBA input to be blurred and an optional blur mask
that defines the intensity of the blur effect.

Outputs
+++++++

The **Directional Blur** node outputs the result of the blur operation.

Parameters
++++++++++

The **Directional Blur** node has four parameters:

* The *grid size* defines the size of the output image.

* The *mode* spcifies whether the blur will move in one direction or both.

* The *sigma* parameter defines how smooth the output will be.

* The *angle* specifies the angle of the blur algorithm.

* Whether *32 Bit* buffer(s) are used to sample the input.
  Reduces banding artifacts but could result in higher video
  memory usage.

Notes
+++++

This node outputs an image that has a fixed size.

Example images
++++++++++++++

.. image:: images/node_directional_blur_samples.png
	:align: center

---

### Material Maker Doc Node Filter Blur Fast (`material_maker/doc/node_filter_blur_fast.rst`)

Fast Blur node
~~~~~~~~~~~~~~

The **Fast Blur** node applies an approximated Gaussian blur algorithm to its input.

.. image:: images/node_filter_blur_fast.png
	:align: center

Inputs
++++++

The **Fast Blur** node accepts an RGBA input to be blurred.

Outputs
+++++++

The **Fast Blur** node has three outputs:

* The first output is the result of the blur operation.

* The second output is the high frequency details removed by the blur.
  In other words, the first output subtracted from the original image.
  Note that all channels including alpha will be centered at 0,
  so this will need to be connected to a SwapChannels node to be seen in previews.

* The third output is the original image sharpened.
  In other words, this is the second output added back to the original image.

Parameters
++++++++++

The **Fast Blur** node has four parameters:

* The *resolution* defines the size of the output image.

* The *sigma* parameter defines how smooth the output will be.

* The *quality* can be modified to choose between nicer result and rendering time.

* The *strength* parameter is a multiplier for the high-pass and sharpened outputs.
  It is unused for the blur output.

Notes
+++++

This node outputs an image that has a fixed size.

Example images
++++++++++++++

.. image:: images/node_blur_samples.png
	:align: center

---

### Material Maker Doc Node Filter Blur Slope (`material_maker/doc/node_filter_blur_slope.rst`)

Slope Blur node
~~~~~~~~~~~~~~~~~~~~~

The **Slope Blur** node applies a blur algorithm to its first input
in a direction given by a heightmap.

.. image:: images/node_filter_blur_slope.png
	:align: center

Inputs
++++++

The **Slope Blur** node has an input image to be blurred and a heightmap
image used to defined the direction of the blur effect.

Outputs
+++++++

The **Slope Blur** node outputs the result of the blur operation.

Parameters
++++++++++

The **Slope Blur** node has three parameters:

* The *grid size* defines the size of the output image.

* The *sigma* parameter defines how blurred the output will be.

* Whether *32-Bit* buffer(s) are used when storing input/outputs.
  Reduces banding artifacts but could result in higher video memory usage.

Notes
+++++

This node outputs an image that has a fixed size.

Example images
++++++++++++++

.. image:: images/node_slope_blur_samples.png
	:align: center

---

### Material Maker Doc Node Filter Brightnesscontrast (`material_maker/doc/node_filter_brightnesscontrast.rst`)

BrightnessContrast node
~~~~~~~~~~~~~~~~~~~~~~~

The **BrightnessContrast** node adjusts the brightness and contrast of the input image.

.. image:: images/node_filter_brightnesscontrast.png
	:align: center

Inputs
++++++

The **BrightnessContrast** node accepts an RGBA input texture.

Outputs
+++++++

The **BrightnessContrast** node provides a single RGBA texture.

Parameters
++++++++++

The **BrightnessContrast** node has the following parameters:

* *Brightness* defines how brightness is affected.

* *Contrast* defines how the contrast is affected.

Example images
++++++++++++++

.. image:: images/node_brightness_contrast_samples.png
	:align: center

---

### Material Maker Doc Node Filter Classic Kuwahara (`material_maker/doc/node_filter_classic_kuwahara.rst`)

Classic Kuwahara node
~~~~~~~~~~~~~~~~~~~~~

The **Classic Kuwahara** node applies a simple edge-preserving smoothing filter to its input.

.. image:: images/node_filter_classic_kuwahara.png
	:align: center

Inputs
++++++

The **Classic Kuwahara** node has a single input.

Outputs
+++++++

The **Classic Kuwahara** node outputs the result of the smoothing filter.

Parameters
++++++++++

The **Classic Kuwahara** node accepts the following parameters:

* **Resolution** used to sample the input.

* **Size** of the filter.

* Whether a **Buffer** is used to sample the input before the filter.

Example images
++++++++++++++

.. image:: images/node_classic_kuwahara_samples.png
	:align: center

---

### Material Maker Doc Node Filter Color Conversion (`material_maker/doc/node_filter_color_conversion.rst`)

Color Conversion node
~~~~~~~~~~~~~~~~~~~~~

The **Color Conversion** node converts the input image from linear color space to sRGB or from sRGB to liear, depending on the mode, the alpha channel remains untouched.

.. image:: images/node_filter_color_conversion.png
	:align: center

Inputs
++++++

The **Color Conversion** node requires an RGBA input texture.

Outputs
+++++++

The **Color Conversion** node provides a single RGBA texture.

Parameters
++++++++++

The **Color Conversion** has a single **Mode** parameter to select between converting from linear to sRGB and from sRGB to linear.

Example images
++++++++++++++

.. image:: images/node_color_conversion_samples.png
	:align: center

---

### Material Maker Doc Node Filter Color Pick (`material_maker/doc/node_filter_color_pick.rst`)

Color Pick node
~~~~~~~~~~~~~~~

The **Color Pick** node creates masks from a color input and color parameters.

This node is variadic and can generate several masks from the same image.

.. image:: images/node_filter_color_pick.png
	:align: center

Inputs
++++++

The **Color Pick** node has a single color input.

Outputs
+++++++

The **Color Pick** node outputs grayscale images.

Parameters
++++++++++

The **Color Pick** node accepts the following parameters:

* **Color**, the color to match when creating the mask for each outputs

* **Threshold**, the tolerance used when creating the mask

* **Falloff**, the slope used when creating the mask

---

### Material Maker Doc Node Filter Colorize (`material_maker/doc/node_filter_colorize.rst`)

Colorize node
~~~~~~~~~~~~~

The **Colorize** node applies a user-defined gradient to a grayscale image: black pixels
will be colored with the leftmost color of the gradient and white pixels will take
the rightmost color.

.. image:: images/node_filter_colorize.png
	:align: center

Inputs
++++++

The **Colorize** node requires a grayscale input texture.

Outputs
+++++++

The **Colorize** node provides a single color texture.

Parameters
++++++++++

The **Colorize** node has a single parameter that defines the gradient to be applied to
the input image.

Notes
+++++

The input will be considered (and implicitly converted to) grayscale if it is a color texture.

Pasting a text containing HTML colors (in the #1234ab syntax) into a graph editor will create a Colorize
node that contains all specified colors.

Example images
++++++++++++++

.. image:: images/node_colorize_samples.png
	:align: center

---

### Material Maker Doc Node Filter Colormap (`material_maker/doc/node_filter_colormap.rst`)

Colormap node
~~~~~~~~~~~~~

The **Colormap** node colorizes a grayscale image using a range of colors
produced by sampling a single row or column from another image.

By default, the node samples colors horizontally along the center of the
colormap image. Black pixels in the grayscale image will become the color at
the left edge of this row, white pixels the color at the right edge, and grey
pixels the colors in between.

.. image:: images/node_filter_colormap.png
	:align: center

Inputs
++++++

The **Colormap** node accepts 2 inputs:

* *Input*, the grayscale texture to be colorized

* *Colormap*, the RGBA texture to sample colors from

Outputs
+++++++

The **Colormap** node provides a single color texture as output.

Parameters
++++++++++

The **Colormap** node has the following parameters:

* *Axis* controls whether to sample the *Colormap* texture horizontally or vertically

* *Offset* controls which row or column in the *Colormap* will be sampled

Example images
++++++++++++++

.. image:: images/node_colormap_samples.png
	:align: center

---

### Material Maker Doc Node Filter Colorspace Roundtrip (`material_maker/doc/node_filter_colorspace_roundtrip.rst`)

Colorspace Roundtrip node
~~~~~~~~~~~~~~~~~~~~~~~~~

The **Colorspace Roundtrip** node converts its input to another colorspace,
applies a "lambda subgraph" to individual channels in that colorspace,
and converts it back to RGB.

A common pattern when working with non-RGB colorspaces is to convert an RGB input to the desired colorspace,
apply some transformations to it within that colorspace, and finally convert it back to RGB.
The **Colorspace Roundtrip** node streamlines this process by encapsulating it into a single node.

.. image:: images/node_filter_colorspace_roundtrip.png
	:align: center

Inputs
++++++

The **Colorspace Roundtrip** node accepts an RGBA input.

Outputs
+++++++

The **Colorspace Roundtrip** node provides an RGBA output.

Lambda I/O
++++++++++

The bottom four outputs and inputs of the **Colorspace Roundtrip** node correspond to
the three channels of the working colorspace along with the alpha channel.
Outputs should be connected to a "lambda subgraph" that applies the desired transformation in the working colorspace,
which should then be connected back to the inputs for conversion back to RGB.

By default, unconnected inputs will receive data from the corresponding output unchanged.
This means that only the channels that require modification need to be connected.

Parameters
++++++++++

The **Colorspace Roundtrip** node has a single parameter to choose the working colorspace.
The alpha channel will be passed through unchanged in all cases.

* *RGB*: Pass through the input unchanged.
  This is useful when channels need to be individually separated for transformation but a colorspace conversion is not needed.

* *HSV*: Artist-friendly colorspace with intuitive behavior.
  Consists of a circular Hue channel, a linear Saturation channel, and a linear Value channel.

* *YUV*: Compression-friendly colorspace with a very accurate luminance model.
  Consists of a linear Luma (brightness) channel and two Chroma (blueness and redness) channels.

Example usage
+++++++++++++

* Desaturate (replace Saturation channel of HSV with 0)

.. image:: images/node_filter_colorspace_roundtrip_example1.png
	:align: center

* Swap Red and Green channels

.. image:: images/node_filter_colorspace_roundtrip_example2.png
	:align: center

* Reduce brighness (multiply Value channel of HSV by 0.5)

.. image:: images/node_filter_colorspace_roundtrip_example3.png
	:align: center

---

### Material Maker Doc Node Filter Combine (`material_maker/doc/node_filter_combine.rst`)

Combine node
~~~~~~~~~~~~

The **Combine** node combines four grayscale inputs into an RGBA output texture.

.. image:: images/node_filter_combine.png
	:align: center

Inputs
++++++

The **Combine** node has 4 inputs, one for each (red, green, blue and alpha) channel.

Outputs
+++++++

The **Combine** node outputs an RGBA texture.

---

### Material Maker Doc Node Filter Convert From To Rgb (`material_maker/doc/node_filter_convert_from_to_rgb.rst`)

Convert from/to RGB nodes
~~~~~~~~~~~~~~~~~~~~~~~~~

The **Convert from RGB** and **Convert to RGB** nodes converts between RGB and another specified colorspace.
The alpha channel will pass through unaffected.

.. image:: images/node_filter_convert_from_rgb.png
	:align: center

.. image:: images/node_filter_convert_to_rgb.png
	:align: center

Inputs
++++++

The **Convert from RGB** node accepts an RGBA input.

The **Convert to RGB** node accepts an input in the specified colorspace.

Outputs
+++++++

The **Convert from RGB** node provides an output in the specified colorspace.

The **Convert to RGB** node provides an RGBA output.

Parameters
++++++++++

Both nodes have a single parameter to choose the colorspace being converted to/from.
The alpha channel will be passed through unchanged in all cases.

* *RGB*: Pass through the input unchanged.

* *HSV*: Artist-friendly colorspace with intuitive behavior.
  Consists of a circular Hue channel, a linear Saturation channel, and a linear Value channel.

* *YUV*: Compression-friendly colorspace with a very accurate luminance model.
  Consists of a linear Luma (brightness) channel and two Chroma (blueness and redness) channels.

---

### Material Maker Doc Node Filter Decompose (`material_maker/doc/node_filter_decompose.rst`)

Decompose node
~~~~~~~~~~~~~~

The **Decompose** node decomposes an RGBA input into four grayscale outputs.

.. image:: images/node_filter_decompose.png
	:align: center

Inputs
++++++

The **Decompose** node has a single color input.

Outputs
+++++++

The **Decompose** node outputs 4 grayscale images, one for each (red, green, blue and alpha) channel.

---

### Material Maker Doc Node Filter Denoiser (`material_maker/doc/node_filter_denoiser.rst`)

Denoiser node
.................

The **Denoiser** node performs fast spatial deNoise filter, with circular gaussian kernel.


.. image:: images/node_filter_denoiser.png
	:align: center

Inputs
++++++

The **Denoiser** node accepts one input:

* The *Source* inputs is the image to be denoised.

Outputs
+++++++

The **Denoiser** node outputs the denoised image.

Parameters
::::::::::

The **Denoiser** node has the following parameters:

* the *Size* determines the resolution of the denoiser

* the Standard Deviation *Sigma* radius

* the *kSigma* is the K factor sigma coefficient:
    * kSigma = 1*sigma cover 68% of data
    * kSigma = 2*sigma cover 95% of data - but there are over 3 times  more points to compute
    * kSigma = 3*sigma cover 99.7% of data - but needs more than double the calculations of 2*sigma

* the edge *Sharpening* threshold

Example images
::::::::::::::

.. image:: images/node_filter_denoiser_sample.png
	:align: center

---

### Material Maker Doc Node Filter Dilate (`material_maker/doc/node_filter_dilate.rst`)

Dilate node
~~~~~~~~~~~~~

The **Dilate** node expands the white parts of its input mask. When a source input is connected,
it expands the source input following the mask.

.. image:: images/node_filter_dilate.png
	:align: center

Inputs
++++++

The **Dilate** node accepts:

* a mask grayscale input whose light parts will be dilated
* an optional color source input whose colors will be used in the output

Outputs
+++++++

The **Dilate** node generates a single color texture.

Parameters
++++++++++

The **Dilate** node accepts the following parameters:

* *resolution* is the resolution of the effect and only influences how details
  of the mask (and not the source if any) is captured. It is not recommended to
  set this value too high, and completely useless to set it higher than the generated
  textures resolution.
* *length* is the length of the dilate effect
* when *mode* is set to 0, the dilate effect generates a gradient around (based on the
  distance to) the white parts of the mask. When set to 1, the dilate effect just dilates
  the source (or the white color). Values in between mix both methods
* the *distance* function used for the Dilate operation (Euclidian, Manhattan or Chebyshev)
* a *tile* option to create a tileable result

Example images
++++++++++++++

.. image:: images/node_dilate_samples.png
	:align: center

---

### Material Maker Doc Node Filter Edge Detect (`material_maker/doc/node_filter_edge_detect.rst`)

Edge Detect node
~~~~~~~~~~~~~~~~

There are 4 different **Edge Detect** nodes that apply an edge detect
filter to their input. Them main edge detect node has more parameters,
the 3 others are simplified (and faster) filters.

.. image:: images/node_filter_edge_detect.png
	:align: center

Inputs
++++++

The **Edge Detect** node has a single input.

Outputs
+++++++

The **Edge Detect** node outputs the result of the edge detect operation.

Parameters
++++++++++

The **Edge Detect** node accepts the following parameters:

* The *size* at which the input is sampled

* the *width* of the edge detection area for each pixel

* the value difference *threshold* used when comparing pixel colors

Example images
++++++++++++++

.. image:: images/node_edge_detect_samples.png
	:align: center

---

### Material Maker Doc Node Filter Emboss (`material_maker/doc/node_filter_emboss.rst`)

Emboss node
~~~~~~~~~~~

The **Emboss** node generates an image that simulates lighting on its input.

.. image:: images/node_filter_emboss.png
	:align: center

Inputs
++++++

The **Emboss** node has a single grayscale input, interpreted as a heightmap.

Outputs
+++++++

The **Emboss** node outputs the result of the emboss operation.

Parameters
++++++++++

The **Emboss** node the following parameters:

* The *grid size* defines the size of the output image.

* the *angle* of the light source used for the emboss effect.

* the *amount* defines the strength of the emboss effect.

* the *width* of the emboss effect.

* whether *32 Bit* buffer(s) are used to sample the input.
  Reduces banding artifacts but could result in higher video
  memory usage.

Notes
+++++

This node outputs an image that has a fixed size.

Example images
++++++++++++++

.. image:: images/node_emboss_samples.png
	:align: center

---

### Material Maker Doc Node Filter Fill (`material_maker/doc/node_filter_fill.rst`)

Fill node
~~~~~~~~~

The **Fill** node fills all areas surrounded by white pixels, and generates
a specific input for the fill companion (generally named "Fill to ...") nodes.

That fill information is an axis aligned bounding box of each filled area.

.. image:: images/node_filter_fill.png
	:align: center

Inputs
++++++

The **Fill** node accepts:

* a mask grayscale input whose light parts surround areas that must be filled

Outputs
+++++++

The **Fill** node generates a single RGBA texture that contains the bounding
box of each filled area.

Parameters
++++++++++

The **Fill** node accepts the following parameters:

* *resolution* is the resolution of the effect and only influences how details
  of the mask (and not the source if any) is captured. It is advised to be careful
  with using high values here, as the computation time may become very long and high
  resolutions can cause precision issues.
  Setting it higher than the input's resolution will not yield any benefit - only
  increase the computation time.
* *Remove edges* is an option to grow filled areas to remove edges.
* *Adjust* is useful when removing edges and is used to grow the areas bounding boxes.
  It is useful when using for example the **Fill to UV** or the **Fill to Gradient** node.

---

### Material Maker Doc Node Filter Fill From Colors (`material_maker/doc/node_filter_fill_from_colors.rst`)

Fill From Colors node
~~~~~~~~~~~~~~~~~~~~~

The **Fill From Colors** node generates specific data for the fill companion (generally named
"Fill to ...") nodes from an image composed of color areas.

That fill information is an axis aligned bounding box of each filled area.

.. image:: images/node_filter_fill_from_colors.png
	:align: center

Inputs
++++++

The **Fill** node accepts:

* an RGBA input whose light parts surround areas that must be filled

Outputs
+++++++

The **Fill** node generates a single RGBA texture that contains the bounding
box of each filled area.

Parameters
++++++++++

The **Fill** node accepts the following parameters:

* *resolution* is the resolution of the effect and only influences how details
  of the mask (and not the source if any) is captured. It is advised to be careful
  with using high values here, as the computation time may become very long and high
  resolutions can cause precision issues.
  Setting it higher than the input's resolution will not yield any benefit - only
  increase the computation time.

---

### Material Maker Doc Node Filter Fill Select (`material_maker/doc/node_filter_fill_select.rst`)

Fill Select node
~~~~~~~~~~~~~~~~

The **Fill Select** node uses the output of the **Fill** node and
generates a mask for a single user-selected area.

.. image:: images/node_filter_fill_select.png
	:align: center

Inputs
++++++

The **Fill Select** node accepts the output of a **Fill** node (or a
compatible output of another node) as input.

Outputs
+++++++

The **Fill Select** node generates a single grayscale image map that
shows a mask for the selected area.

Parameters
++++++++++

The **Fill Select** node accepts the coordinates of the location of the selected area.

Example images
++++++++++++++

.. image:: images/node_fill_select_samples.png
	:align: center

---

### Material Maker Doc Node Filter Fill To Color (`material_maker/doc/node_filter_fill_to_color.rst`)

Fill to Color node
~~~~~~~~~~~~~~~~~~

The **Fill to Color** node uses the output of the **Fill** node and fills
all detected areas with a color taken from its other input.

.. image:: images/node_filter_fill_to_color.png
	:align: center

Inputs
++++++

The **Fill to Color** node accepts the output of a **Fill** node (or a
compatible output of another node) as first input. The second input it
a color image the output colors are taken from.

Outputs
+++++++

The **Fill to Color** node generates a single color image map whose
color if taken from its other input, at the center of each area.

Parameters
++++++++++

The **Fill to color** node accepts the value of the color of edges in the
generated output as parameter.

Example images
++++++++++++++

.. image:: images/node_fill_to_color_samples.png
	:align: center

---

### Material Maker Doc Node Filter Fill To Gradient (`material_maker/doc/node_filter_fill_to_gradient.rst`)

Fill to Gradient node
~~~~~~~~~~~~~~~~~~~~~

The **Fill to Gradient** node uses the output of the **Fill** node and fills
all detected areas with one or multiple layers of gradients.

.. image:: images/node_filter_fill_to_gradient.png
	:align: center

Inputs
++++++

The **Fill to Gradient** node accepts the output of a **Fill** node (or a
compatible output of another node) as input.

Outputs
+++++++

The **Fill to Gradient** node outputs the generated gradient.

Parameters
++++++++++

The **Fill to Gradient** node accepts the following parameters:

* The *Gradient*

* The *Mode* defines how the gradient is spread out on each area (strectch or square).

* *Layers* defines how many layers of the gradient will be applied to each fill area, blended with the min function (darken).

* *Rotate* defines the base rotation of the gradient.

* *Random Rotation* defines how much the rotation should be randomized for each gradient.

* *Random Offset* defines how much each gradient get's randomly offset.

Example images
++++++++++++++

.. image:: images/node_fill_to_gradient_samples.png
	:align: center

---

### Material Maker Doc Node Filter Fill To Orientation (`material_maker/doc/node_filter_fill_to_orientation.rst`)

Fill to Orientation node
~~~~~~~~~~~~~~~~~~~~~~~~

The **Fill to Orientation** node uses the output of the **Fill** node and fills
all detected areas with a grayscale color that depends on their orientation.

.. image:: images/node_filter_fill_to_orientation.png
	:align: center

Inputs
++++++

The **Fill to Orientation** node accepts the output of a **Fill** node (or a
compatible output of another node) as input.

Outputs
+++++++

The **Fill to Orientation** node generates a single grayscale image map whose value
is the orientation of the input (white: horizontal, black: vertical).

Parameters
++++++++++

The **Fill to Orientation** has a single parameter to invert its output.

Example images
++++++++++++++

.. image:: images/node_fill_to_orientation_samples.png
	:align: center

---

--- METRICS ---
- Files Extracted: 101
- Estimated Token Budget: ~29836 tokens
- Canonical Reference: https://codewiki.google/github.com/RodZill4/material-maker
