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

Grain Effect using Equation Filter


paolo.limoncelli

Recommended Posts

I decided to remove old trials and pack anything into a new format

 

Waiting for something like this

 

This is the DAUB Film Grain Macro with rigged parameters and non-destructive approach.

 

Download Here

 

 

DAUB_filmGrain.jpg

 

 

 

To use it just install using Import Macro from Library Studio and click on it.

You'll be prompted with the following sliders:

 

First/Second Grain layer > Allow to manage the size/randomness of your grain

Grain Intensity > The level of micro contrast

Grain Smoothness > Further softness refinements if needed

 

You can also set a blending mode.

 

When you confirm, the filter creates a new layer, that you can further manipulate with Blend Ranges, adding a mask... Etc...

 

If you want to contribute I can share the equations behind this, I'm not as skilled as I would in maths...

I decided to remove them since they seem to frighten users a bit... :)

 

So any feedback to improve it is welcome!  :)

The white dog, making tools for artists, illustrators and doodlers

Link to comment
Share on other sites

Link to comment
Share on other sites

  • 4 weeks later...

Nice Paolo I missed this when u posted it, will check it out in front of my Mac when I get home. I remember posting about the need for film grain vs binary digital "noise". Genius use of equations and the maths

2021 16” Macbook Pro w/ M1 Max 10c cpu /24c gpu, 32 GB RAM, 1TB SSD, Ventura 13.6

2018 11" iPad Pro w/ A12X cpu/gpu, 256 GB, iPadOS 17

Link to comment
Share on other sites

Paolo,

in your post, the image of the dialogue has "DAUB Film Grain" in the title bar. How did you do this without scripting capabilities?

 

Did you make that dialogue, or is it inbuilt, which you somehow managed to insert text into the titlebar?

I'm asking, as I would like to make custom dialogues, but thought it was not possible due to AP having no scripting capabilities.

 

Thanks.

High-End Photographic Prints

 

 

Link to comment
Share on other sites

Hi DesignMeister!

 

It has been done entirely with Macros.

 

From the Macro palette some actions allow you to expose specific parameters, and rename these.

You can spot them by the little cog icon. Basically all Filters and Adjustments allow this.

The result can be stored in the Library Studio, and once you launch it prompts a dialog with the name of your Macro.

 

So what you see is a modal Dialog, not a Palette.

These settings cannot be resumed since some steps contained are destructive, even if the final filter is non-destructive (since it creates a new layer).

The white dog, making tools for artists, illustrators and doodlers

Link to comment
Share on other sites

Thanks Paolo,

I never realised some of the parameter names were exposed and editable via Macros. Thank you for sharing that!

 

Just out of curiosity, what filter dialogue is that?

 

Thanks.

High-End Photographic Prints

 

 

Link to comment
Share on other sites

Thanks Paolo,

I never realised some of the parameter names were exposed and editable via Macros. Thank you for sharing that!

 

Just out of curiosity, what filter dialogue is that?

 

Thanks.

 

 

None! 

It is simply rigging all the parameters I decided to expose.  :)

 

Being this only a first level of Macros implemenation in AP I can only say that the future looks very promising  :)

The white dog, making tools for artists, illustrators and doodlers

Link to comment
Share on other sites

Ok, now I'm completely lost :(

The title of your post says "grain effect using equation filter", but you have different sliders etc in your dialogue than what the equation filter has?

Surely if you used a macro, you must have run some filter, in order to display a dialogue window?

 

I'm definitely missing something here :(

High-End Photographic Prints

 

 

Link to comment
Share on other sites

Ok, now I'm completely lost :(

Surely if you used a macro, you must have run some filter, in order to display the dialogue window?

 

I'm definitely missing something here :(

 

Yes, but only when you record it.

You can decide which parameters to show and which one to keep hidden before playing.

For example I could choose to hide anything and make this one a "one click" action.

 

In this case I decided to expose the 3 parameters (a,b,c) available in the Equation Filter renaming these with much more meaningful titles. 

To understand it deeper just download the macro, install and right click on it choosing "Edit".

 

In the Macro palette you'll see the list of actions, and clicking on the cogs what I decided to show/hide.

The white dog, making tools for artists, illustrators and doodlers

Link to comment
Share on other sites

Ahhhh, after editing your macro and viewing your steps - it now makes sense.

Thank you!

High-End Photographic Prints

 

 

Link to comment
Share on other sites

Here is another, similar approach using the Distort > Equations to generate noise and then applying it.  I broke the grain into the Shadow-Midtone grain and the Highlight grain to control the look of the grain application.  This is all performed by the user-controlled blend mode used.  I cannot figure out how to select and group multiple layers while recording a macro, so the resulting layer stack is not as tidy as it could be.

 

The macro:

1) applies a B+W conversion adjustment layer - this is editable after the macro runs, so you can adjust the color contributions to taste.

2) Stamps the B+W conversion and applies Equations to make a grain layer.  I have exposed the parameter "Grain Control" to give the user access to the random seed in the noise function.

3) The noise layer is duplicated so that the Shadow-Mid and Highlight grain have the same noise pattern.

4) A Gaussian blur is applied to each noise layer to control the sharpness/fineness or softness/coarseness of the grain.  There are Live Adjustment layers, so they are editable after the macro runs.

5) A curves layer is added with a gentle contrast "S" curve to re-establish contrast  - this is editable after the macro runs.

6) A levels adjustment layer is added for the user to fine tune the black point, white point and gamma of the resulting image.

 

In general, the application of the grain layers will affect the tonal values of the underlying black and white conversion, so adjustment of tone and contrast will be required after the macro runs.

 

I suggest first accepting the default values and playing with the blend modes to see how they affect the rendering of the grain layers.   I also would suggest grouping the two grain layers and turing their opacity down - this can be done in the dialog while the macro is running, but you must adjust each individually. Adjust each to taste in the dialog and then you can group the two layers and turn the effect down to taste by adjusting the group opacity.

 

The black and white conversion in the macro is simply the default conversion with all color sliders set to the their zero position.  This conversion should probably be adjusted after the macro runs to get the best conversion.

 

Thanks to paolo for encouraging me to try to understand the Equations interface with this interesting application.  Please feel free to download the macro and edit it, etc.  I am still learning all of this, so the implementation is weak and the equations are not real sophisticated.

 

kirk

 

Dropbox link to macro file:  https://db.tt/pNOXLuvXmy

Link to comment
Share on other sites

I love the way that Macros present the user with a customised dialogue window, which shows all the steps the creator decided to expose :)

High-End Photographic Prints

 

 

Link to comment
Share on other sites

Kirkt,

Great stuff :)

 

You may want to change "S", "M" and "H" to "Shadows", "Midtones" and "Highlights" in the descriptions - so that inexperienced users know what those initials refer to.

You could also remove "Vivid Light" and "Pin Light" from the descriptions, as they are already displayed in the dropdown menus.

High-End Photographic Prints

 

 

Link to comment
Share on other sites

Note that I have found that the default values for the Gaussian Blur live filter changes automatically with the size of the image when you first run the macro.  That is, if you load a large (say full-res dSLR) image, the blur radius is larger than if you load a smaller res image.  You can always change the blur radius during the macro dialog or after the fact, as the GB layers are live filter layers.

 

Also, when working on an image, I would suggest working on it at final export size.  Play around with getting the look you want and then changing the document size to see how that affects the grain.  You can experiment with stamping the stack prior to resizing - this will create a pixel layer with the look burned in  - the grain will get resized during image size changing.  You can also leave everything live, resize, and then adjust the GB layers accordingly to reestablish the look at the smaller size.  Then export.  I found this approach worked better.

 

kirk

Link to comment
Share on other sites

Kirkt,

Great stuff :)

 

You may want to change "S" + "M" + "H" to "Shadows", "Midtones" and "Highlights", in the descriptions - so that the user knows what those initials refer to.

You could also remove "Vivid Light" and "Pin Light" from the descriptions, as they are already displayed in the dropdown menu.

 

No problem.  I probably should have removed those things, but this way the user, at least at this stage in the development, is cued to recall the default value - in case they forget and want to go back to the default.

 

Can you edit the macro?  If so, you can click on the gear icon next to each control I exposed to bring up the rigging controls.  Click on the eye to un-expose the control, then click on it again to re-expose it - this should give you the opportunity to rename to control that appears in the dialog.  This way you can customize the control names.

 

Have fun!

 

kirk

Link to comment
Share on other sites

Yes, I will rename everything from my end - I just thought I would point it out, in case you wanted to tidy it up for future versions :)

Looking forward to making lots of interesting Macros.

High-End Photographic Prints

 

 

Link to comment
Share on other sites

 

Thanks to paolo for encouraging me to try to understand the Equations interface with this interesting application.  Please feel free to download the macro and edit it, etc.  I am still learning all of this, so the implementation is weak and the equations are not real sophisticated.

 

kirk

 

Dropbox link to macro file:  https://db.tt/pNOXLuvXmy

 

Great job Kirkt!

This was exactly my idea!

My filter is very basic compared to your, and I'm very curious to dig into it!

 

Unfortunately I'm not able to install it...

I noticed thath the extension is .afmacro where mine is .afmacros

The white dog, making tools for artists, illustrators and doodlers

Link to comment
Share on other sites

  • Staff

Great job Kirkt!

This was exactly my idea!

My filter is very basic compared to your, and I'm very curious to dig into it!

 

Unfortunately I'm not able to install it...

I noticed thath the extension is .afmacro where mine is .afmacros

Go to the Macro panel and choose to 'Import' and import that .afmacro file - that should work (mine did). I think there is a bit of confusion about the .afmacro vs .afmacros extension - one is an individual macro (to be imported to the Macro panel) and the other is a collection of Macros to be imported to the Library panel. I think we should make this much easier in the future, sorry...

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.