# Procedural Noise in the Equations filter – Part 2

## Recommended Posts

Part 1 of this tutorial which explains what procedural noise is and how it works can be read here.

Introduction

What follows are a few examples of how noise can be used practically and creatively. We will set up a couple macros to save for future use. If you aren’t familiar with macros, you can still follow the steps ignoring the macro parts. Alternatively, you can learn how to use macros on Affinity’s YouTube channel here.

Before we launch into creating the macros, one, key discovery I’ve made which makes noise equations far more useful is that Equations noise can be generated on an empty pixel layer.

Let’s do this now, so you can see what I’m talking about.

Create a new, empty pixel layer above the background layer.

Enter the basic noise Equation in the x= box – noise(x,y).

Leave the default letter y in the y= box.

Nothing happens! BUT…

Change the Extend Mode to Full.

Click Apply.

Now you have a non-destructive noise layer of light “noise” type noise. If you want dark noise, just invert the layer. This layer can now be changed with layer blend modes (Overlay & Soft Light), rescaled, tinted, blurred, opacity reduced etc.

Now we’ll create a couple of useful noise Macros.

Let’s use a different form of noise (noisecubic) to create a macro which will add white noise to images.

First delete all layers apart from the background layer.

Open the Macro tab and press the record button to start recording.

Create a new pixel layer.

Apply the following equation:

x= box - noisecubic(x,y)

y= box - y

Extend Mode - Full

Click Apply.

Change the noise layer’s name to White Noise.

Press the stop button on the Macro tab.

Save the macro as “Add White Cubic Noise” (without the quotes).

Note: Hit the “Add White Cubic Noise” button a few times to see the effect increase or try changing the “White Noise” layer mode to Overlay or Soft Light.

The effect of using the Add White Noise macro 3x

Follow all the steps for Add White Noise above but invert the White Noise Layer layer at the end and change the name of the noise layer to Dark Noise then save the macro.

Controllable Weave Textures

Early on in this tutorial we saw how putting the equation noise(x,1) in the x= box and a in the y= box generated vertical bars of averaged colour when applied directly to a photo pixel layer. If, instead, we apply the same equation to an empty pixel layer above a filled pixel layer, we have the foundation for creating a Weave texture (many textures, since there are so many types of noise).

To create the macro, do the following:

First delete all layers apart from the background layer.

Open the Macro tab and press the record button to start recording.

Create a new pixel layer.

Apply the following equation:

x= box - noisepsin(x,0)/a/2 (note: 0 is the number zero, not the letter O)

y= box - noisepsin(y,0)/a/2

Set the Parameter A to the midpoint.

Set the Extend Mode to Full.

Click Apply.

Change the name of the layer to White Weave Texture.

Save the macro as White Weave Texture.

The Weave Texture – which shouldn’t work, since it’s all red – but it does!

The weave texture equation explained:

“noisepsin” is just the command to generate noisepsin type noise.

(x,0) in the x= box tells Affinity to only make noise in the x direction (left to right, I think)

(y,0) in the y= box tells Affinity to only make noise in the y direction (top to bottom, I think

In both boxes the 0 (number zero), I suspect, is the amount of offset from the starting point in the top left-hand corner. Certainly all changing this number does is change the pattern ever so slightly.

/a – The / sign means “divide by”; the letter a activated the Parameter A slider.

/2 means “divide by 2”.

Purely by experiment I found that multiplying the equation by a (noisepsin(x,0)*a) made the Parameter A slider have the effect of gradually filling the transparent areas of the texture with white when the slider was moved to the left.

Dividing by 2 (noisepsin(x,0)/a), on the hand, had the effect of make the Parameter A slider gradually reduce the number of stripes as the slider was moved to the left.

Dividing everything by 2 (/2) at the end meant that the default position of the equation is now half-way along the  Parameter A slider.

Moving the Parameter A slider left gradually decreases the amount weave; moving it right increases the amount of weave.

So, the whole equation instructs Affinity to generate noisepsin noise, from left to right, and from top to bottom separately (creating vertical and horizontal stripes), but the amount of noise is going to be controlled by the Parameter A slider.

Weave Texture applied to the test image – the layer mode was set to Overlay.

To create the macro, do the following:

First delete all layers apart from the background layer.

Open the Macro tab and press the record button to start recording.

Duplicate the layer with Ctrl+J.

Apply the following equation:

x= box - noisecubic(x,y)

y= box – y

Extend ModeRepeat

Click Apply.

Go to Layer menu>New Live Filter Layer>Blur>Gaussian Blur

IMPORTANT: Make sure you put a tick in the Preserve Alpha box, or the blur will not go to the edge.

Close the Live Gaussian Blur Dialogue (Don’t Merge, Delete or Reset).

Select the Gaussian Blur’s parent layer (should be the top layer).

Rename this layer as Gradient Blur.

Press stop on the Macro recording tab.

Save the Macro as Horizontal Gradient from Image.

When you run the macro on any photo or image (must be a pixel layer, don’t forget), it will generate a horizontal gradient with a live blur which you can adjust.

Gradient produced from the test image with Gaussian Blur set to 100px

See if you can create a macro which will generate a vertical gradient.

This macro creates a layer of coloured where you can choose any colour at any brightness or saturation level. It uses the same steps as the horizontal gradient macro, but with a few tweaks.

To create the macro, do the following:

First delete all layers apart from the background layer.

Open the Macro tab and press the record button to start recording.

Duplicate the layer with Ctrl+J.

Apply the following equation:

x= box - noisecubic(x,y)

y= box – a

Extend ModeFull

Click Apply.

Close the HSL Adjustment Layer Dialogue (Don’t Merge, Delete or Reset).

Select the layer beneath the Adjustment Layer (choosing “Select 1 layer below current”)

Rename this layer as Coloured Noise.

Save the Macro as Coloured Noise.

To use the macro, run it, then drag the HSL adjustment layer onto the Coloured Noise layer. You will then be able to adjust the coloured noise without affecting layers underneath (double-click on the HSL layer icon).

Conclusion

I hope I’ve show that using noise in the Equations filter is: a.) less scary than you thought, and b.) genuinely useful, with many potential applications.

Note to Affinity developers – It would be sooooo helpful if the next release of Affinity had the ability to save Equations as presets in the same way as the Procedural Textures filter. That would save having to use macros and make them even more practicable.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×

• #### Affinity

×
• Create New...