Jump to content
paolo.limoncelli

Grain Effect using Equation Filter

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

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

whoa I just got a chill of excitement!

 

 

Thanks Ronnie, my idea is to refine this grain generation, then add filters and adjustments and wrap anything into a Macro, rigging some parameters to create a more self-explanatory dialog.


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

Share this post


Link to post
Share on other sites

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


2017 15" MacBook Pro 14,3 w/ Intel 4 Core i7 @ 2.8 GHz, 16 GB RAM, AMD 455 @ 2 GB, 512 GB SSD, macOS High Sierra

2018 11" iPad Pro 256 GB, latest iPadOS public beta

Share this post


Link to post
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

 

 

Share this post


Link to post
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

Share this post


Link to post
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

 

 

Share this post


Link to post
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

Share this post


Link to post
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

 

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Thank you!


High-End Photographic Prints

 

 

Share this post


Link to post
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

Share this post


Link to post
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

 

 

Share this post


Link to post
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

 

 

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

 

 

Share this post


Link to post
Share on other sites

I'm glad you are able to edit it!  Yes, this implementation of Macros will make for some interesting extensibility of AP.

 

kirk

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

These are the Terms of Use you will be asked to agree to if you join the forum. | 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.