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

Add Film Grain (free macros)


smadell

Recommended Posts

Adding grain to a photo is a nice way to emulate vintage images, especially older black and white photos. It has always bothered me a bit that Affinity Photo does not include a mechanism to introduce grain, other than to use the “Add Noise” filter. While adding noise is nice, it adds such a fine amount of variation that it is often quite literally unnoticeable.

I have admired the Film Grain effect that is available in other software, such as Nik’s Silver Efex. These filters can often vary grain size and intensity; sometimes grain can be added to shadows, midtones, and highlights in differing amounts.

What I’ve attached is an .afmacros file called Film Grain. This is a macros Category and should be imported into the Library panel. It includes two macros. The first is called Add Film Grain - simple. It allows the user to add grain with 2 parameters – intensity and size.

Grain - Intensity

The grain intensity defaults to 100%, but can be set to any value between 0 and 100. At 0% intensity, the grain effectively disappears. To understand intensity, think “contrast.”

Grain - Size

The size slider accepts values between 0 and 1, with the default being 0.2. The appropriate value will differ based on the image being treated, and the same perceived size might need higher values when the overall dimensions of the image are larger. Also note that values above 0.8 are rounded down to 0.8 (and this forms an effective upper limit to the slider). This is done primarily because the math breaks down at higher values.

The second macro is called Add Film Grain - by tonal range. It includes the same intensity and size parameters, but also lets the user set opacity levels for highlights, midtones, and shadows separately.

Grain Opacity - Highlights, Midtones, and Shadows

There are three separate sliders for highlights, midtones, and shadows respectively. Each defaults to 100%, but can be set to values between 0 and 100. While the “simple” macro creates a single Film Grain layer, the “tonal range” version creates a group containing 3 layers, one each for the three tonal ranges. The Grain Opacity sliders simply vary the opacity of the corresponding layers within that group.

Finishing Touches

When each of the macros finishes, the Blend Range for the result (the Film Grain layer in the case of the “simple” macro, and the Group in the case of the “tonal range” macro) is set to diminish the effect of the grain on the highlights slightly. This is an aesthetic choice on my part, and I think you will agree. However, you can set the Blend Range to anything you might like, as desired.

*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *

For most users, the “simple” macro will be enough. It lets the editor vary the Intensity of the grain and also the Size. I have always liked adding grain that was a bit larger, because it becomes more noticeable.

For other users, the “tonal range” macro will allow you to add some additional nuance to the grain, by letting you emphasize grain in the shadows, midtones and highlights. Do this by first setting a global Intensity and Size, and then adjusting the opacity of the 3 tone ranges as desired.

*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *

Here are samples of the two macros, along with the settings as applied. The differences between the two results is quite subtle, but might be worth the effort in some cases.

889931330_GrainComparison.jpg.c272f63295f4517550ce2a55081c8578.jpg

*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *

As with all the macros I have posted, I have tested these on one computer under a limited number of conditions. I cannot guarantee anything, but I have no reason to think they will not work for you just as they have for me. The macros are free, with the suggestion to “pay it forward.” As you become more proficient, be sure to share your experience and your work with others.

By the way, happy holidays to everyone. Here’s hoping that 2021 is a more positive, uplifting year than 2020. And maybe, just maybe, we’ll be able to ring in 2022 in a crowd without any masks!

Film Grain.afmacros

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

Link to comment
Share on other sites

Thank youi, smadell, very useful.

Looking at your sample photos, I like the one with the tonal-range macro applied better because it looks more natural. Of course, changing the settings of either of the macros may give very different results. 

Happy holidays to you as well and thanks again. 

Link to comment
Share on other sites

Good afternoon, TV...

I didn't look into allowing for different grain size and intensity for each of the tonal ranges. Honestly, I think that may introduce too many choices (inducing a kind of "user paralysis"). I suppose it's possible, but it just seems like more nuance than needed. I'd be interested in hearing what other people think!

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

Link to comment
Share on other sites

killzen...

be sure you are using the “Import Macros” choice in the Library panel (from the “hamburger” menu at top, right). You cannot use the Macro panel to import a category (note that the file extension ends in an s).

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

Link to comment
Share on other sites

Smadell,  While I like a good visual paralysis, the effect I was visualizing was the metallic gradient effect of noise graduating from say 100% to 0% into another color...I will work on trying the noise filter masked by gradients as an effect to see if this is really where "my head is at"...

Link to comment
Share on other sites

  • 2 months later...

From the Library panel, click and hold on the "hamburger menu" at the top right. Select "Import Macros..." from the drop down. Navigate to the "Film Grain.afmacros" file on your hard drive and click Open in the dialog box.

80040250_importmacrosintolibrary.jpg.737e90762f8eca8736ff249f21bbed99.jpg

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

Link to comment
Share on other sites

On 12/1/2020 at 3:25 AM, smadell said:

conditions. I cannot guarantee anything, but I have no reason to think they will not work for you just as they have for me.

Nice and working well on iPad too.😀

M1 IPad Air 10.9/256GB   lpadOS 17.1.1 Apple Pencil (2nd gen).
Affinity Photo 1.10.5 Affinity Design 1.10.5 
Affinity Publisher 2, Affinity Designer 2, Affinity Photo 2 and betas.

Official Online iPad Help documents (multi-lingual) here: https://affinity.https://affinity.help/ 

 

Link to comment
Share on other sites

  • 1 year later...

I’m really glad to hear that these are working for you, @Dionz.

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

Link to comment
Share on other sites

  • 4 weeks later...

You’re very welcome, @vmulder. I’m glad you like the macros. Thank you for posting your comment - the feedback helps me a great deal!

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

Link to comment
Share on other sites

  • 3 months later...

I think so, @BiffBrown… The days when I shot on film are ancient history, and to be honest I really never knew all that much about what was going on when I dropped off my film at the drug store. However, that doesn't really answer the question.

There's a fundamental problem emulating film grain in digital media. Film grain was more or less randomly sized, and pixels are uniform in size and shape. Without some real fancy programming (way more than my little mind can handle) the only way to get "film grain" in a digital image is to start with Noise. it's an imperfect solution right from the start.

I believe that color film uses "dye particles"  rather than silver halide and, therefore, the grain ought to be colored rather than monochrome. I'm not sure how one would emulate that in a digital world and, therefore, I'm stuck with using "Add Noise" as a starting point.

There's one thing you could try, but I'm not sure it will give you anything you're going to like. With the Film Grain macros in the Library, right click on the macro and choose "Edit Macro" from the drop down menu. Find the step labelled "Add Noise" and click on its gear icon (on the right side of the line). Uncheck the box labelled "Mono" and then, optionally, save the altered macro to the Library with a different name. Basically, this lets you start with Color Noise rather than with Luminance Noise. However, the color noise you introduce is entirely random, and has no connection to the image it's affecting. Does that give a result that you like?

I've tried this, and I've found that the only way to make this even approach being acceptable is to lower the "Grain Intensity" when the macro is run. Let me know what kind of results you get if you should try this!

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

Link to comment
Share on other sites

I did try editing your macro as you suggested - the results are useful: the Grain Intensity should be lowered.

The other problem I'm finding, in both colour and monochrome grain, is being able to vary the grain size (intensity doesn't quite do it). Although grain intensity can vary with tone, the grain size will also vary - darker tones can have larger grain then in the lighter tones; midtones can show a higher grain intensity. 

 

Link to comment
Share on other sites

  • 2 months later...

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.