diff --git a/addons/material_maker/doc/.vscode/tasks.json b/addons/material_maker/doc/.vscode/tasks.json new file mode 100644 index 00000000..1cfaad9e --- /dev/null +++ b/addons/material_maker/doc/.vscode/tasks.json @@ -0,0 +1,16 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "build doc", + "type": "process", + "command": "make.bat", + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} \ No newline at end of file diff --git a/addons/material_maker/doc/images/connect_nodes.gif b/addons/material_maker/doc/images/connect_nodes.gif index 9f89c773..2e827c07 100644 Binary files a/addons/material_maker/doc/images/connect_nodes.gif and b/addons/material_maker/doc/images/connect_nodes.gif differ diff --git a/addons/material_maker/doc/images/create_node.gif b/addons/material_maker/doc/images/create_node.gif index 3bebb325..3578d65c 100644 Binary files a/addons/material_maker/doc/images/create_node.gif and b/addons/material_maker/doc/images/create_node.gif differ diff --git a/addons/material_maker/doc/images/graph_navigation_button.png b/addons/material_maker/doc/images/graph_navigation_button.png new file mode 100644 index 00000000..fac40032 Binary files /dev/null and b/addons/material_maker/doc/images/graph_navigation_button.png differ diff --git a/addons/material_maker/doc/images/graph_pane.png b/addons/material_maker/doc/images/graph_pane.png new file mode 100644 index 00000000..771c4cc5 Binary files /dev/null and b/addons/material_maker/doc/images/graph_pane.png differ diff --git a/addons/material_maker/doc/images/graph_up_button.png b/addons/material_maker/doc/images/graph_up_button.png new file mode 100644 index 00000000..a8bda61e Binary files /dev/null and b/addons/material_maker/doc/images/graph_up_button.png differ diff --git a/addons/material_maker/doc/images/grid_button.png b/addons/material_maker/doc/images/grid_button.png new file mode 100644 index 00000000..f8b96d31 Binary files /dev/null and b/addons/material_maker/doc/images/grid_button.png differ diff --git a/addons/material_maker/doc/images/group_randomness_button.png b/addons/material_maker/doc/images/group_randomness_button.png new file mode 100644 index 00000000..87a85773 Binary files /dev/null and b/addons/material_maker/doc/images/group_randomness_button.png differ diff --git a/addons/material_maker/doc/images/library_filter.gif b/addons/material_maker/doc/images/library_filter.gif new file mode 100644 index 00000000..9c2400e1 Binary files /dev/null and b/addons/material_maker/doc/images/library_filter.gif differ diff --git a/addons/material_maker/doc/images/preview.png b/addons/material_maker/doc/images/preview.png new file mode 100644 index 00000000..70ed294c Binary files /dev/null and b/addons/material_maker/doc/images/preview.png differ diff --git a/addons/material_maker/doc/images/screenshot.png b/addons/material_maker/doc/images/screenshot.png index 8703e2f1..653b92bb 100644 Binary files a/addons/material_maker/doc/images/screenshot.png and b/addons/material_maker/doc/images/screenshot.png differ diff --git a/addons/material_maker/doc/images/zoom_in_button.png b/addons/material_maker/doc/images/zoom_in_button.png new file mode 100644 index 00000000..275b77af Binary files /dev/null and b/addons/material_maker/doc/images/zoom_in_button.png differ diff --git a/addons/material_maker/doc/images/zoom_out_button.png b/addons/material_maker/doc/images/zoom_out_button.png new file mode 100644 index 00000000..45e82057 Binary files /dev/null and b/addons/material_maker/doc/images/zoom_out_button.png differ diff --git a/addons/material_maker/doc/images/zoom_reset_button.png b/addons/material_maker/doc/images/zoom_reset_button.png new file mode 100644 index 00000000..53d43c25 Binary files /dev/null and b/addons/material_maker/doc/images/zoom_reset_button.png differ diff --git a/addons/material_maker/doc/make.bat b/addons/material_maker/doc/make.bat index a2e95d1d..54063e7f 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 help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +%SPHINXBUILD% -M html %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% :end popd diff --git a/addons/material_maker/doc/node_adjust_hsv.rst b/addons/material_maker/doc/node_filter_adjust_hsv.rst similarity index 100% rename from addons/material_maker/doc/node_adjust_hsv.rst rename to addons/material_maker/doc/node_filter_adjust_hsv.rst diff --git a/addons/material_maker/doc/node_blend.rst b/addons/material_maker/doc/node_filter_blend.rst similarity index 100% rename from addons/material_maker/doc/node_blend.rst rename to addons/material_maker/doc/node_filter_blend.rst diff --git a/addons/material_maker/doc/node_blur.rst b/addons/material_maker/doc/node_filter_blur.rst similarity index 100% rename from addons/material_maker/doc/node_blur.rst rename to addons/material_maker/doc/node_filter_blur.rst diff --git a/addons/material_maker/doc/node_colorize.rst b/addons/material_maker/doc/node_filter_colorize.rst similarity index 100% rename from addons/material_maker/doc/node_colorize.rst rename to addons/material_maker/doc/node_filter_colorize.rst diff --git a/addons/material_maker/doc/node_combine.rst b/addons/material_maker/doc/node_filter_combine.rst similarity index 100% rename from addons/material_maker/doc/node_combine.rst rename to addons/material_maker/doc/node_filter_combine.rst diff --git a/addons/material_maker/doc/node_decompose.rst b/addons/material_maker/doc/node_filter_decompose.rst similarity index 100% rename from addons/material_maker/doc/node_decompose.rst rename to addons/material_maker/doc/node_filter_decompose.rst diff --git a/addons/material_maker/doc/node_emboss.rst b/addons/material_maker/doc/node_filter_emboss.rst similarity index 100% rename from addons/material_maker/doc/node_emboss.rst rename to addons/material_maker/doc/node_filter_emboss.rst diff --git a/addons/material_maker/doc/node_normal_map.rst b/addons/material_maker/doc/node_filter_normal_map.rst similarity index 100% rename from addons/material_maker/doc/node_normal_map.rst rename to addons/material_maker/doc/node_filter_normal_map.rst diff --git a/addons/material_maker/doc/node_material.rst b/addons/material_maker/doc/node_material.rst index a6c044f7..a27e0a41 100644 --- a/addons/material_maker/doc/node_material.rst +++ b/addons/material_maker/doc/node_material.rst @@ -9,8 +9,9 @@ When copied and pasted together with other nodes, the Material node will not be pasted, but connections will be copied if possible. When exporting a project to PNG files, all inputs are generated as PNG -files whose name is generated using the project name and the name of the -corresponding property in the material. +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 @@ -32,7 +33,7 @@ The Material node does not have any output. Parameters ++++++++++ -The Material node has parameters: +The Material node provides the following parameters: * The size of the texture files to be generated. diff --git a/addons/material_maker/doc/nodes_misc.rst b/addons/material_maker/doc/node_miscellaneous.rst similarity index 100% rename from addons/material_maker/doc/nodes_misc.rst rename to addons/material_maker/doc/node_miscellaneous.rst diff --git a/addons/material_maker/doc/node_perlin.rst b/addons/material_maker/doc/node_noise_perlin.rst similarity index 100% rename from addons/material_maker/doc/node_perlin.rst rename to addons/material_maker/doc/node_noise_perlin.rst diff --git a/addons/material_maker/doc/node_voronoi.rst b/addons/material_maker/doc/node_noise_voronoi.rst similarity index 100% rename from addons/material_maker/doc/node_voronoi.rst rename to addons/material_maker/doc/node_noise_voronoi.rst diff --git a/addons/material_maker/doc/node_bricks.rst b/addons/material_maker/doc/node_pattern_bricks.rst similarity index 100% rename from addons/material_maker/doc/node_bricks.rst rename to addons/material_maker/doc/node_pattern_bricks.rst diff --git a/addons/material_maker/doc/node_pattern.rst b/addons/material_maker/doc/node_pattern_generic.rst similarity index 100% rename from addons/material_maker/doc/node_pattern.rst rename to addons/material_maker/doc/node_pattern_generic.rst diff --git a/addons/material_maker/doc/node_image.rst b/addons/material_maker/doc/node_simple_image.rst similarity index 86% rename from addons/material_maker/doc/node_image.rst rename to addons/material_maker/doc/node_simple_image.rst index 4b39a803..96400f39 100644 --- a/addons/material_maker/doc/node_image.rst +++ b/addons/material_maker/doc/node_simple_image.rst @@ -20,3 +20,5 @@ Parameters The image node has a single parameter that defines the image file the node provides. It can be modified by clicking the thumbnail and selecting a new image file. + +The supported formats are BMP, HDR, JPEG, PNG, SVG, TGA and WebP. diff --git a/addons/material_maker/doc/node_uniform.rst b/addons/material_maker/doc/node_simple_uniform.rst similarity index 100% rename from addons/material_maker/doc/node_uniform.rst rename to addons/material_maker/doc/node_simple_uniform.rst diff --git a/addons/material_maker/doc/node_warp.rst b/addons/material_maker/doc/node_transform_warp.rst similarity index 100% rename from addons/material_maker/doc/node_warp.rst rename to addons/material_maker/doc/node_transform_warp.rst diff --git a/addons/material_maker/doc/nodes.rst b/addons/material_maker/doc/nodes.rst index c0aba27f..fef35338 100644 --- a/addons/material_maker/doc/nodes.rst +++ b/addons/material_maker/doc/nodes.rst @@ -5,6 +5,9 @@ This section describes all nodes that can be used in a procedural material. .. toctree:: - nodes_generators - nodes_filters - nodes_misc + nodes_simple + nodes_pattern + nodes_noise + nodes_filter + nodes_transform + nodes_miscellaneous diff --git a/addons/material_maker/doc/nodes_filter.rst b/addons/material_maker/doc/nodes_filter.rst new file mode 100644 index 00000000..959f1b96 --- /dev/null +++ b/addons/material_maker/doc/nodes_filter.rst @@ -0,0 +1,13 @@ +Filter nodes +------------ + +The filter nodes accept one or several inputs and generate one or several images. + +.. toctree:: + + node_filter_blend + node_filter_blur + node_filter_blur_directional + node_filter_colorize + node_filter_emboss + node_filter_normal_map diff --git a/addons/material_maker/doc/nodes_generators.rst b/addons/material_maker/doc/nodes_generators.rst deleted file mode 100644 index 22e51a82..00000000 --- a/addons/material_maker/doc/nodes_generators.rst +++ /dev/null @@ -1,14 +0,0 @@ -Generator nodes ---------------- - -The generator nodes are nodes that do not accept any input and generate one or several images. - -.. toctree:: - - node_uniform - node_image - node_pattern - node_bricks - node_noise - node_perlin - node_voronoi \ No newline at end of file diff --git a/addons/material_maker/doc/nodes_noise.rst b/addons/material_maker/doc/nodes_noise.rst new file mode 100644 index 00000000..fd26b510 --- /dev/null +++ b/addons/material_maker/doc/nodes_noise.rst @@ -0,0 +1,11 @@ +Noise nodes +----------- + +The noise nodes are nodes that do not accept any input and generate one or several images +made from random patterns. + +.. toctree:: + + node_noise + node_noise_perlin + node_noise_voronoi diff --git a/addons/material_maker/doc/nodes_pattern.rst b/addons/material_maker/doc/nodes_pattern.rst new file mode 100644 index 00000000..5c83b3c8 --- /dev/null +++ b/addons/material_maker/doc/nodes_pattern.rst @@ -0,0 +1,14 @@ +Pattern nodes +--------------- + +The generator nodes are nodes that do not accept any input and generate one or several images. + +.. toctree:: + + node_pattern_bricks + node_pattern_fibers + node_pattern_generic + node_pattern_runes + node_pattern_scratches + node_pattern_truchet + node_pattern_weave diff --git a/addons/material_maker/doc/nodes_simple.rst b/addons/material_maker/doc/nodes_simple.rst new file mode 100644 index 00000000..767335ac --- /dev/null +++ b/addons/material_maker/doc/nodes_simple.rst @@ -0,0 +1,26 @@ +Simple nodes +------------ + +The simple nodes are nodes that do not accept any input and generate one or several simple shapes. + +.. toctree:: + + 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 diff --git a/addons/material_maker/doc/nodes_filters.rst b/addons/material_maker/doc/nodes_transform.rst similarity index 55% rename from addons/material_maker/doc/nodes_filters.rst rename to addons/material_maker/doc/nodes_transform.rst index 01996431..29672765 100644 --- a/addons/material_maker/doc/nodes_filters.rst +++ b/addons/material_maker/doc/nodes_transform.rst @@ -5,13 +5,7 @@ The generator nodes are nodes that do not accept any input and generate one or s .. toctree:: - node_adjust_hsv - node_colorize - node_blend - node_blur - node_combine - node_decompose - node_emboss - node_normal_map node_transform - node_warp \ No newline at end of file + node_transform_kaleidoscope + node_transform_mirror + node_transform_warp diff --git a/addons/material_maker/doc/user_interface.rst b/addons/material_maker/doc/user_interface.rst index 604dcb94..ec7a3f6d 100644 --- a/addons/material_maker/doc/user_interface.rst +++ b/addons/material_maker/doc/user_interface.rst @@ -28,6 +28,7 @@ top left pane) and drag it into the graph editor. Depending on the selected libr item, a preview or a simple description will be displayed while dragging. .. image:: images/create_node.gif + :align: center Selecting this new node (by clicking on it) shows it in the preview pane. The very small 2d preview of the preview pane can be maximized by double clicking on it. This will hide @@ -39,7 +40,10 @@ the Materials node. This will automatically assign the simple Bricks texture to albedo element of the material, and the 3d preview will immediately be updated (if you maximized the 2d preview it can be minimized by double-clicking on it again). +Nodes can also be disconnected by dragging a connected input away from its node. + .. image:: images/connect_nodes.gif + :align: center Nodes can easily be configured by modifying their parameters, and previews are updated automatically. @@ -47,6 +51,115 @@ automatically. Since each input can be connected to a single output, reconnecting an input will automatically remove the previous connection. +Graph pane +---------- + +The graph pane is where materials can be edited, by adding and configuring nodes, +and connecting them. + +.. image:: images/graph_pane.png + :align: center + +Grid and zoom +^^^^^^^^^^^^^ + +.. |zoom_out_button| image:: images/zoom_out_button.png +.. |zoom_reset_button| image:: images/zoom_reset_button.png +.. |zoom_in_button| image:: images/zoom_in_button.png +.. |grid_button| image:: images/grid_button.png + +In the top left corner of the graph pane, the following buttons can be used to modify +the zoom level and configure the grid: + + * the |zoom_out_button| button zooms out. + * the |zoom_reset_button| button resets the zoom factor. + * the |zoom_in_button| button zooms in. + * the |grid_button| button toggles the grid. When moved, nodes will + stick to the grid when it is active. The grid size can be modified + using the spinbox next to the grid button + +The view can be centered using the **View -> Center view** menu item or the **C** shortcut, +and the zoom factor can be reset using the **View -> Reset zoom** menu item or the **Alt-0** +shortcut. + +Material navigation +^^^^^^^^^^^^^^^^^^^ + +.. |graph_navigation_button| image:: images/graph_navigation_button.png +.. |group_randomness_button| image:: images/group_randomness_button.png +.. |graph_up_button| image:: images/graph_up_button.png + +In the top right corner of the graph pane, the graph navigation button +|graph_navigation_button| can be used to show a tree view of the material. +Double clicking on an item in this tree will show it in the graph view. + +When a subgraph is shown in the graph pane, additional items are visible in +the top right corner: + +* a text entry shows the name of the subgraph and can be used to modify it. +* a |group_randomness_button| button to decide if the current subgraph transmits + its random seed to its children. +* a |graph_up_button| button to move to the parent of the currently shown subgraph. + +Selecting and copying nodes +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Clicking on the title bar of a node will select it. Selecting a node will show its +first output (if any) in the 2D preview. It is possible to select several nodes +by holding the **Control** key while selecting. + +Selected nodes can be copied using the **Edit -> Copy** menu or the **Control+C** +keyboard shortcut. They can also be cut using the **Edit -> Cut** menu entry or the +**Control+X** shortcut. Both operations store the selected nodes and their +interconnections in the clipboard. Note that the format used is JSON, and nodes +or group of nodes can easily be shared using this format. + +The contents of the clipboard can be pasted into a graph using the **Edit -> Paste** +menu or the **Control+V** keyboard shortcut. + +Library pane +------------ + +The library pane shows all nodes defined in both base and user libraries in a tree +view. The base library is provided with Material Maker and the nodes it contains are +documented in this manual. The user library contains all nodes that were added using +the **Tools -> Add selected node to user library** menu item. + +The filter field above the library tree can be used to quickly find a specific node. +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 + :align: center + +Preview pane +------------ + +The preview pane shows a 3D preview of the material, and a 2D preview of the first output +of the selected node. + +.. image:: images/preview.png + :align: center + +The left select button can be used to select a model for the 3D preview, and the second +one provides different environments. The **R** button can be used to start and stop the +object's rotation animation. Pressing the **O** button will show the 3D preview as +background of the graph pane. + +In the 3d view, the object can be rotated about the yaw and the pitch axes (from the +camera's point of view) by holding the right mouse button and moving the mouse horizontally +or vertically. The object can also be rotated about the roll axis by holding Shift and +and the right mouse button and moving the mouse horizontally. + +Holding the left mouse button will rotate the camera while the object remains static. + +Rotating the object or the camera will automatically disable the object's rotate animation. + +The mouse wheel can be used to move the camera along its longitudinal axis (hense zooming +forward or backward). + +Clicking on the 2D preview will minimize or maximize it. + Main menu --------- @@ -76,7 +189,10 @@ File menu saved ae ignored. * *Export material* generates PNG image files for all elements of the material. File names are - defined using the path of the material and their role (albedo, metallic...) in the material. + defined using the path of the material and their role (albedo, emission...) in the material. + The Ambient occlusion, roughness and metallic textures are merged into a single file whose + suffix is **orm**. + If the material contains export nodes, their textures will be exported as well. * *Close material* closes the current material. @@ -111,5 +227,3 @@ Help menu do not hesitate to use it to suggest improvements for Material Maker. * *About* Shows the about dialog. - -