Skip to content

Creating and Editing Component Nodes

Andrii Doroshenko edited this page Jan 8, 2019 · 3 revisions

Visual noise is always edited via currently active noise component. The noise component is both a noise node and a graph containing other nodes. To be edited, it has to be added directly or indirectly to VisualAccidentalNoise that must have a main component.

Lets say we have a main component containing the following nodes:

simplex_rose

Once you have this setup, save the component as simplex_rose.tscn:

save_main_component

Now in order to include saved component as node, we need to create a new main component, replacing the edited one that was safely saved to disk:

create_main_component

An empty component with Output node will appear. Now we have to add our newly created simplex_rose.tscn component node into this one. Press Add Component button and browse to load it:

load_component

Once the component is loaded, a special component node will appear. Connect it to output node, and optionally enable preview for that node to see the changes made to it. You can also rename the node itself:

simplex_rose_component_added

Clicking on Open in Editor button will allow you to edit the loaded component as before, with ability to go back to a parent or main component:

component_path

As you may already noticed, in order for the component to be more useful it can define input ports as arguments. For that you need to add special Input nodes to the component:

add_input_node

Add, connect, and rename them like this:

define_input_nodes

If you go back to the main component now, the previously edited component node should have named input ports. Other nodes can be connected to those ports, but default values can always be edited alone. Define port values as they were before:

component_result

Other workflows are possible, like creating a new component beforehand and editing it right there.

Clone this wiki locally