# Affinity Photo Procedural Textures for Absolute Beginners: 101.3

## Recommended Posts

Lesson one is HERE.

Lesson two is HERE.

In 1983 a computer science professor at NY University looked for a way to make computer-generated images look more natural. In 1987, a small team of software engineers started producing affordable, user-friendly graphics software in the Jurassic era of Windows 2.0. Thanks to these founding fathers, Ken Perlin and Serif Software I can now produce images like this with Affinity Photo from an original photograph solely using procedural textures and default filters.

Introduction

I won’t be taking you through the extensive textures and techniques I used to create the above image – baby steps! The purpose of that was to introduce you to the Simple Perlin Noise texture in Procedural Textures (which I did use) and just how potent Procedural Textures can be.

In this lesson I’m going to show you the subtle art of Tweaking. Tweaking (editing) Affinity’s existing Procedural Textures are a gold mine for finding new textures, gradients and effects. By the end, you should be in better position to spot different parts of the equations and have some idea of how to experiment with them. Starting with the default Perlin Noise preset, you will produce several presets, gradually adding to your Procedural Texture tweaking knowledge.

NOTE: Menu convention: Where you see "Layer>New Layer", "Edit>Fill eith Primary Colour", Filters>Colours etc. it means go to that menu (Layer, Edit, Filter etc) and select whatever follows. So, Filters>Colours>Procedural Texture means click on the Filters menu, click on Colours and then select Procedural Texture.

Perlin Noise Close Up and Personal

Before we dive in and start tweaking, let’s take a look at how the Simple Perlin equation is put together.

Create a new canvas 2400 x 1600 pixels

Create a new layer via Layer>New Layer (or click the chequerboard icon at the bottom of the layer palette)

Fill with your foreground colour via Edit>Fill with Primary Colour.

Add a LIVE Procedural Texture filter (so we can easily edit and save new presets). Do this via, Layer>New Live Filter Layer>Colours>Procedural Texture.

Select the Simple Perlin Noise preset from the Equations preset drop-down list. Here’s how the equation looks:

perlinsc(rx/200,ry/200,7,0.6)*0.7

It’s a little bit intimidating but it can be broken down fairly simply. Think back to lesson 2 and the equation we wrote for Basic Noise 2 which was noisei(x,y). What you’ve got is the command at the beginning to produce noise followed by how to do that in brackets, with the “instructions” inside the brackets separated by commas. It no different with perlinsc(rx/200,ry/200,7,0.6)*0.7

Instead of a telling Affinity to make noisei type noise, the equation is telling it to make perlinsc – another type of noise. The instructions for doing that are inside the brackets. With noisei we had two instructions, x and y, which mean “make noisei across and down the image”.

The perlinsc command needs three instructions to get going and produce noise. Look inside the brackets. There are four sections divided by commas:

rx/200 COMMA ry/200 COMMA 7 COMMA 0.6

Each section contributes a feature of the noise. I’m not going to explain the technicalities of what they do, just how the work out in practice (basically because I’m not a computer scientist!)

TIP: Whenever you tweak equations, a general rule-of-thumb is KEEP THE COMMAS or you might find that nothing happens.

Here’s what the equation does:

rx and ry mean that the texture is click-draggable – you can click inside the texture and drag it around the screen. ANYWHERE you see an x or a y on their own in an existing equation, try substituting them with rx and ry.

/200 literally means “divide by 200”. You don’t need to know the maths though; you just need to know that smaller numbers here will make smaller noise.

Delete a 0 from each of the 200s and press Enter.

That’s actually a pretty useful texture – I use a variation of it to create a watercolour paper texture (instructions at the end of the tutorial). Save this as Watercolour Emboss Txr. I have created a category for Art Effects in the presets. If you want to do this, click the burger icon top right, click Manage Presets then Create Category. Once your category has been created you can drag the Watercolour Emboss Txr preset into the new category.

Next, the number 7 in the equation has the effect of controlling the overall softness of the noise. Change it to 1 and see what happens (Ctrl+z (command+z) to change back).

Lastly, the 0.6 has the effect of controlling the level of detail or density of the noise. Change this to a 1 and see what happens (then change it back again.

What about *0.7 bit tagged onto the end after the brackets? We’ll save that for later! Suffice to say, it’s not need to make Perlin noise – delete it and see what happens. Now do Ctrl+z (command+z) to put it back.

Making the texture adjustable

If you take away nothing else from this tutorial remember this The Golden Rule of Tweaking:

Try swapping numbers in equations for Custom Inputs

Looking at the perlinsc equation, there are a lot of numbers, so, in theory, we should be able to put controls in for all of them.

As you learned in the last lesson, the bottom section (empty at the moment) is where you’ll find the controls, if there are any for how the texture appears. These controls are added via the buttons at the bottom of the Custom Input box. They look like this:

They are:

0,1 – This creates a slide controller. In terms of numbers, it can control anything from 0 to 1. “Huh! Say what?” I hear you say. “Numbers” in this instance means 0, 0.1, 0.25, 0.33 etc. Again, don’t worry about this too much. Enough to say that the 200 numbers in the equation are A LOT higher than 1, so this controller is not a great candidate for subsituting for the 200.

By default the slider is set to the far right, which is where 1 is. 0 is far left. In a future lesson I will show you can make slider go from 0 to numbers higher that 1 – which can be useful.

Most frequently, this gets used for shading, softening or blurring textures which allow for that to take place. You’ll also find is used to add turbulence to some textures too.

-1,1 – This is another slide controller similar to 0,1, but controlling everything from -1 through 0 to 1. Again, not a great contender for controlling 200.

By default the slider is set to the centre, where 0 is, with -1 at the far left and +1 at the far right.

This gets used as a means of offsetting or cycling the effect of some textures.

R & Z – Both of these will add a number input controller where you can enter a number or use the up and down arrows to increase or decrease the numbers.

The difference between the two is that whilst you can put numbers with decimals (like 1.5) in the R box, you can only put whole numbers in the Z box.

These are often (but not always) the most useful in adding controls for size, density, roughness and turbulence of textures.

Let’s look at the Simple Perlin equation again:

perlinsc(rx/200,ry/200,7,0.6)*0.7

Ignoring the bit outside the brackets, we should be add controls (Custom Inputs) for all the numbers inside the brackets, giving complete control.

We’ll start with adding separate controllers for both the 200 numbers. Why two controllers? Because one 200 controls how much noise there is across the width (rx), whilst the other controls how much noise there is across the height (ry), and ideally it would be nice to control both.

Since 200 is not a decimal, it makes sense to add a Z Custom Input, although an R Custom Input will work just as well too. Click on the Z button and add the controller. Notice how it has been assigned the letter a. If we substitute any of the numbers in the Simple Perlin equation for the letter a, that part of the equation will now accept controls from the a Custom Input box. Type the word Width in the empty space after the a, and the number 200 in the number value box.

In the Equations section, substitute the first 200 in the equation for the letter a, but make sure you keep the / sign and the comma after the a so that it now reads perlinsc(rx/a, ry/200 etc…

Add another R Custom Input. This one is b by default. Add the word Height in the description box and 200 in the value box.

You also need to change ry/200 to ry/b so that now the equation looks like this:

Play around with those values for a few moments to see what happens.

What happens if the width is 500 and the height is 2000? Does that look a bit like falling water to you?

Don’t forget to reset the numbers back to 200 before continuing.

More changes = more control

Looking at the equation as it is with the two controllers we just added we now have perlinsc(rx/a,ry/b,7,0.6)*0.7. The next number we can substitute for a controller is 7. It too is a whole number, not a decimal, so let’s add another Z Custom Input with 7 as its starting value. Now substitute the 7 in the equation for the letter c.

Lowering this number seems to make the texture softer and blurry, so we’ll call this control Softness.

TIP: If, at any stage you lose the texture, double-check to make sure you still have the commas (and in the right places), and that you have values in inputs you have created.

0.6 is the next number in perlinsc(rx/a,ry/b,7,0.6)*0.7, so we can now add a control for that.

You would think that because 0.6 is a decimal, that an R number Custom Input would be what we would need. Unfortunately, as I discovered in my early experiments, it doesn’t work – the results are too harsh. That’s because perlinsc is looking for a very narrow range of decimals from 0 upwards. If you find this to be the case, when you are “tweaking”, try the 0,1 controller instead. Why? Because it covers all the decimal places between 0 and 1 incrementally as you slide from left to right.

Go ahead and add the 0,1 Custom Input slider now. Name it Detail, since it seems to add and subtract noise as you slide it about. Set the slider to about 60% along. Why 60%, because 0.6 is decimal for 60%! (Darn, I promised no maths!)

The final control

Now it’s time to tackle the very last bit of the equation. So far we have:

perlinsc(rx/a,ry/b,c,d)*0.7

I said earlier on that the *0.7 isn’t needed to generate perlinsc noise. However, deleting *.07 has the effect of making the texture brighter. That’s because it’s acting as a brightness control. Which means that if we substitute *.07 for another 0,1 slider, we will be able to control the brightness of the textures.

Go ahead and do that now by clicking the 0,1 Custom Input button, call it Brightness and set the slider to 70% (.7 remember?).

Now substitute *.7 in the equation for e. This should be the result:

Save this as a new preset. Click on the burger icon top right of the equations section. Save the preset as Perlinsc Noise Maker. You could save it in the Noise category, or create a new category of your own.

Feeble Excuse

I’m going to skip the last two controllers for now, but they are an Angle input and an Elevation input, since they aren’t needed for this tutorial.

Variations

Try creating sub-presets with these input settings:

Variation 1. Soft Horizontal Folds

Width = 1000

Height = 20

Softness = 2

Detail = 0% (far left)

Brightness = 60%

Variation 2. Long Hair

Width = 60

Height = 600

Softness = 9

Detail = 75%

Brightness = 60%

Variation 3. Clouds Closeup

Width = 1000

Height = 1000

Softness = 20

Detail = 50%

Brightness = 80%

You should be able to see by now that with one equation and five controls you can create a huge variety of textures. Don’t forget that ALL these variations are also click-draggable, giving you even more variety.

One final word on variations. Look up Procedural Texture in the Help file and you will find a list of other Perlin noise commands. Simply copy and paste those over the perlinsc part of the equation and you have even more textures.

How to use the Watercolour Emboss Txr preset to create a watercolour paper texture

Create a new pixel layer above your photo/artwork.

Fill this with any colour – Edit>Fill with Primary Colour will do.

Apply the Watercolour Emboss Txr Procedural Texture preset you made earlier in this tutorial.

If you have added it as a Live Filter Layer you need to Rasterise the layer (right-click on the layer in the layer palette and select Rasterise.)

Apply an Emboss filter via Filters>Colours>Emboss. Set the radius to 3 pixels, the amount to 100% and tick Monochrome.

Click Appy.

Set this layer’s blend mode to Overlay or Soft Light.

##### Share on other sites

Thanks for your efforts @RevTim. I am usually comfortable with mathematics, but I was struggling with Procedural Textures. Your explanations are very easy to follow.

In your first controller, a or Width, it seems to have become Height in the screenshot,

John

Windows 11, Affinity Photo 2.4.2 Designer 2.4.2 and Publisher 2.4.2 (mainly Photo).

CPU: Intel Core i5 8500 @ 3.00GHz. RAM: 32.0GB  DDR4 @ 1063MHz, Graphics: 2047MB NVIDIA GeForce GTX 1050

##### Share on other sites

Thanks John. Also thanks for noticing the screen shot error! I welcome all input to these tutorials, especially critical ones. Important to get things right ☺

##### Share on other sites

• 2 weeks later...
On 7/2/2021 at 6:32 PM, RevTim said:

More changes = more control

Looking at the equation as it is with the two controllers we just added we now have perlinsc(rx/a,ry/b,7,0.6)*0.7. The next number we can substitute for a controller is 7. It too is a whole number, not a decimal, so let’s add another Z Custom Input with 7 as its starting value. Now substitute the 7 in the equation for the letter c.

Lowering this number seems to make the texture softer and blurry, so we’ll call this control Softness.

RevTim, thanks for these wonderful 3 lessons. I'm no math fan either and kind of avoided the whole subject but as now feel more familiar with it, I'm interested in what it can do.

PS: I think I found a small error in the above text that I underlined. The formula still has a '7' instead of a 'c'.

##### Share on other sites

8 hours ago, Hilltop said:

RevTim, thanks for these wonderful 3 lessons. I'm no math fan either and kind of avoided the whole subject but as now feel more familiar with it, I'm interested in what it can do.

PS: I think I found a small error in the above text that I underlined. The formula still has a '7' instead of a 'c'.

DOH!  Thanks for spotting that one. I have also just noticed that I have R controllers in the image not Z controllers - think I must have been asleep that day 😅.

##### Share on other sites

@RevTim: Very interesting, thanks.  Very timely too, this type of filter might help me resolve a current challenge.

##### Share on other sites

it do great help man

##### Share on other sites

• 3 weeks later...

I just went from "These aren't the same controls on the iPad," to "This is so much easier than the controls on the iPad!" All in about under an hour thanks to you!

Great tutorials Tim! Thank you for your hard work!

##### Share on other sites

• 3 weeks later...

Finally decided to dive into your tutorials. Love them. Thank you!!

Affinity Photo 2.5..; Affinity Designer 2.5..; Affinity Publisher 2.5..; Affinity2 Beta versions. Affinity Photo,Designer 1.10.6.1605 Win10 Home Version:21H2, Build: 19044.1766: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz, 3301 Mhz, 6 Core(s), 12 Logical Processor(s);32GB Ram, Nvidia GTX 3070, 3-Internal HDD (1 Crucial MX5000 1TB, 1-Crucial MX5000 500GB, 1-WD 1 TB), 4 External HDD

##### Share on other sites

• 1 year later...

Thank you, I feel a lot less lost and ready to explore more.

##### Share on other sites

• 3 weeks later...

I am unable to create a sub-preset. Affinity doesn't offer that option it is grayed out. Please clarify. There is no place to select a SUB-PRESET.

I was able to figure it out. I use the burger menu in custom inputs dialogue box which will only work some of the time.

Edited by dehskins
I figured it out.
##### Share on other sites

The tutorial is very good but I am still very confused because there are a lot of details.

## 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.

Reply to this topic...

×   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...

## Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.