diff --git a/addons/material_maker/doc/images/node_gradient.png b/addons/material_maker/doc/images/node_gradient.png new file mode 100644 index 0000000..6e91fba Binary files /dev/null and b/addons/material_maker/doc/images/node_gradient.png differ diff --git a/addons/material_maker/doc/images/node_gradient_samples.png b/addons/material_maker/doc/images/node_gradient_samples.png new file mode 100644 index 0000000..e060ce0 Binary files /dev/null and b/addons/material_maker/doc/images/node_gradient_samples.png differ diff --git a/addons/material_maker/doc/images/node_sdannularshape.png b/addons/material_maker/doc/images/node_sdannularshape.png new file mode 100644 index 0000000..1408485 Binary files /dev/null and b/addons/material_maker/doc/images/node_sdannularshape.png differ diff --git a/addons/material_maker/doc/images/node_sdannularshape_sample.png b/addons/material_maker/doc/images/node_sdannularshape_sample.png new file mode 100644 index 0000000..dd418d2 Binary files /dev/null and b/addons/material_maker/doc/images/node_sdannularshape_sample.png differ diff --git a/addons/material_maker/doc/images/node_sdboolean.png b/addons/material_maker/doc/images/node_sdboolean.png new file mode 100644 index 0000000..dc8b031 Binary files /dev/null and b/addons/material_maker/doc/images/node_sdboolean.png differ diff --git a/addons/material_maker/doc/images/node_sdboolean_sample.png b/addons/material_maker/doc/images/node_sdboolean_sample.png new file mode 100644 index 0000000..e22b34b Binary files /dev/null and b/addons/material_maker/doc/images/node_sdboolean_sample.png differ diff --git a/addons/material_maker/doc/images/node_sdbox.png b/addons/material_maker/doc/images/node_sdbox.png new file mode 100644 index 0000000..f866a08 Binary files /dev/null and b/addons/material_maker/doc/images/node_sdbox.png differ diff --git a/addons/material_maker/doc/images/node_sdbox_sample.png b/addons/material_maker/doc/images/node_sdbox_sample.png new file mode 100644 index 0000000..840317a Binary files /dev/null and b/addons/material_maker/doc/images/node_sdbox_sample.png differ diff --git a/addons/material_maker/doc/images/node_sdcircle.png b/addons/material_maker/doc/images/node_sdcircle.png new file mode 100644 index 0000000..3798408 Binary files /dev/null and b/addons/material_maker/doc/images/node_sdcircle.png differ diff --git a/addons/material_maker/doc/images/node_sdcircle_sample.png b/addons/material_maker/doc/images/node_sdcircle_sample.png new file mode 100644 index 0000000..355d576 Binary files /dev/null and b/addons/material_maker/doc/images/node_sdcircle_sample.png differ diff --git a/addons/material_maker/doc/images/node_sdf_samples.png b/addons/material_maker/doc/images/node_sdf_samples.png new file mode 100644 index 0000000..198a76b Binary files /dev/null and b/addons/material_maker/doc/images/node_sdf_samples.png differ diff --git a/addons/material_maker/doc/images/node_sdline.png b/addons/material_maker/doc/images/node_sdline.png new file mode 100644 index 0000000..f15cdcf Binary files /dev/null and b/addons/material_maker/doc/images/node_sdline.png differ diff --git a/addons/material_maker/doc/images/node_sdline_sample.png b/addons/material_maker/doc/images/node_sdline_sample.png new file mode 100644 index 0000000..89b3204 Binary files /dev/null and b/addons/material_maker/doc/images/node_sdline_sample.png differ diff --git a/addons/material_maker/doc/images/node_sdrhombus.png b/addons/material_maker/doc/images/node_sdrhombus.png new file mode 100644 index 0000000..2100a84 Binary files /dev/null and b/addons/material_maker/doc/images/node_sdrhombus.png differ diff --git a/addons/material_maker/doc/images/node_sdrhombus_sample.png b/addons/material_maker/doc/images/node_sdrhombus_sample.png new file mode 100644 index 0000000..85a212e Binary files /dev/null and b/addons/material_maker/doc/images/node_sdrhombus_sample.png differ diff --git a/addons/material_maker/doc/images/node_sdroundedshape.png b/addons/material_maker/doc/images/node_sdroundedshape.png new file mode 100644 index 0000000..1694866 Binary files /dev/null and b/addons/material_maker/doc/images/node_sdroundedshape.png differ diff --git a/addons/material_maker/doc/images/node_sdroundedshape_sample.png b/addons/material_maker/doc/images/node_sdroundedshape_sample.png new file mode 100644 index 0000000..060c956 Binary files /dev/null and b/addons/material_maker/doc/images/node_sdroundedshape_sample.png differ diff --git a/addons/material_maker/doc/images/node_sdshow.png b/addons/material_maker/doc/images/node_sdshow.png new file mode 100644 index 0000000..5bf221f Binary files /dev/null and b/addons/material_maker/doc/images/node_sdshow.png differ diff --git a/addons/material_maker/doc/images/node_sdsmoothboolean.png b/addons/material_maker/doc/images/node_sdsmoothboolean.png new file mode 100644 index 0000000..683d077 Binary files /dev/null and b/addons/material_maker/doc/images/node_sdsmoothboolean.png differ diff --git a/addons/material_maker/doc/images/node_sdsmoothboolean_sample.png b/addons/material_maker/doc/images/node_sdsmoothboolean_sample.png new file mode 100644 index 0000000..03bc481 Binary files /dev/null and b/addons/material_maker/doc/images/node_sdsmoothboolean_sample.png differ diff --git a/addons/material_maker/doc/images/node_shape.png b/addons/material_maker/doc/images/node_shape.png new file mode 100644 index 0000000..47194db Binary files /dev/null and b/addons/material_maker/doc/images/node_shape.png differ diff --git a/addons/material_maker/doc/images/node_shape_samples.png b/addons/material_maker/doc/images/node_shape_samples.png new file mode 100644 index 0000000..7d543d0 Binary files /dev/null and b/addons/material_maker/doc/images/node_shape_samples.png differ diff --git a/addons/material_maker/doc/images/node_uniform.png b/addons/material_maker/doc/images/node_uniform.png index 4deb953..bbfcbd1 100644 Binary files a/addons/material_maker/doc/images/node_uniform.png and b/addons/material_maker/doc/images/node_uniform.png differ diff --git a/addons/material_maker/doc/make.bat b/addons/material_maker/doc/make.bat index 54063e7..10cb3b5 100644 --- a/addons/material_maker/doc/make.bat +++ b/addons/material_maker/doc/make.bat @@ -30,7 +30,7 @@ if errorlevel 9009 ( goto end :help -%SPHINXBUILD% -M html %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +%SPHINXBUILD% -b html -a %SOURCEDIR% %BUILDDIR%/html %SPHINXOPTS% :end popd diff --git a/addons/material_maker/doc/node_simple_gradient.rst b/addons/material_maker/doc/node_simple_gradient.rst new file mode 100644 index 0000000..23034e3 --- /dev/null +++ b/addons/material_maker/doc/node_simple_gradient.rst @@ -0,0 +1,33 @@ +Gradient nodes +~~~~~~~~~~~~~~ + +The **Gradient**, **Circular Gradient** and **Radial Gradient** nodes generate +a color, user defined gradient. + +.. image:: images/node_gradient.png + :align: center + +Inputs +++++++ + +The gradient nodes do not accept any input. + +Outputs ++++++++ + +The gradient nodes generate a single color gradient image. + +Parameters +++++++++++ + +The **Gradient** nodes accept the following parameters: + +* the *number of repetitions* of the gradient +* the *rotation angle* (only for the linear **Gradient** node) +* the *gradient* + +Example images +++++++++++++++ + +.. image:: images/node_gradient_samples.png + :align: center diff --git a/addons/material_maker/doc/node_simple_sdf.rst b/addons/material_maker/doc/node_simple_sdf.rst new file mode 100644 index 0000000..53aaebd --- /dev/null +++ b/addons/material_maker/doc/node_simple_sdf.rst @@ -0,0 +1,46 @@ +Signed distance function geometry nodes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The signed distance function nodes can be used to define complex 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 greyscale image using the **sdShow** node. + +All output samples shown in this sections are images generated through the **sdView** node. + +All Signed Distance Functions nodes are based on code written by Inigo Quilez that can be found +`on this page`__. + +.. _sdf2dpage: https://www.iquilezles.org/www/articles/distfunctions2d/distfunctions2d.htm + +__ sdf2dpage_ + +Shapes +++++++ + +.. toctree:: + :maxdepth: 1 + + node_simple_sdf_shapes_sdcircle + node_simple_sdf_shapes_sdline + node_simple_sdf_shapes_sdbox + node_simple_sdf_shapes_sdrhombus + +Operators ++++++++++ + +.. toctree:: + :maxdepth: 1 + + node_simple_sdf_operators_sdboolean + node_simple_sdf_operators_sdsmoothboolean + node_simple_sdf_operators_sdroundedshape + node_simple_sdf_operators_sdannularshape + node_simple_sdf_operators_sdshow + +Example images +++++++++++++++ + +.. image:: images/node_sdf_samples.png + :align: center diff --git a/addons/material_maker/doc/node_simple_sdf_operators_sdannularshape.rst b/addons/material_maker/doc/node_simple_sdf_operators_sdannularshape.rst new file mode 100644 index 0000000..c61576e --- /dev/null +++ b/addons/material_maker/doc/node_simple_sdf_operators_sdannularshape.rst @@ -0,0 +1,34 @@ +sdAnnularShape node +................... + +The **sdAnnularShape** node generates a signed distance image of an annular shape +based on its input, by substracting a constant from the absolute value of the +distance function (i.e. creating a ring around the shape). + +.. image:: images/node_sdannularshape.png + :align: center + +Inputs +:::::: + +The **sdAnnularShape** node accepts an input in signed distance function format. + +Outputs +::::::: + +The **sdAnnularShape** node generates a signed distance function of the +annular version of the input shape. + +Parameters +:::::::::: + +The **sdAnnularShape** node accepts the following parameters: + +* *the distance* to be substracted from the absolute value of the + function (i.e. half the width of the ring) + +Example images +:::::::::::::: + +.. image:: images/node_sdannularshape_sample.png + :align: center diff --git a/addons/material_maker/doc/node_simple_sdf_operators_sdboolean.rst b/addons/material_maker/doc/node_simple_sdf_operators_sdboolean.rst new file mode 100644 index 0000000..e243bbe --- /dev/null +++ b/addons/material_maker/doc/node_simple_sdf_operators_sdboolean.rst @@ -0,0 +1,31 @@ +sdBoolean node +.............. + +The **sdBoolean** node generates a signed distance image for the combination (union, +intersection or difference) of its inputs. + +.. image:: images/node_sdboolean.png + :align: center + +Inputs +:::::: + +The **sdBoolean** node accepts 2 inputs in signed distance function format. + +Outputs +::::::: + +The **sdBoolean** node generates a signed distance function of the +combination of its inputs. + +Parameters +:::::::::: + +The **sdBoolean** node accepts *the operator it applies (union, intersection or +difference)* as parameter. + +Example images +:::::::::::::: + +.. image:: images/node_sdboolean_sample.png + :align: center diff --git a/addons/material_maker/doc/node_simple_sdf_operators_sdroundedshape.rst b/addons/material_maker/doc/node_simple_sdf_operators_sdroundedshape.rst new file mode 100644 index 0000000..ae70c84 --- /dev/null +++ b/addons/material_maker/doc/node_simple_sdf_operators_sdroundedshape.rst @@ -0,0 +1,33 @@ +sdRoundedShape node +................... + +The **sdRoundedShape** node generates a signed distance image of a rounded shape +based on its input, by substracting a constant from its distance function (i.e. +"growing" it towards the outside). + +.. image:: images/node_sdroundedshape.png + :align: center + +Inputs +:::::: + +The **sdRoundedShape** node accepts an input in signed distance function format. + +Outputs +::::::: + +The **sdRoundedShape** node generates a signed distance function of the +rounded version of the input shape. + +Parameters +:::::::::: + +The **sdRoundedShape** node accepts the following parameters: + +* *the distance* to be substracted from the function + +Example images +:::::::::::::: + +.. image:: images/node_sdroundedshape_sample.png + :align: center diff --git a/addons/material_maker/doc/node_simple_sdf_operators_sdshow.rst b/addons/material_maker/doc/node_simple_sdf_operators_sdshow.rst new file mode 100644 index 0000000..24499f3 --- /dev/null +++ b/addons/material_maker/doc/node_simple_sdf_operators_sdshow.rst @@ -0,0 +1,25 @@ +sdShow node +........... + +The **sdShow** node converts a signed distance image into a greyscale +image whose background is black and the shape described by its input +is white. + +.. image:: images/node_sdshow.png + :align: center + +Inputs +:::::: + +The **sdShow** node accepts an input in signed distance function format. + +Outputs +::::::: + +The **sdShow** node generates a greyscale output. + +Parameters +:::::::::: + +The **sdShow** node accepts the *width of the gradient* (from white to black) +around the input shape as parameter. diff --git a/addons/material_maker/doc/node_simple_sdf_operators_sdsmoothboolean.rst b/addons/material_maker/doc/node_simple_sdf_operators_sdsmoothboolean.rst new file mode 100644 index 0000000..e1504f2 --- /dev/null +++ b/addons/material_maker/doc/node_simple_sdf_operators_sdsmoothboolean.rst @@ -0,0 +1,33 @@ +sdSmoothBoolean node +.................... + +The **sdSmoothBoolean** node generates a signed distance image for the combination (union, +intersection or difference) of its inputs. + +.. image:: images/node_sdsmoothboolean.png + :align: center + +Inputs +:::::: + +The **sdSmoothBoolean** node accepts 2 inputs in signed distance function format. + +Outputs +::::::: + +The **sdSmoothBoolean** node generates a signed distance function of the +combination of its inputs. + +Parameters +:::::::::: + +The **sdSmoothBoolean** node accepts the following parameters: + +* *the operator it applies (union, intersection or difference)* +* *the smoothness* of the operation + +Example images +:::::::::::::: + +.. image:: images/node_sdsmoothboolean_sample.png + :align: center diff --git a/addons/material_maker/doc/node_simple_sdf_shapes_sdbox.rst b/addons/material_maker/doc/node_simple_sdf_shapes_sdbox.rst new file mode 100644 index 0000000..ecabb0d --- /dev/null +++ b/addons/material_maker/doc/node_simple_sdf_shapes_sdbox.rst @@ -0,0 +1,31 @@ +sdBox node +.......... + +The **sdBox** node generates a signed distance image for a rectangle. + +.. image:: images/node_sdbox.png + :align: center + +Inputs +:::::: + +The **sdBox** node does not accept any input. + +Outputs +::::::: + +The **sdBox** node generates a signed distance function for an axis aligned box. + +Parameters +:::::::::: + +The **sdBox** node accepts the following parameters: + +* its *width* and *height* +* the *X and Y coordinates of opposite of its center* + +Example images +:::::::::::::: + +.. image:: images/node_sdbox_sample.png + :align: center diff --git a/addons/material_maker/doc/node_simple_sdf_shapes_sdcircle.rst b/addons/material_maker/doc/node_simple_sdf_shapes_sdcircle.rst new file mode 100644 index 0000000..5aff382 --- /dev/null +++ b/addons/material_maker/doc/node_simple_sdf_shapes_sdcircle.rst @@ -0,0 +1,31 @@ +sdCircle node +............. + +The **sdCircle** node generates a signed distance image for a circle. + +.. image:: images/node_sdcircle.png + :align: center + +Inputs +:::::: + +The **sdCircle** node does not accept any input. + +Outputs +::::::: + +The **sdCircle** node generates a signed distance function for a circle. + +Parameters +:::::::::: + +The **sdCircle** node accepts the following parameters: + +* the *radius* of the circle +* the *X and Y coordinates of the center* of the circle + +Example images +:::::::::::::: + +.. image:: images/node_sdcircle_sample.png + :align: center diff --git a/addons/material_maker/doc/node_simple_sdf_shapes_sdline.rst b/addons/material_maker/doc/node_simple_sdf_shapes_sdline.rst new file mode 100644 index 0000000..c8507ea --- /dev/null +++ b/addons/material_maker/doc/node_simple_sdf_shapes_sdline.rst @@ -0,0 +1,32 @@ +sdLine node +............. + +The **sdLine** node generates a signed distance image for a line segment. It can +easily be turned into a capsule shape using an **sdRoundedShape** node (the result +is shown in the example image below). + +.. image:: images/node_sdline.png + :align: center + +Inputs +:::::: + +The **sdLine** node does not accept any input. + +Outputs +::::::: + +The **sdLine** node generates a signed distance function for a line. + +Parameters +:::::::::: + +The **sdLine** node accepts the *X and Y coordinates of both ends of the +segment* as parameters. + + +Example images +:::::::::::::: + +.. image:: images/node_sdline_sample.png + :align: center diff --git a/addons/material_maker/doc/node_simple_sdf_shapes_sdrhombus.rst b/addons/material_maker/doc/node_simple_sdf_shapes_sdrhombus.rst new file mode 100644 index 0000000..0f6299c --- /dev/null +++ b/addons/material_maker/doc/node_simple_sdf_shapes_sdrhombus.rst @@ -0,0 +1,31 @@ +sdRhombus node +.............. + +The **sdRhombus** node generates a signed distance image for a rhombus. + +.. image:: images/node_sdrhombus.png + :align: center + +Inputs +:::::: + +The **sdRhombus** node does not accept any input. + +Outputs +::::::: + +The **sdRhombus** node generates a signed distance function for an axis aligned rhombus. + +Parameters +:::::::::: + +The **sdRhombus** node accepts the following parameters: + +* its *width* and *height* +* the *X and Y coordinates of opposite of its center* + +Example images +:::::::::::::: + +.. image:: images/node_sdrhombus_sample.png + :align: center diff --git a/addons/material_maker/doc/node_simple_shape.rst b/addons/material_maker/doc/node_simple_shape.rst new file mode 100644 index 0000000..4c5b5aa --- /dev/null +++ b/addons/material_maker/doc/node_simple_shape.rst @@ -0,0 +1,34 @@ +Shape node +~~~~~~~~~~ + +The **Shape** node outputs a simple greyscale shape. + +.. image:: images/node_shape.png + :align: center + +Inputs +++++++ + +The shape node do not accept any input. + +Outputs ++++++++ + +The shape node provides an output that generates greyscale image showing the +selected white shape on a black background. + +Parameters +++++++++++ + +The **Shape** node has the following parameters: + +* the shape type: Circle, Polygon, Star, Curved star or Rays +* the edge, corners or rays count +* the shape size +* the size of the gradient at the edge of the shape + +Example images +++++++++++++++ + +.. image:: images/node_shape_samples.png + :align: center diff --git a/addons/material_maker/doc/node_simple_uniform.rst b/addons/material_maker/doc/node_simple_uniform.rst index c657b34..5f59264 100644 --- a/addons/material_maker/doc/node_simple_uniform.rst +++ b/addons/material_maker/doc/node_simple_uniform.rst @@ -1,21 +1,23 @@ -Uniform node -~~~~~~~~~~~~ +Uniform nodes +~~~~~~~~~~~~~ -The uniform node outputs a single uniform image whose color is configurable. +The **Uniform** and **Uniform/Greyscale** node output a single uniform image +whose color is configurable. .. image:: images/node_uniform.png Inputs ++++++ -The uniform node does not accept any input. +The uniform nodes do not accept any input. Outputs +++++++ -The uniform node provides an output that generates a uniform color image. +The uniform nodes provide an output that generates a uniform color image. Parameters ++++++++++ -The uniform node has a single *color* parameter that defines the color of the output image. +The **Uniform** node has a single *color* parameter that defines the color of +the output image. The **Uniform/Greyscale** node has a single *float* parameter. diff --git a/addons/material_maker/doc/nodes_simple.rst b/addons/material_maker/doc/nodes_simple.rst index 8e4898c..4144142 100644 --- a/addons/material_maker/doc/nodes_simple.rst +++ b/addons/material_maker/doc/nodes_simple.rst @@ -4,24 +4,11 @@ Simple nodes The simple nodes are nodes that do not accept any input and generate one or several simple shapes. .. toctree:: - :maxdepth: 1 + :maxdepth: 0 - node_simple_gradient - node_simple_gradient_circular - node_simple_gradient_radial - node_simple_image - node_simple_sdf_operators_sdannularshape - node_simple_sdf_operators_sdboolean - node_simple_sdf_operators_sdroundedshape - node_simple_sdf_operators_sdshow - node_simple_sdf_operators_sdsmoothboolean - node_simple_sdf_shapes_sdbox - node_simple_sdf_shapes_sdcircle - node_simple_sdf_shapes_sdline - node_simple_sdf_shapes_sdrhombus - node_simple_shape - node_simple_shape_circle - node_simple_shape_curved_star - node_simple_shape_rays - node_simple_shape_star node_simple_uniform + node_simple_shape + node_simple_image + node_simple_gradient + node_simple_sdf + \ No newline at end of file diff --git a/addons/material_maker/doc/user_interface.rst b/addons/material_maker/doc/user_interface.rst index a8a7a6c..c3af82d 100644 --- a/addons/material_maker/doc/user_interface.rst +++ b/addons/material_maker/doc/user_interface.rst @@ -221,14 +221,25 @@ View menu Tools menu ^^^^^^^^^^ -* The *Create* submenu can be used to create any of the node templates +* The *Create* submenu can be used to create any of the node templates. -* *Create group* Creates a subgraph node with the currently selected nodes +* *Create group* creates a subgraph node with the currently selected nodes, + and shows the contents of the newly created group in the current graph + view. + +* the *Make selected nodes editable* menu item will toggle edit mode for + all selected nodes that support it. Shader and graph nodes will show + 3 buttons to edit, load and save the node, switches will show controls to + modify the number of choices and outputs, and input/output modes will + become editable. * *Add selected node to user library* first prompts for an item name. If a name is entered and confirmed, the selected nodes in the current material will be added to the user library under that name. The user library is saved automatically. +* *Export the nodes library* will prompt for a location on the disk and + save the whole node library. + Help menu ^^^^^^^^^