diff --git a/addons/material_maker/doc/base_library.rst b/addons/material_maker/doc/base_library.rst index 5bf7059..7d2b956 100644 --- a/addons/material_maker/doc/base_library.rst +++ b/addons/material_maker/doc/base_library.rst @@ -1,5 +1,5 @@ -Available nodes in base library -=============================== +Nodes library +============= This section describes all nodes that can are provided in the base library to describe procedural materials. diff --git a/addons/material_maker/doc/conf.py b/addons/material_maker/doc/conf.py index 5cd693c..1aee5d7 100644 --- a/addons/material_maker/doc/conf.py +++ b/addons/material_maker/doc/conf.py @@ -24,7 +24,7 @@ copyright = '2018, Rodz Labs' author = 'Rodz Labs' # The short X.Y version -version = '' +version = '0.7' # The full version, including alpha/beta/rc tags release = '' @@ -87,7 +87,7 @@ html_theme = "sphinx_rtd_theme" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = [] # Custom sidebar templates, must be a dictionary that maps document names # to template names. @@ -103,7 +103,7 @@ html_static_path = ['_static'] # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. -htmlhelp_basename = 'MaterialMakerdoc' +htmlhelp_basename = 'MaterialMakerDoc' # -- Options for LaTeX output ------------------------------------------------ diff --git a/addons/material_maker/doc/images/node_buffer.png b/addons/material_maker/doc/images/node_buffer.png new file mode 100644 index 0000000..c89a52f Binary files /dev/null and b/addons/material_maker/doc/images/node_buffer.png differ diff --git a/addons/material_maker/doc/images/node_debug.png b/addons/material_maker/doc/images/node_debug.png new file mode 100644 index 0000000..8fae855 Binary files /dev/null and b/addons/material_maker/doc/images/node_debug.png differ diff --git a/addons/material_maker/doc/images/node_debug_pane.png b/addons/material_maker/doc/images/node_debug_pane.png new file mode 100644 index 0000000..76d80a2 Binary files /dev/null and b/addons/material_maker/doc/images/node_debug_pane.png differ diff --git a/addons/material_maker/doc/images/node_kaleidoscope.png b/addons/material_maker/doc/images/node_kaleidoscope.png new file mode 100644 index 0000000..889a369 Binary files /dev/null and b/addons/material_maker/doc/images/node_kaleidoscope.png differ diff --git a/addons/material_maker/doc/images/node_kaleidoscope_samples.png b/addons/material_maker/doc/images/node_kaleidoscope_samples.png new file mode 100644 index 0000000..200c786 Binary files /dev/null and b/addons/material_maker/doc/images/node_kaleidoscope_samples.png differ diff --git a/addons/material_maker/doc/images/node_material.png b/addons/material_maker/doc/images/node_material.png index e5d3e10..a2f79f5 100644 Binary files a/addons/material_maker/doc/images/node_material.png and b/addons/material_maker/doc/images/node_material.png differ diff --git a/addons/material_maker/doc/images/node_mirror.png b/addons/material_maker/doc/images/node_mirror.png new file mode 100644 index 0000000..ca2557f Binary files /dev/null and b/addons/material_maker/doc/images/node_mirror.png differ diff --git a/addons/material_maker/doc/images/node_mirror_samples.png b/addons/material_maker/doc/images/node_mirror_samples.png new file mode 100644 index 0000000..dc7d269 Binary files /dev/null and b/addons/material_maker/doc/images/node_mirror_samples.png differ diff --git a/addons/material_maker/doc/images/node_remote.png b/addons/material_maker/doc/images/node_remote.png index e9ec668..ff7b846 100644 Binary files a/addons/material_maker/doc/images/node_remote.png and b/addons/material_maker/doc/images/node_remote.png differ diff --git a/addons/material_maker/doc/images/node_switch.png b/addons/material_maker/doc/images/node_switch.png index 6ecdf50..86b7995 100644 Binary files a/addons/material_maker/doc/images/node_switch.png and b/addons/material_maker/doc/images/node_switch.png differ diff --git a/addons/material_maker/doc/node_export.rst b/addons/material_maker/doc/node_export.rst deleted file mode 100644 index da3a956..0000000 --- a/addons/material_maker/doc/node_export.rst +++ /dev/null @@ -1,23 +0,0 @@ -Export node -~~~~~~~~~~~ - -The Export node defines a a texture that will be saved together with the -material textures when exporting the project. - -.. image:: images/node_export.png - -Inputs -++++++ - -The Export node has an input that will be saved when exporting the project. - -Outputs -+++++++ - -The Export node does not have any output. - -Parameters -++++++++++ - -The Export node has a single parameter that defines the suffix PNG file -that will be created. diff --git a/addons/material_maker/doc/node_filter_adjust_hsv.rst b/addons/material_maker/doc/node_filter_adjust_hsv.rst index 768f7c5..e452ca0 100644 --- a/addons/material_maker/doc/node_filter_adjust_hsv.rst +++ b/addons/material_maker/doc/node_filter_adjust_hsv.rst @@ -4,6 +4,7 @@ AdjustHSV node The **AdjustHSV** node adjusts the hue, saturation and value of the input image. .. image:: images/node_adjust_hsv.png + :align: center Inputs ++++++ diff --git a/addons/material_maker/doc/node_filter_blend.rst b/addons/material_maker/doc/node_filter_blend.rst index 21db9f3..c913f8e 100644 --- a/addons/material_maker/doc/node_filter_blend.rst +++ b/addons/material_maker/doc/node_filter_blend.rst @@ -6,6 +6,7 @@ defined by the blend mode between both inputs, and mixes the result with the bot using the opacity (defines by the *opacity* parameter, or the optional greyscale input). .. image:: images/node_blend.png + :align: center Inputs ++++++ diff --git a/addons/material_maker/doc/node_filter_blur.rst b/addons/material_maker/doc/node_filter_blur.rst index 10f8a75..834e23b 100644 --- a/addons/material_maker/doc/node_filter_blur.rst +++ b/addons/material_maker/doc/node_filter_blur.rst @@ -4,6 +4,7 @@ Blur node The **Blur** node applies a Gaussian blur algorithm to its input. .. image:: images/node_blur.png + :align: center Inputs ++++++ diff --git a/addons/material_maker/doc/node_filter_colorize.rst b/addons/material_maker/doc/node_filter_colorize.rst index 1b70147..471dc8a 100644 --- a/addons/material_maker/doc/node_filter_colorize.rst +++ b/addons/material_maker/doc/node_filter_colorize.rst @@ -6,6 +6,7 @@ will be colored with the leftmost color of the gradient and white pixels will ta the rightmost color. .. image:: images/node_colorize.png + :align: center Inputs ++++++ diff --git a/addons/material_maker/doc/node_filter_combine.rst b/addons/material_maker/doc/node_filter_combine.rst index 2a50330..6f2705d 100644 --- a/addons/material_maker/doc/node_filter_combine.rst +++ b/addons/material_maker/doc/node_filter_combine.rst @@ -4,6 +4,7 @@ Combine node The **Combine** node combines four greyscale inputs into an RGBA output texture. .. image:: images/node_combine.png + :align: center Inputs ++++++ diff --git a/addons/material_maker/doc/node_filter_decompose.rst b/addons/material_maker/doc/node_filter_decompose.rst index bc83209..1c3b4f4 100644 --- a/addons/material_maker/doc/node_filter_decompose.rst +++ b/addons/material_maker/doc/node_filter_decompose.rst @@ -4,6 +4,7 @@ Decompose node The **Decompose** node decomposes anRGBA input into four greyscale outputs. .. image:: images/node_decompose.png + :align: center Inputs ++++++ diff --git a/addons/material_maker/doc/node_filter_directional_blur.rst b/addons/material_maker/doc/node_filter_directional_blur.rst index 88443a1..ae186b3 100644 --- a/addons/material_maker/doc/node_filter_directional_blur.rst +++ b/addons/material_maker/doc/node_filter_directional_blur.rst @@ -4,6 +4,7 @@ Directional Blur node The **Directional Blur** node applies a Gaussian blur algorithm to its input in a given direction. .. image:: images/node_directional_blur.png + :align: center Inputs ++++++ diff --git a/addons/material_maker/doc/node_filter_emboss.rst b/addons/material_maker/doc/node_filter_emboss.rst index 713a8d6..0b055b4 100644 --- a/addons/material_maker/doc/node_filter_emboss.rst +++ b/addons/material_maker/doc/node_filter_emboss.rst @@ -4,6 +4,7 @@ Emboss node The **Emboss** node generates an image that simulates lighting on its input. .. image:: images/node_emboss.png + :align: center Inputs ++++++ diff --git a/addons/material_maker/doc/node_filter_normal_map.rst b/addons/material_maker/doc/node_filter_normal_map.rst index 4066ee8..5eddcb5 100644 --- a/addons/material_maker/doc/node_filter_normal_map.rst +++ b/addons/material_maker/doc/node_filter_normal_map.rst @@ -4,6 +4,7 @@ Normal map node The **Normal map** node generates a normal map from its input. .. image:: images/node_normal_map.png + :align: center Inputs ++++++ diff --git a/addons/material_maker/doc/node_filter_occlusion.rst b/addons/material_maker/doc/node_filter_occlusion.rst index e3dada6..7f489e2 100644 --- a/addons/material_maker/doc/node_filter_occlusion.rst +++ b/addons/material_maker/doc/node_filter_occlusion.rst @@ -4,6 +4,7 @@ Occlusion node The **Occlusion** node generates an ambient occlusion texture from its input. .. image:: images/node_occlusion.png + :align: center Inputs ++++++ diff --git a/addons/material_maker/doc/node_miscellaneous.rst b/addons/material_maker/doc/node_miscellaneous.rst deleted file mode 100644 index 9257e90..0000000 --- a/addons/material_maker/doc/node_miscellaneous.rst +++ /dev/null @@ -1,10 +0,0 @@ -Miscellaneous nodes -------------------- - -.. toctree:: - - node_material - node_export - node_switch - node_comment - node_remote diff --git a/addons/material_maker/doc/node_miscellaneous_buffer.rst b/addons/material_maker/doc/node_miscellaneous_buffer.rst new file mode 100644 index 0000000..81834b0 --- /dev/null +++ b/addons/material_maker/doc/node_miscellaneous_buffer.rst @@ -0,0 +1,36 @@ +Buffer node +~~~~~~~~~~~ + +The **Buffer** node samples its input into a texture of a given resolution and +outputs the result. + +Buffers can be used either as inputs of convolution nodes (to limit the combined +shader's complexity), or to create a cheap blur/pixelization effect (by using the +LOD output). Note that convolution transforms that are provided in the nodes library +already include buffers where necessary. + +.. image:: images/node_buffer.png + :align: center + +Inputs +++++++ + +The **Buffer** node has an input that will be saved when exporting the project. + +Outputs ++++++++ + +The **Buffer** node has 2 outputs: + +* the first output provides the image + +* the second output generates a given mipmap of the image + +Parameters +++++++++++ + +The **Buffer** node has two parameters: + +* the *texture resolution* + +* the *mipmap level* of its second output diff --git a/addons/material_maker/doc/node_comment.rst b/addons/material_maker/doc/node_miscellaneous_comment.rst similarity index 92% rename from addons/material_maker/doc/node_comment.rst rename to addons/material_maker/doc/node_miscellaneous_comment.rst index 4f305f3..7197c90 100644 --- a/addons/material_maker/doc/node_comment.rst +++ b/addons/material_maker/doc/node_miscellaneous_comment.rst @@ -5,3 +5,4 @@ The Comment node has no effect on the material and can be used to document it. Simply double-click on the contents to edit it. .. image:: images/node_comment.png + :align: center diff --git a/addons/material_maker/doc/node_miscellaneous_custom_shader.rst b/addons/material_maker/doc/node_miscellaneous_custom_shader.rst new file mode 100644 index 0000000..6bbdc97 --- /dev/null +++ b/addons/material_maker/doc/node_miscellaneous_custom_shader.rst @@ -0,0 +1,8 @@ +Custom shader node +~~~~~~~~~~~~~~~~~~ + +The **Custom shader** node is an empty node that you can use to start a new shader node. +Just drag it into a graph view, make it editable with **Control-W** and click on the +pencil button. + +Depending on the node you intend to create, it may be easier to start from an existing node. diff --git a/addons/material_maker/doc/node_miscellaneous_debug.rst b/addons/material_maker/doc/node_miscellaneous_debug.rst new file mode 100644 index 0000000..5520a76 --- /dev/null +++ b/addons/material_maker/doc/node_miscellaneous_debug.rst @@ -0,0 +1,23 @@ +Debug node +~~~~~~~~~~~ + +The **Debug** node can be used to show the shader used to generate its input. + +.. image:: images/node_debug.png + :align: center + +The **Show shader** button will open a pane that shows the whole shader. That code +can be copied and directly used in Shadertoy. + +.. image:: images/node_debug_pane.png + :align: center + +Inputs +++++++ + +The **Debug** node has an input whose shader can be shown. + +Outputs ++++++++ + +The **Debug** node does not have any output. diff --git a/addons/material_maker/doc/node_miscellaneous_export.rst b/addons/material_maker/doc/node_miscellaneous_export.rst new file mode 100644 index 0000000..b4262ea --- /dev/null +++ b/addons/material_maker/doc/node_miscellaneous_export.rst @@ -0,0 +1,24 @@ +Export node +~~~~~~~~~~~ + +The **Export** node defines a a texture that will be saved together with the +material textures when exporting the project. + +.. image:: images/node_export.png + :align: center + +Inputs +++++++ + +The **Export** node has an input that will be saved when exporting the project. + +Outputs ++++++++ + +The **Export** node does not have any output. + +Parameters +++++++++++ + +The **Export** node has a single parameter that defines the suffix of the PNG file +that will be created. diff --git a/addons/material_maker/doc/node_material.rst b/addons/material_maker/doc/node_miscellaneous_material.rst similarity index 75% rename from addons/material_maker/doc/node_material.rst rename to addons/material_maker/doc/node_miscellaneous_material.rst index b892db7..043ca0f 100644 --- a/addons/material_maker/doc/node_material.rst +++ b/addons/material_maker/doc/node_miscellaneous_material.rst @@ -1,7 +1,7 @@ Material node ~~~~~~~~~~~~~ -The Material node defines a material using its inputs. +The **Material** node defines a material using its inputs. There is one and only one Material node for each Material Maker project, it is created for each new project and cannot be deleted or duplicated. @@ -13,27 +13,27 @@ files whose names are generated using the project name and the name of the corresponding property in the material. The ambient occlusion, roughness and metallic textures are combined into a single file whose suffix is "orm". -When using Material Maker as a Godot addon, the metallic, roughness and -ambient occlusion are automatically combined into a single texture, and -a SpatialMaterial is generated automatically. +When using Material Maker as a Godot addon, a SpatialMaterial is generated +automatically. .. image:: images/node_material.png + :align: center Inputs ++++++ -The Material node has an input for each supported property (albedo, metallic, -roughness, emissive, normal, ambient occlusion and depth maps) of the material. +The **Material** node has an input for each supported property (albedo, metallic, +roughness, emissive, normal, ambient occlusion, depth maps and subsurface scattering) of the material. Outputs +++++++ -The Material node does not have any output. +The **Material** node does not have any output. Parameters ++++++++++ -The Material node provides the following parameters: +The **Material** node provides the following parameters: * The size of the texture files to be generated. @@ -50,3 +50,5 @@ The Material node provides the following parameters: * The value of the ambient occlusion property of the material. The texture used for the ambient occlusion input is multiplied by this value. * The value of the depth property of the material. The input depth map is multiplied by this value. + +* The strength of the subsurface scattering effect. diff --git a/addons/material_maker/doc/node_remote.rst b/addons/material_maker/doc/node_miscellaneous_remote.rst similarity index 88% rename from addons/material_maker/doc/node_remote.rst rename to addons/material_maker/doc/node_miscellaneous_remote.rst index ba54b1c..9c21b2d 100644 --- a/addons/material_maker/doc/node_remote.rst +++ b/addons/material_maker/doc/node_miscellaneous_remote.rst @@ -1,10 +1,11 @@ Remote node ~~~~~~~~~~~ -The Remote node has no direct effect on the material and can be used to control -key parameters of the material to configure it easily. +The **Remote** node has no direct effect on the material but can be used to +control key parameters of the material to configure it easily. .. image:: images/node_remote.png + :align: center When started, the Remote node only shows 2 buttons. @@ -44,7 +45,7 @@ When hovering on the Linked control, Material Maker will show the parameters it controls. To create a configuration, set all associated parameters to the desired values, -and select the "" entry in the drop-down list. Then enter a +and select the **** entry in the drop-down list. Then enter a name for this configuration, and it will be added to the list. The drop-down list can be used to select a configuration, create new ones and diff --git a/addons/material_maker/doc/node_miscellaneous_switch.rst b/addons/material_maker/doc/node_miscellaneous_switch.rst new file mode 100644 index 0000000..13965a1 --- /dev/null +++ b/addons/material_maker/doc/node_miscellaneous_switch.rst @@ -0,0 +1,34 @@ +Switch node +~~~~~~~~~~~ + +The **Switch** node can be used to select sources for 2 to 5 output textures +from a choice of 2 to five inputs sets. It is useful to create variations +of a material and easily switch between them. + +.. image:: images/node_switch.png + :align: center + +Inputs +++++++ + +The **Switch** node has from 2 to 25 color inputs A1, B1, .. D5, E5. + +Outputs ++++++++ + +The **Switch** node has 2 to 5 outputs named A, B, C, D and E. + +Parameters +++++++++++ + +The **Switch** node has a 3 parameters: + +* the *number of outputs* + +* the *number of choices* + +* the *current choice*. For example, if the current chopice is 2, A will output + the source image for A2, B will transmit B2... + +When the node is not editable (use **Control-W** to switch from non editable to editable), +only the current choice can be modified. diff --git a/addons/material_maker/doc/node_switch.rst b/addons/material_maker/doc/node_switch.rst deleted file mode 100644 index a2da1c8..0000000 --- a/addons/material_maker/doc/node_switch.rst +++ /dev/null @@ -1,25 +0,0 @@ -Switch node -~~~~~~~~~~~ - -The Switch node can be used to select sources for 2 output textures -A and B from a choice of 2 pairs (A1, B1) and (A2, B2). It is useful -to create variations of a material and easily switch between them. - -.. image:: images/node_switch.png - -Inputs -++++++ - -The Switch node has 4 color inputs A1, B1, A2 and B2. - -Outputs -+++++++ - -The Switch node has 2 outputs A and B. - -Parameters -++++++++++ - -The Switch node has a single parameter whose value can be 1 or 2. -When the parameter is set to 1, A forwards A1 and B forwards B1. -When the parameter is set to 2, A forwards A2 and B forwards B2. diff --git a/addons/material_maker/doc/node_transform_kaleidoscope.rst b/addons/material_maker/doc/node_transform_kaleidoscope.rst new file mode 100644 index 0000000..df229b9 --- /dev/null +++ b/addons/material_maker/doc/node_transform_kaleidoscope.rst @@ -0,0 +1,32 @@ +Kaleidoscope node +~~~~~~~~~~~~~~~~~ + +The **Kaleidoscope** node applies a kaleidoscope effect, i.e. copies an angle (by default the +upper one) all around the image to its input. + +.. image:: images/node_kaleidoscope.png + +Inputs +++++++ + +The **Kaleidoscope** node accepts a single RGBA input. + +Outputs ++++++++ + +The **Kaleidoscope** node outputs the result as RGBA. + +Parameters +++++++++++ + +The **Kaleidoscope** node has two parameters: + +* *strength* to scale the warp effect. + +* *epsilon* is used to evaluate the second input's derivative + +Example images +++++++++++++++ + +.. image:: images/node_kaleidoscope_samples.png + :align: center diff --git a/addons/material_maker/doc/node_transform_mirror.rst b/addons/material_maker/doc/node_transform_mirror.rst new file mode 100644 index 0000000..f9387b0 --- /dev/null +++ b/addons/material_maker/doc/node_transform_mirror.rst @@ -0,0 +1,31 @@ +Mirror node +~~~~~~~~~~~ + +The **Mirror** node applies a mirror filter on its input. + +.. image:: images/node_mirror.png + +Inputs +++++++ + +The **Mirror** node accepts a single RGBA input. + +Outputs ++++++++ + +The **Mirror** node outputs the mirrored image as RGBA. + +Parameters +++++++++++ + +The **Mirror** node has two parameters: + +* the *direction* of the effect (horizontal or vertical). + +* the *offset* by which the input is moved away from the mirror. + +Example images +++++++++++++++ + +.. image:: images/node_mirror_samples.png + :align: center diff --git a/addons/material_maker/doc/nodes_filter.rst b/addons/material_maker/doc/nodes_filter.rst index bbe5273..7849154 100644 --- a/addons/material_maker/doc/nodes_filter.rst +++ b/addons/material_maker/doc/nodes_filter.rst @@ -8,6 +8,8 @@ The filter nodes accept one or several inputs and generate one or several images node_filter_adjust_hsv node_filter_colorize + node_filter_combine + node_filter_decompose node_filter_blend node_filter_blur node_filter_directional_blur diff --git a/addons/material_maker/doc/nodes_miscellaneous.rst b/addons/material_maker/doc/nodes_miscellaneous.rst index a2a408d..69c8fc3 100644 --- a/addons/material_maker/doc/nodes_miscellaneous.rst +++ b/addons/material_maker/doc/nodes_miscellaneous.rst @@ -4,7 +4,11 @@ Miscellaneous nodes .. toctree:: :maxdepth: 1 + node_miscellaneous_material node_miscellaneous_buffer - node_miscellaneous_debug - node_miscellaneous_remote + node_miscellaneous_custom_shader node_miscellaneous_switch + node_miscellaneous_remote + node_miscellaneous_comment + node_miscellaneous_export + node_miscellaneous_debug diff --git a/addons/material_maker/doc/subgraph_nodes.rst b/addons/material_maker/doc/subgraph_nodes.rst index b26293a..88cd3b3 100644 --- a/addons/material_maker/doc/subgraph_nodes.rst +++ b/addons/material_maker/doc/subgraph_nodes.rst @@ -9,6 +9,9 @@ To create a subgraph, first select the nodes that must be grouped and use the This will replace all selected nodes with a single subgraph node, without modifying the overall material description. +When the subgraph is created, it is shown in the graph editor, and can be +renamed using the top right text field. + The subgraph node is not editable by default, but using the **Control+W** shortcut will make it possible to edit its contents using the pencil button. diff --git a/addons/material_maker/doc/user_interface.rst b/addons/material_maker/doc/user_interface.rst index c3af82d..efc4150 100644 --- a/addons/material_maker/doc/user_interface.rst +++ b/addons/material_maker/doc/user_interface.rst @@ -129,7 +129,7 @@ The filter field above the library tree can be used to quickly find a specific n The tree will be updated whenever the filter string is modified. It is possible to give focus to the search field using the **Control+F** keyboard shortcut. -.. image:: images/library_filter.png +.. image:: images/library_filter.gif :align: center Preview pane