Jump to content
How to Install Plugins ×

Lightning v1.1


Cookies

Recommended Posts

Hello, this is my first plugin, if you think recognize it then it might be true (clicky clicky).

I have been working on it for some time now, and i think it's ready to be released, i got a lot of help from EER and MadJik

And it does what it say, it creates a lightning BUT without you need to start by drawing a gradient, but it's still possible to use a premade gradient :)

Some screenshots of what it can do

The most obvious use:
Screenshot%20-%2036[1].jpg 

Gradients are also possible:
Screenshot%20-%2038[1].jpg 

And the the not-at-all obvious use:
Screenshot%20-%2037[1].jpg 

Hope you enjoy using it :)

 

Download:

Lightning.zip

 

Edited by toe_head2001
Attached patched version
CookiesSigPDN2.png
Link to comment
Share on other sites

@Jackpelter: My first shot at the plugin meant that it had to be used over a premade gradient.

@Cookies has rewritten the effect so that it can be run in exactly the same way (over a premade gradient), and also can create the gradient on the fly from within the effect dialog.

There really is no reason that my plugin should be kept - as this version will do the same job.

Link to comment
Share on other sites

The plugin keeps crashing for me.

Here's the error details

File: C:\Program Files\Paint.NET\Effects\Lightning.dll
	Name: LightningC.LightningC
	Version: 1.0.3892.21014
	Author: Cookies
	Copyright: Copyright © Ego Eram Reputo
	Website: http://www.getpaint.net/redirect/plugins.html
	Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.NullReferenceException: Object reference not set to an instance of an object.
at PaintDotNet.Effects.CloudsEffect.OnRender(Rectangle[] renderRects, Int32 startIndex, Int32 length) in D:\src\pdn\pdn_35x\src\Effects\CloudsEffect.cs:line 137
at PaintDotNet.Effects.Effect`1.Render(Rectangle[] renderRects, Int32 startIndex, Int32 length) in D:\src\pdn\pdn_35x\src\Effects\Effect`1.cs:line 57
at LightningC.LightningC.Render(Surface dst, Surface src, Rectangle rect)
at LightningC.LightningC.OnRender(Rectangle[] rois, Int32 startIndex, Int32 length)
at PaintDotNet.Effects.Effect`1.Render(Rectangle[] renderRects, Int32 startIndex, Int32 length) in D:\src\pdn\pdn_35x\src\Effects\Effect`1.cs:line 57
at PaintDotNet.Effects.Effect`1.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length) in D:\src\pdn\pdn_35x\src\Effects\Effect`1.cs:line 100
at PaintDotNet.Effects.Effect.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois) in D:\src\pdn\pdn_35x\src\Effects\Effect.cs:line 211
at PaintDotNet.Effects.BackgroundEffectRenderer.RendererContext.Renderer(EffectConfigToken token) in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 127
--- End of inner exception stack trace ---
at PaintDotNet.Effects.BackgroundEffectRenderer.DrainExceptions() in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 372
at PaintDotNet.Effects.BackgroundEffectRenderer.Join() in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 363
at PaintDotNet.Effects.BackgroundEffectRenderer.Abort() in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 327
at PaintDotNet.Effects.BackgroundEffectRenderer.Start() in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 274
at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClass1d.<>c__DisplayClass21.<RunEffectImpl>b__10() in D:\src\pdn\pdn_35x\src\PaintDotNet\Menus\EffectMenuBase.cs:line 827

ndeee2.png

Link to comment
Share on other sites

The plugin keeps crashing for me.

Here's the error details

{error}

Strange, a friend of mine also told me about it crashed at him, but no matter what i do i cant recreate it, i also asked my friend how he got it crashing his answer was "I just changed some values with transparent background and 2 layers"

So now i ask you, how did you get it crashing?

edit: Are you using 32bit? I asked my friend he says he use 32bit (OS), dont know if thats the problem, but to others if it works/not works are you then using 32bit or 64bit?

Edited by Cookies
CookiesSigPDN2.png
Link to comment
Share on other sites

I use 32 bit.

Tried it with multiple wild settings adjustments, no problem so far.

Hmmm, wondering whats causing the problem then, but good to hear it isn't 64 bit only  :lol: Was getting afraid of using a lot of time tomorrow in school to figure out how to get it working on 32 bit  :fear:

CookiesSigPDN2.png
Link to comment
Share on other sites

 Well, would just ask you what you would think of a checkbox "Repeat gradient" So, lets say we take ellipse, set the width to 50 then it will draw the ellipse 2 times by the side of each other, width 25, 4 ellipses, just asking if you would think it makes the UI too complicated  :roll:, and on a side note i'm working on a triangle gradient, i can take gradient request but it's not 100% sure ill make them if they're too complicated   :lol:

Edited by Cookies
CookiesSigPDN2.png
Link to comment
Share on other sites

New version! v1.1 is out!

Added Triangle and Star shapes for gradient options

Gradient control (gradient mode, angle, width, height and show gradient) are now disabled when "Use premade gradient" is checked

Changed default width to 10% and default angle to 90

Link in the first post is updated

CookiesSigPDN2.png
Link to comment
Share on other sites

  • 5 months later...

I'm REALLY looking forward to playing around with this - thanks so much for making it! One question, though: Does anyone here know if it's possible to create something like this that lets you specify a beginning and ending point for the lightning bolt, or maybe adjust its width or something? I'm thinking of using this to create realistic looking rivers, and being able to dictate somewhat where it goes would be beyond awesome... but since I'm not a programmer I have no idea whether that's even theoretically possible.

Anyway, like I said, nifty-looking plugin, can't wait to apply it!

Cheers,

Heather

Link to comment
Share on other sites

Use your own gradient and you should be able to customize where the effect appears. The lightning will be rendered across the gradient, i.e. along a consistent color band - not from dark to light. If you also clip the gradient to define it's width (for example) the effect should not extend beyond the borders.

Link to comment
Share on other sites

  • 3 years later...

So I grabbed this plugin in a while ago on my old computer (Win 7 home premium, 64 bit), and it worked fine.

 

I copied over the files from the effect folder I had (so I wouldn't waste ages finding all the old plugins I used) to this new computer, and now I'm getting crashes.

 

Running PDN 4.0, win 8.1 64 bit. 

 

I get the following error.

File: C:\Program Files\Paint.NET\Effects\Lightning.dll

Name: LightningC.LightningC
Version: 1.1.3896.32593
Author: Cookies
Copyright: Copyright © Cookies
Website: http://www.getpaint.net/redirect/plugins.html
Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
at PaintDotNet.Effects.PropertyBasedEffectConfigToken..ctor(PropertyCollection propertyCollection) in D:\src\pdn\pdn_3_5_11\src\Effects\PropertyBasedEffectConfigToken.cs:line 75
at LightningC.LightningC.Render(Surface dst, Surface src, Rectangle rect)
at LightningC.LightningC.OnRender(Rectangle[] rois, Int32 startIndex, Int32 length)
at PaintDotNet.Effects.Effect`1.Render(Rectangle[] renderRects, Int32 startIndex, Int32 length) in D:\src\pdn\pdn_3_5_11\src\Effects\Effect`1.cs:line 57
at PaintDotNet.Effects.Effect`1.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length) in D:\src\pdn\pdn_3_5_11\src\Effects\Effect`1.cs:line 100
at PaintDotNet.Effects.Effect.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois) in D:\src\pdn\pdn_3_5_11\src\Effects\Effect.cs:line 211
at PaintDotNet.Effects.BackgroundEffectRenderer.RendererContext.Renderer(EffectConfigToken token) in D:\src\pdn\pdn_3_5_11\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 129
--- End of inner exception stack trace ---
at PaintDotNet.Effects.BackgroundEffectRenderer.DrainExceptions() in D:\src\pdn\pdn_3_5_11\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 374
at PaintDotNet.Effects.BackgroundEffectRenderer.Abort() in D:\src\pdn\pdn_3_5_11\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 330
at PaintDotNet.Effects.BackgroundEffectRenderer.Start() in D:\src\pdn\pdn_3_5_11\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 277
at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClass1d.<>c__DisplayClass21.b__10() in D:\src\pdn\pdn_3_5_11\src\PaintDotNet\Menus\EffectMenuBase.cs:line 827

 

Any help on this? x.x

 

Mind you, it DOES work, but you have to be fast. Any longer than ~ 3 seconds on the menu and it will cause a crash. At least if you move it, it crashes quickly. If you just don't move the options menu (which obscures the image... XD), it doesn't crash nearly as quickly.

 

It does still end up crashing however :/

Link to comment
Share on other sites

The plugin author hasn't been around for a while.  I may have the source code around somewhere.  If so I'll have a look at it this weekend.

 

 

"Oh I feeeel it, coming back again.  Like a roll of thunder chasing the wind.  Forces pulling from the center of the earth again....."  Geddit?  Lightning Crashes?  Oh well :(

Link to comment
Share on other sites

I've just downloaded and retested the DLL on my system (v 4.0.5242 & Win7). There is no hint of a crash anywhere and its the same DLL version you're using.

Can you confirm which version of PDN 4.0 this is broken in?

Try downloading & reinstalling it again just in case you have a corrupt file.

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

×
×
  • Create New...