MadJik

Lens Flare (optical) updated ymd 2018-01-18

Recommended Posts

Lens Flare

 

exemple1b.png

 

 

 

What's this?

“Lens flare is created when non-image forming light enters the lens and subsequently hits the camera's film or digital sensor. This often appears as a characteristic polygonal shape, with sides which depend on the shape of the lens diaphragm…”

Text from https://www.cambridgeincolour.com/tutorials/lens-flare.htm

 

For more information about this, please read https://en.wikipedia.org/wiki/Lens_flare

 

 

Download it!

Plugin LensFlare.dll

ar.png Here is the DLL  http://jcljay.free.fr/pdn/LensFlare.zip

 

The MadJik's All plugins package is available!

http://forums.getpaint.net/index.php?showtopic=7186 

 

:Warning:  This plugin is compatible with the dark theme available since version 4.20 of paint.net and may cause error with lower version.

Here is the zip without dark theme.

ar.png Here is the DLL  http://jcljay.free.fr/pdn/LensFlare419.zip

 

How to install

Close Paint.net

 

Classic version of Paint.net

Unzip and (re)place the DLL in your Effect folder usually:

C:/Program Files/Paint.NET/Effects (please reverse / for correct path)

 

Microsoft Store version of Paint.net

Unzip and (re)place the DLL in your Effect folder usually:

My Documents/paint.net App Files/Effects (please reverse / for correct path)

 

You have to adapt for your language My Documents

 

 

 

Thanks to

@toe_head2001 for help with windows form issues (dark theme and good advices).

 

 

 

How to use it

LF_Tuto1b.gif 
 

First of all the plugin is searching for the brightest point of the active layer. If the layer is empty or monochrome, the top left corner is the default point.

Then from this point passing through the center of the canvas, an imaginary line is used to place each of the fourteen shapes defined by the grid of settings.

Flares are concentric circles, hexagons and other shapes with a fading white to gray.

Flakes are rays.

 

NEW: Up to 10 bright points could be placed and found around the canvas. Use the pen to spot single pixels with same bright color. 

 

The User interface

This plugin is added to the menu Effects, submenu Render.

 

lensflare_UI.png

 

The interface is divided in several areas:

 

Area 1 common factors

Distance factor

Set the distance adjustment to the center of the canvas. Default distance is estimated by the white point.

 

Radius factor

Overall adjustments of the radius of the shapes.

 

FlaKe intensity factor

Change luminosity of all flakes.

 

FlaRe intensity factor

Change luminosity of all flares (circles, hexagons and other shapes).

 

FlaKe width of rays

Ratio to change the width of the rays of the flakes.

 

FlaRe width adjustment

Change thickness of concentric shapes (circles, hexagons and other shapes).

 

Final blur

The effect is better with a small blur. The blur is applied on the active layer. You should use a separated layer to keep your image unblurred.

 

 

Area 2 FX table

This table define each shape of the lens flare (FX).

The first column shows a symbol of the shape.

The default values are based on several samples I found on the web.

 

FX type

Select the FX type: 0=none, 1=circle, 2= star, 3=hexagon. This changes the symbol.

New shapes added: 4=diamond, 5=pentagon, 6=star, 7=flower, 8=triangle.

 

Distance

Set the distance to the center of the FX. The positive distances are the farthest, the negative ones are the closest. The shapes are drawn in the order from top to bottom, overlapping each other.

 

Int radius

Value for the internal radius of the shape (zero for a filled shape).

Checkbox above Int radius

Check the box to switch to a percentage based on the external radius. It’s easy to set an internal radius at 80% of the external radius.

 

Ext radius

Value for the external radius of the shape.

 

Ray/Circle

For flake, define the number of rays to draw the star.

For flare, define the number of concentric shapes to draw.

.

Invert

0=gradient from white (inside) to black (outside).

1=gradient from black (inside) to white (outside).

 

Grey level

Set the luminosity limit for the FX.

Checkbox above Grey level

Check the box to use the primary and secondary colors.

 

Angle

Set the rotation angle for the FX.

 

Area 2b tabulation sequence

Click on this picture to change the tabulation sequence in the table.

Green/Vertical: allows to fill the table column per column, going through a parameter for all the FX.

Blue/Horizontal: allows to fill the parameters FX per FX.

 

 

Area 3 Set all

Enter a value in the dark cell to set all values in the column above at once.

 Click on the lockers to fix a line so the “Set all” won’t change locked FX.

 

Area 4 XML Settings

Menu with save/load possibilities.

 

Smart values button

Set the range of values you need on the first and the last lines. Then when you click on the Smart values button, the values are calculated and evenly distributed over the unlocked lines. Columns updated by this button are: Distance, Int radius, Ext radius, Rays/circles, Grey level and Angle. No change for locked lines and no change if first and last values of a column are equals.

 

Help button ?

Click on the ? (top right of the interface) to open this post.

 

 

The Examples:

lensflare1.gif
 

 lensflare6.gif 

 

Voilà! Enjoy!

 

Let me see what you could do with it!

 

Update 2018-01-18

-Up to 10 points could be placed and found around the canvas. Use the pen to spot single pixels with same bright color.

-Lockers

-Angle

-New shapes: 4=diamond, 5=pentagon, 6=star, 7=flower, 8=triangle.

-Smart values button

-Int radius %

-Primary Secondary colors

-Russian translation (thanks to @Remake)

Edited by MadJik
update new version
  • Like 1
  • Upvote 1

Share this post


Link to post
Share on other sites

I get the following error:

File: E:\Program Files\Paint.NET\Effects\LensFlare.dll
      Name: LensFlare.LensFlare
      Version: 2.0.8.27421
      Author: MadJik
      Copyright: Copyright © 2018 MadJik (Jean-Claude JAY)
      Website: http://forums.getpaint.net/index.php?showtopic=112248
      Full error message: System.MissingMethodException: Method not found: 'Void PaintDotNet.PdnBaseForm.set_UseAppThemeColors(Boolean)'.
   at LensFlare.LensFlareConfigDialog.InitializeComponent()
   at LensFlare.LensFlareConfigDialog..ctor()
   at LensFlare.LensFlare.CreateConfigDialog()
   at PaintDotNet.Menus.EffectMenuBase.RunEffectImpl(Type effectType) in D:\src\pdn\src\PaintDotNet\Menus\EffectMenuBase.cs:line 921
 

Share this post


Link to post
Share on other sites
32 minutes ago, Seerose said:

I have to read everything correctly.

 

It seems for me, that you applied the effect directly on your image. You need an additional black layer with one 1 white pixel to build an imaginary line between this pixel and the middle of the image for the effect. After that you choose the blendmode for this layer and merge down.

 

See my result: https://forums.getpaint.net/topic/7186-madjik-all-plugins-last-updated-2018-01-10/?do=findComment&comment=540994

Edited by IRON67
  • Like 1

Share this post


Link to post
Share on other sites

<3 @IRON67!

 

Thank you so much Mister Teacher!  :cake: :coffee:   

I've tried black with the background, unfortunately not. Your pictures are enviable. 

Share this post


Link to post
Share on other sites

Most excellent @MadJik  Now you're showing me how much I still have to learn. You did my shape justice. Something I am constantly practicing.Thank you for the modifications. I see things I still don't know how to do - but maybe after 5 years of exploring................

Share this post


Link to post
Share on other sites

@MadJik

One of the limitations of shapemaker - Canvas size 500X500 only. Not a lot of room for details. Something I color again and again so I took the time to make a shape out of it. Who draws anymore? We have plugins to make our canvas. (tracing) . Your colors and textures was what I was referring to. I'm constantly trying different methods to get the best rendition possible. I won't ask what you used. The learning is trying many different things. 

Share this post


Link to post
Share on other sites

Update 2018-01-18

-Up to 10 points could be placed and found around the canvas. Use the pen to spot single pixels with same bright color.

-Lockers

-Angle

-New shapes: 4=diamond, 5=pentagon, 6=star, 7=flower, 8=triangle.

-Smart values button

-Int radius %

-Primary Secondary colors

-Russian translation (thanks to @ReMake)

 

lensflare8.png

 

multiple.png

 

  • Like 1
  • Upvote 2

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