Jump to content
You must now use your email address to sign in [click for more info] ×

Creating tiles using Affine, especially of Leaves


Recommended Posts

I originally took photographs of leaf litter on  a woodland floor to use as a background image for one of my woodland websites. Later, I thought it would be nice if I could create a tileable  image for this purpose. This explains the procedure. I am using images of leaves here, but the principle would apply to any discrete image with transparent background.

For this example, I collected about 15 leaves from a Guelder Rose bush in my garden. Now is a good time (November in the Northern hemisphere) because the leaves are a rich variety of colours The Guelder Rose included reds, purples, browns and yellows. 

Freshly gathered leaves may well be dry and are difficult to lay flat. My Guelder Rose leaves were OK, but I had curling problems with some Maple leaves (English Field Maple, Acer campestris). To flatten them sufficiently, I soaked them in water for about an hour and then laid them out on and between sheets of tissue to dry. They need some weight on top, but not too much. I used a few magazines for this. Leave them overnight to dry and flatten. They do not need to be totally flat or dry.

The reason for needing them fairly flat is that I create the image using a flatbed scanner. I lay the leaves on the glass plate and cover with a piece of thickish white card. This helps to flatten them and also provides a nice white background. I also apply some gentle pressure on the scanner lid whilst scanning to help flatten the leaves. I use a Canon MP630 scanner/printer and Vuescan for acquiring the image. After the image is saved, it is automatically loaded into Affinity Photo. Here is an example:

GuelderRose1.png.1ced3474636fc45666ce422f89736df8.png

 

I can select each leaf one at a time using the Flood Fill Tool with the Add option and 20% tolerance. Many leaves will be selected at the first click, but a few more clicks may be necessary for others. Once I have a leaf selected, I cut it (Control-X on Windows, or the Mac equivalent). I use Cut rather than Copy since the gap tells me if any significant parts have been left behind, in which case I can cancel the cut.

Once I have cut out my leaf, I then select File > New from Clipboard. This then opens in a new window. Almost always this image need no further editing, but the opportunity is there if needs be. I can then export that image under a suitable name (Guelder Rose 01.png in this case). You need to save as .png  (or .tiff) since you need to preserve transparency.

I do this for the leaves on this scan and then repeat for the rest of the leaves. I am now ready to create my tile.

Firstly I create a new image of 800 by 800px ( more or less if you prefer). I then select the first batch of leaves (six in this case, Guelder Rose 01.png to Guelder Rose 06.png). Each in turn is placed on my image tile (File > Place). At this point I usually rotate the placed image arbitrarily and resize it to about 10-20% of the tile size. After the first set have been placed you need to make  a decision: do you want to proceed destructively or non-destructively? For the next stage you need to create a new pixel layer incorporating the images so far. To do this destructively, just pick Document > Flatten. This merges all your layers into one. Alternatively, you can pick Layer > Merge Visible. This merges all your layers into one, but leaves the other layers below. You may need to hide these. Personally, I use the destructive Document > Flatten.

You are now ready to make the first Affine Transformation. This allows you to to swap the left part of the image with the right part, along a line of your choice. Similarly you can swap the top and bottom parts. To use the Affine transform  pick Filters > Distort > Affine. This opens up a box that allows you to select your division lines as Offset X and Offset Y. I find it easier to select Offset Y first, and then Offset X. You can pick any percentage you like here, but I tend to start with 20% for each. Click Apply. This shows the effect of the Affine transform on a set of six leaves (I cannot remember the % setting here):

Before: 316446850_Tilingstep1.png.1b4312c15d8e828ca7ddefc331ff1031.png 

After: 1195760301_Tilingstep2.png.5a7d1c7d7ff73414c397a78986dd33b0.png

Some leaves have been split so that the leaves on the right  have the right parts missing, but they are now seen on the left-hand side. Similarly one leaf is split top and bottom.

We can now repeat the process, adding half-a-dozen more leaves, flattening the image and applying the Affine transform. This time I use 40%. We can repeat this, adding more leaves, to fill in the gaps. Subsequent Affine transformations can be 60% and 80%, but after the first few, I tend to use a split which brings any significant gaps to the centre. Here are a few intermediate steps in my tile:

1741293759_Tilingstep3.png.0168c7ccdad457930ecfb4f4431c3cde.png 1483995129_Tilingstep5.png.245c77626c9a100d7c48569d05ac399d.png

1722537543_Tilingstep7.png.5b0f721f16c5472f5ca31eb894e7711f.png 1912994709_Tilingstep9.png.3de955fb2342e462b9bcd27d53b01d4e.png

For the final image, I have enhanced the contrast a bit and added some sharpening. Here is the final image tiled with itself four times:

951345990_Tiling800-8.thumb.png.7c54bfc89742e92869f80cd35888b491.png

I will be putting some more examples of this under the Share Your Work part of the Forum.

John

Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Link to comment
Share on other sites

On 11/14/2018 at 7:53 AM, Mike.Reynolds said:

Hi John,

Have you thought of adding some other forest floor items such as the prickly green things and conkers etc? (I forget what they are called)

They'd fit in well with your leaves.

Regards

I kept this one simple, with one type of leaf. I will be posting some more examples, including mixed forest floor leaf-litter on the Share your Work pages.

John

Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Link to comment
Share on other sites

  • 2 years later...

Wow.  I am brand new to Affinity Photo having used Xara and PaintShop Pro forever.  I appreciate your work but wonder if AF Photo will have an easier way to make a tileable image.  I am used to making tileables in 3 clicks and it is something I use fairly regularly.  

Link to comment
Share on other sites

On 1/26/2021 at 9:54 PM, richinri said:

PaintShop Pro.  You load an image, select "make tileable" as a menu choice and it is done...perfectly. 

Where is that found in PSP? I've looked through my versions and can not find anything like that. Oh you mean under the Effects>Image Effects>Seamless Tiling.

Affinity Photo 2.4..; Affinity Designer 2.4..; Affinity Publisher 2.4..; 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

Link to comment
Share on other sites

  • 2 weeks later...

AP v1.9.0 has a new layer called "pattern layer" - you can make a pattern layer from a selection automatically.  For example, you paste the original art above into a new document, select all, make a new pattern layer from the selection, and now you have a tillable, scalable, rotatable moveable tiled pattern.

 

See: 

 

kirk

Link to comment
Share on other sites

14 minutes ago, kirkt said:

AP v1.9.0 has a new layer called "pattern layer" - you can make a pattern layer from a selection automatically.  For example, you paste the original art above into a new document, select all, make a new pattern layer from the selection, and now you have a tillable, scalable, rotatable moveable tiled pattern.

 

See: 

 

kirk

The seamless pattens created with this new feature seems very limited.  It doesn’t keep the pattern if you go off the edges like Corel Painter and clip studio paint does. It tends to crop the image without transferring the other portion to the other side to keep it as a pattern. Also, you cannot do half-step patterns which are very convenient to avoid for the pattern to look too symmetrical and unnatural 

Link to comment
Share on other sites

The new pattern layer does not create a tileable pattern (using the affine hack) but it permits the user to use that tileable pattern non-destructively on its own dedicated layer, instead of creating a fill layer and using the texture on the fill layer.  I posted it here because it is a new feature that folks who make and use tileable patterns may want to try.

If you need to make your pattern tileable (seamless), you can record a macro that will do the affine steps, do all the cloning that you need to blend the seams, then use a second macro to reset the affine transform with your new, seamless tile.  Once you have the seamless tile on its own pattern layer, you can duplicate that layer and transform it multiple times to add scale, offset and rotation variation to the texture you are creating and you can paint in the effect of an individual variant using regular old masking tools.  

If you feel that using another piece of software to make your tile is worth the extra effort and adds value to your work, that might work for others as well.

kirk

Link to comment
Share on other sites

7 minutes ago, kirkt said:

The new pattern layer does not create a tileable pattern (using the affine hack) but it permits the user to use that tileable pattern non-destructively on its own dedicated layer, instead of creating a fill layer and using the texture on the fill layer.  I posted it here because it is a new feature that folks who make and use tileable patterns may want to try.

If you need to make your pattern tileable (seamless), you can record a macro that will do the affine steps, do all the cloning that you need to blend the seams, then use a second macro to reset the affine transform with your new, seamless tile.  Once you have the seamless tile on its own pattern layer, you can duplicate that layer and transform it multiple times to add scale, offset and rotation variation to the texture you are creating and you can paint in the effect of an individual variant using regular old masking tools.  

If you feel that using another piece of software to make your tile is worth the extra effort and adds value to your work, that might work for others as well.

kirk

That’s a good tip. I am to try these steps and see if works with my workflow. It would be nice if the pattern layer would accommodate the affine feature automatically. That will make it more automatic like in other software. I can see this pattern layer feature get better as updates are made. It’s a step in the right direction.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

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

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