The information on this page might change rapidly. You can check the recent changes to see if any updates have occurred.
Copy stamping is used to make every copy look different. We do this by reprocessing all nodes before the node with copy stamping and reusing the output. In other words, we change the parameters of the "upstream" nodes for every copy and merge the results.
The NodeBox application contains an example, copy_stamping.ndbx, that demonstrates the use of copy stamping.
Copy stamping is implemented in the copy node and the place node, but there is nothing special about these nodes and you can write your own node that uses copy stamping.
For an in-depth look into how copy stamping is implemented in NodeBox, read the Copy Stamping Implementation.
Contents |
Grid with variables

[[file download: Media:copystamp1.ndbx
We made a simple grid in the previous secton.In order to create a grid with some more complexity, for instance different sizes on each instance of the shape node, we need three nodes:
- A shape node: in the example an ellipse node connected to the shape port of the place node.
- A template node: in the example a grid node of 40 rows and 20 columns (300px-300px) connected to the template port of the place node.
- A place node with the copy_stamping turned on.
The place node shows another variable called expression which can be used to create a variable to add diversity to the output. Let's say we call the variable "var1" and give it "random(CNUM,5,20)" as a value, which means that a random number between 5 and 20 will come out for each copynumber (CNUM).
In order to attach the variable to another node in the network we use the stamp method. In the Parameter pane of the ellipse node, set state of width and height to "Toggle to expression" and change the value with following expression
stamp("var1",20)
Each ellipse will have a width and height between 5 and 20 px as shown in the above picture. The number in the stamp expression is the number it will get when rendering this node on itself.
Same principle
The template comes from the textpath which has been resampled to create more points on each contour. The ellipse node uses var1 again for creating a different size over a stamping method. Note that the same variable can be used to create different kinds of blue. Set the fill parameter to "Toggle to expression" and give it this value:
color(0.0, 0.4, stamp("var1",1)/20.0, .5)
Stamping over CNUM
Another way to use copystamping is by addressing the copy number without using it to generate a random number from. The following example shows how it is done:

[[file download: Media:CNUMexample.ndbx
- A shape node: in the example a line node is connected to the shape port of the place node.
- A template node: in the example a textpath node, which has been sent to a resample node to generate a total amount of 2100 points, is connected to the template port of the place node.
- A place node with the "Copy_stamping" turned on.
To refer to the copy number we will create a variable called "var1" and give it as value "CNUM"
In order to use this, in this case to change the angle, distance and color of the line node, we will call a stamp method again. In the example the result is multiplied by 5 to achieve different rotations around the axes. It is also possible to call the same stamping method as part of the random function to create different colors.
Multi copy stamping

[[file download: Media:copystampingExtended.ndbx
Copy stamping can be used more then once within a network. Following example creates two variable called "varresamp" and "varshape".
- The first one (varresamp) is part of the place2 node and will generate the number of points to be used in the resample1 node.
- The second one (varshape) is part of the place1 node and decides the width and height of ellipse2 node.
The network itself consist of 6 nodes:
- A shape node (ellipse1) to create an ellipse.
- A resample node (resample1) to create points of the ellipse1 path. Note that a stamp method calling "varresamp" is called and attached to the points parameter. Method is set to "amount".
- A place node that will copy a new shape node (ellipse2) on each point returned by the resample1 node.
- A shape node (ellipse2) as referred to above here.
- A grid node (grid1) creating a 4 by 4 grid with 300 * 300 as dimensions.
- A place node (place2) that will draw a shape returned by place1 node of each point returned by grid1.
Stamp methods were also used for colouring. In detail the parameter pane of the ellipse2 node looks like this:
The details on the parameters pane of the place2 node look like this:
For more information on expressions go back to Working_With_Expressions
Creating a text effect
[[file download: Media:textFx.ndbx
NodeBox2 is once again ideal for creating text transformations and effects. This example will create an effect with the use of 7 nodes:
- A textpath (textpath1) node with the original text in "Arial Black".
- A transform (transform1) node to scale the text on the Y axe.
- A resample (resample1) node with method set to "By Amount" and with 15 points on each contour. The output is used as template for the place node.
- A rect (rect1) node with stamp expressions to create difference in size (width, height parameter)
- A transform (transform2) node that takes the rect and rotates it through another stamp expression.
- A place (place1) node to stamp copy an instance of rect on each point of the path given by the resample node. Stamp copy is turned on and a variable called "big" is set to (int) random(CNUM,5,20)
- A compound (compound1) node to generate the difference shape from the transformed textpath (transform1) and the shape returned by the place1 node.
The outputs from the nodes within the network look like this. In order to see them in the viewer pane double click on the individual nodes.
The original textpath. Double click on texpath1.
The textpath after transformation. Double click on transform1.
The resamples textpath. Double click on resample1.
The result from place1 node. You know the drill..
The result from compound1 node.
Creating a moiré pattern

[[file download: Media:moire.ndbx
In order to create a moiré pattern we will need a grid of points which will be multiplied by a copy node. The copy node will change the angle of the overlay thus creating the effect. The nodes in the example in a list:
- An ellipse node (ellipse1) which is set to 4 * 4 in dimensions and has a stamp method as expression for the fill parameter.
- A grid node (grid1) to produce a grid of points. Width and height are set to 400 and rows,columns set to 50.
- A place node (place1) which has the ellipse node as "shape" input and the grid node as "template" input. It also stores a variable which is used for the stamp expression part of the ellipse.fill parameter.
- A copy node (copy1) with number set to 3 and rotation set to 30. It takes the output of place1 as its input.
Try changing the rotation, scaling or positioning in the copy node to achieve different variations. More info on moiré patterns can be found here
Back to the Getting Started page.












