diff --git a/addons/material_maker/doc/images/node_comment.png b/addons/material_maker/doc/images/node_comment.png new file mode 100644 index 0000000..49b575a Binary files /dev/null and b/addons/material_maker/doc/images/node_comment.png differ diff --git a/addons/material_maker/doc/images/node_export.png b/addons/material_maker/doc/images/node_export.png new file mode 100644 index 0000000..ff9cdfb Binary files /dev/null and b/addons/material_maker/doc/images/node_export.png differ diff --git a/addons/material_maker/doc/images/node_material.png b/addons/material_maker/doc/images/node_material.png new file mode 100644 index 0000000..941fcc4 Binary files /dev/null and b/addons/material_maker/doc/images/node_material.png differ diff --git a/addons/material_maker/doc/images/node_remote.png b/addons/material_maker/doc/images/node_remote.png new file mode 100644 index 0000000..6d48982 Binary files /dev/null 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 new file mode 100644 index 0000000..c35b389 Binary files /dev/null and b/addons/material_maker/doc/images/node_switch.png differ diff --git a/addons/material_maker/doc/node_comment.rst b/addons/material_maker/doc/node_comment.rst new file mode 100644 index 0000000..6a37b6b --- /dev/null +++ b/addons/material_maker/doc/node_comment.rst @@ -0,0 +1,8 @@ +Comment node +~~~~~~~~~~~~ + +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 + diff --git a/addons/material_maker/doc/node_export.rst b/addons/material_maker/doc/node_export.rst new file mode 100644 index 0000000..414a26f --- /dev/null +++ b/addons/material_maker/doc/node_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 + +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_material.rst b/addons/material_maker/doc/node_material.rst new file mode 100644 index 0000000..a6c044f --- /dev/null +++ b/addons/material_maker/doc/node_material.rst @@ -0,0 +1,52 @@ +Material node +~~~~~~~~~~~~~ + +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. +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. + +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. + +.. image:: images/node_material.png + +Inputs +++++++ + +The Material node has an input for each supported property (albedo, metallic, +roughness, emissive, normal, ambient occlusion and depth maps) of the material. + +Outputs ++++++++ + +The Material node does not have any output. + +Parameters +++++++++++ + +The Material node has parameters: + +* The size of the texture files to be generated. + +* A color associated to the albedo property. The texture used for the albedo input is multiplied by this color. + +* The value of the metallic property of the material. The texture used for the metallic input is multiplied by this value. + +* The value of the roughness property of the material. The texture used for the roughness input is multiplied by this value. + +* The energy of the emissive property of the material. + +* The value of the normal map property of the material. It is used to strengthen or lighten the effect of the normal map. + +* 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. + diff --git a/addons/material_maker/doc/node_remote.rst b/addons/material_maker/doc/node_remote.rst new file mode 100644 index 0000000..4b57b81 --- /dev/null +++ b/addons/material_maker/doc/node_remote.rst @@ -0,0 +1,52 @@ +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. + +.. image:: images/node_remote.png + +When started, the Remote node only shows 2 buttons. + +The left button can be used to create a linked control, that can be used to +mirror one or several similar parameters. +The right button can be used to create a configuration control, that can be +associated to several parameters and store several named configurations for +those parameters. + +Linked control +++++++++++++++ + +When creating a Linked control (using the "Create linked control" button), +it is necessary to first pick a parameter in the material graph. The newly +created control will be a copy of the selected parameter control, and when +changing the value of the Linked control, the associated control will be +updated accordingly. + +A Linked control can also be associated to other parameters, provided they +are of the same kind. + +When hovering on the Linked control, Material Maker will show the parameters +it controls. + +Configuration control ++++++++++++++++++++++ + +When creating a Configuration control (using the "Create configuration control" +button), it is necessary to first pick a parameter in the material graph. +The newly created control will hold a list of configurations of the associated +parameters. + +A Linked control can be associated to other parameters, and it is recommended to +associate all relevant parameters before adding configurations. + +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 +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 +update or delete the current configuration. + diff --git a/addons/material_maker/doc/node_switch.rst b/addons/material_maker/doc/node_switch.rst new file mode 100644 index 0000000..93bcc63 --- /dev/null +++ b/addons/material_maker/doc/node_switch.rst @@ -0,0 +1,26 @@ +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/nodes.rst b/addons/material_maker/doc/nodes.rst index 9fb1b84..c0aba27 100644 --- a/addons/material_maker/doc/nodes.rst +++ b/addons/material_maker/doc/nodes.rst @@ -7,3 +7,4 @@ This section describes all nodes that can be used in a procedural material. nodes_generators nodes_filters + nodes_misc diff --git a/addons/material_maker/doc/nodes_misc.rst b/addons/material_maker/doc/nodes_misc.rst new file mode 100644 index 0000000..9257e90 --- /dev/null +++ b/addons/material_maker/doc/nodes_misc.rst @@ -0,0 +1,10 @@ +Miscellaneous nodes +------------------- + +.. toctree:: + + node_material + node_export + node_switch + node_comment + node_remote diff --git a/addons/material_maker/library/base.json b/addons/material_maker/library/base.json index 5c3eb0d..882c6ca 100644 --- a/addons/material_maker/library/base.json +++ b/addons/material_maker/library/base.json @@ -194,6 +194,10 @@ } ] }, + { + "tree_item":"Miscellaneous/Comment", + "type":"comment" + }, { "tree_item":"Miscellaneous/Export", "type":"export" @@ -205,9 +209,5 @@ { "tree_item":"Miscellaneous/Remote", "type":"remote" - }, - { - "tree_item":"Miscellaneous/Comment", - "type":"comment" } ]} \ No newline at end of file diff --git a/addons/material_maker/widgets/linked_widgets/editable_label.gd b/addons/material_maker/widgets/linked_widgets/editable_label.gd index 04afd8f..c9585af 100644 --- a/addons/material_maker/widgets/linked_widgets/editable_label.gd +++ b/addons/material_maker/widgets/linked_widgets/editable_label.gd @@ -1,3 +1,4 @@ +tool extends Label func _ready():