MadJik

Light Rays (update YMD:170928)

Recommended Posts

Light rays Effect Plugin

 

lightrays1.png

 

What's this?

This is a Render Texture Effect plugin.

NB: Moved from Render (too crowded) to Texture submenu.

 

Starting from the center (that you could offset) it will draw alternated triangles as rays.

 

It uses the Primary and Secondary colors as default and could be multi-colors from the current palette of colors. Up to you to store your palettes and load your favorite before running this effect.

Light_Rays_Palette.jpg

 

The brush width is used to draw the empty triangles (uncheck “Fill the rays”).

 

 

Download it!

Plugin LightRays.dll

ar.pngHere is the DLLal.png

 

The MadJik's All plugins package is available !

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

 

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

 

Microsoft Store version of Paint.net

Unzip and (re)place the DLL in your Effect folder usually: /My Documents/paint.net App Files/Effects/

You have to adapt for your language My Documents

 

 

The User interface

This plugin is added to the menu Effects, submenu Texture (was previously in Render).

Light_Rays_UI.png

 

Quantity of rays

It works well in the range 4 to 200. Less than 4 give nothing or strange triangles. More than 500 gives strange figures and requires CPU... Even number is better for symmetry than odd number. Also for symmetry with colors from palette try to use multiple of the quantity of colors.

 

Colors from palette: Number / Start

:Warning: It works only with the current palette of colors!

Number:

0 to use primary and secondary colors.

1-96 to load the colors from the current palette. Each colors are repeated around the circle till it is filled.

Start:

From the standard palette (black, dark grey, red, orange, yellow, etc.) you could choose to skip black and dark grey, set the value to 3 to start by red color.

The color index is modulo 96 (number of colors in a palette).

 

Center position offset X / Y (in %)

Negative value to move left/up, positive to move right/down.

100% is the width/height of the image, 0% is at the center, 50% is on the edge of the image.

Radius External / Internal

Allows you to reduce/increase the length of the ray. It's in %, not in pixel.

Allows you to reduce/increase the center point/circle. You could obtain a ring instead a circle.

 

Rotation Angle / Ratio of the rays

Rotation:

Allows you to choose different angle for the whole result.

Ratio:

Allows you to change the ratio of the rays to have one thick one thin and so on.

 

Use random

Check it to allow some chaos based on the random factor.

 

Random factor

This factor is here to set the strength of the randomness. 0 is no random effect.

The impact is on the external/internal radius of each ray.

 

Reseed (0=auto)

If not 0 set the random generator to this fix value. It means the result won’t change while you are playing with the other setting.

If set to 0, every change will produce different random result.

 

Fill the rays

Check/Uncheck to choose as you like, filled or empty triangles. The lines are drawn with the actual brush width.

 

Fill with color gradients

The rays are filled with a gradient from primary color to secondary color. With colors from the palette, the gradient use actual color and previous color from the palette.

If Offset secondary color is checked then the gradient uses the actual color and the color below from the palette (on the standard black on the first row will be used with white on the row below).

 

Radius of gradient

The gradient is based on the extreme limits of the triangle but here you could change the limits to make a repeatable gradient.

 

Swap the gradients

Invert the direction for the gradients.

 

Draw the gradient as ray

As it says! Check the box you will understand.

 

Offset secondary color

If Offset secondary color is checked then the gradient uses the actual color and the color below from the palette (on the standard black on the first row will be used with white on the row below).

 

Use anti-aliasing

Check/Uncheck to choose as you like.

 

 

The Examples:

 

 

 exemple0.png

 

exemple1.png

exemple2.png

 

 

Voilà! Enjoy!

 

Let me see what you could do with it!

 

  • Upvote 1

Share this post


Link to post
Share on other sites

^^Agreed on both the greatness of the plugin and using zoom-blur. To be honest I don't mind it not having AA because it give me a chance to try out other blurs which in turn created something very funky.

Thanks Madjik.

Share this post


Link to post
Share on other sites
looks good but might i suggest a center chooser sort of like the zoom blur deluxe's: example.png

I haven't choose this for two reasons:

- more complicate for me to program

- not as precise (in %) as sliders in pixels

Share this post


Link to post
Share on other sites
not as precise (in %) as sliders in pixels

Thanks for another cool plugin and agreed.

Share this post


Link to post
Share on other sites
.Sorry no anti-aliasing available!

Could you use a transparent secondary color, then feather it?

Share this post


Link to post
Share on other sites
.Sorry no anti-aliasing available!

Could you use a transparent secondary color, then feather it?

Yes but (...) Hey guys, lot of tuts to create! Let's go!

Share this post


Link to post
Share on other sites
Oooooh very nice MadJik! Yousa gonna be sharin' da source? Mesa curious!

Well, no, NOW he's not...Jar Jar...

In other news, I LOVE this plugin. MadJik is my new favorite person.

EDIT: It's a plugin, not a tut.

Share this post


Link to post
Share on other sites

The good thing with % is there are infinite.

If you make a 10000*10000 canvas, 50% still works, you're not limited to 600px.

M2c.

Share this post


Link to post
Share on other sites
The good thing with % is there are infinite.

If you make a 10000*10000 canvas, 50% still works, you're not limited to 600px.

M2c.

Note for myself : Future version should change the sliders mini/maxi depending on the picture size

The error margin is greater then... 1% of 10000 is how many pixels?

Share this post


Link to post
Share on other sites

Madjik

Just wanted to say I love this plugin; great for backgrounds; nice job.

One small point, though, regarding the "Number of rays in the circle" slider (and this is not a criticism, just an observation).

You cannot render an odd number of rays, yet your slider/arrows and the text entry box allow for selection/entry of odd numbers.

Would there be any way you could get the slider/arrows to go up/down in increments of two?

Maybe I am being a bit picky! Probably just jealousy as I'd love to be able to write plugins.

Share this post


Link to post
Share on other sites

@CJ: Not unless MadJik decides to convert this into a "normal" plugin, as CodeLab does not give you anywhere near enough control over the interface to do that.

Share this post


Link to post
Share on other sites
...CodeLab does not give you anywhere near enough control over the interface to do that.

You say that like it's my fault. :(

Share this post


Link to post
Share on other sites

wellllll it wouldn't be hard to add an option to override the CreateConfigDialog() function....

EDIT: and technically it is your fault, as you're the one who added UI creation to CodeLab in the first place...

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