Jump to content


Photo

Gradient Effect Plug-In


  • Please log in to reply
61 replies to this topic

#1 pleska

pleska
  • Members
  • 12 posts
  • Reputation:0

Posted 07 June 2006 - 08:47 PM

Well its not spectacular but it gets the job done. This plug-in produces a gradient fill between your current primary and secondary colors. It uses the overall selected rectangle as the distance for the gradient fills. It supports 5 basic types of gradient fills: Vertical, Horizontal, Radial (from center of rect out), Diagonal and Reverse-Diagonal. If you want the fill to go the other way you reverse the colors.

Also it has a special ability to use a mask color. This color will be the only area where the gradient fill will occur within the selected region. I did this after running into lots of math problems with wierd regions, if you want to see the wierd region problems create a very irrigular selection and try some of the fills.

Attached is the link to a zip file. Unzip it and put the single DLL that is inside this zip file in your effects folder and then launch the paint.net app. It should appear on your effects menu as a new effect.

btw. This was built with paint.net v2.63 and if you want source let me know here.

Thanks,

Paul

http://www.sapphireo...dientPlugIn.zip

#2 Crazy Man Dan

Crazy Man Dan

    Former Moderator

  • Members
  • 4,227 posts
  • LocationWisconsin
  • Reputation:10

Posted 07 June 2006 - 09:27 PM

Nice! Works well from what I've been able to tell so far. I did notice the odd behavior you mentioned with strange selection shapes, but the result was actually rather interesting.

Thanks!
Dan

I am not a mechanism, I am part of the resistance;
I am an organism, an animal, a creature, I am a beast.
~ Becoming the Archetype


#3 Bob

Bob
  • Members
  • 3,033 posts
  • LocationLyon, France
  • Reputation:3

Posted 07 June 2006 - 09:51 PM

Please just invert the Cancel & Ok buttons.

However: a must-have!

#4 S0S

S0S
  • Members
  • 50 posts
  • LocationJax, FL.
  • Reputation:0

Posted 07 June 2006 - 11:43 PM

This is a very good plug-in.

It is somewhat similar to the gradients that can be produced by the Gimp.

I concur that the "OK" and "Cancel" dialog boxes should be moved.

5 stars.
Posted Image

#5 pleska

pleska
  • Members
  • 12 posts
  • Reputation:0

Posted 08 June 2006 - 05:12 AM

Thanks all for the feedback. I updated the zip file with a new DLL that has the OK and cancel button positions changed. I also gave them their correct enter/escape status on the form.

Enjoy

:) Paul

#6 aatwo

aatwo
  • Members
  • 563 posts
  • Reputation:0

Posted 08 June 2006 - 05:59 PM

really cool!!!

a user defined angle would be splendid however it is awesome how it is.

#7 Illnab1024

Illnab1024
  • Members
  • 1,298 posts
  • LocationMiddle Tennessee
  • Reputation:5

Posted 08 June 2006 - 06:21 PM

Finally...
This is why I love mathematics. It applies!

Also, in the spirit of open source freeware, could you release the source code?
~~

#8 Pc dokter

Pc dokter
  • Members
  • 44 posts
  • LocationAntwerp, Belgium
  • Reputation:0

Posted 08 June 2006 - 07:48 PM

Good job

are you going to release the source ?

#9 Crazy Man Dan

Crazy Man Dan

    Former Moderator

  • Members
  • 4,227 posts
  • LocationWisconsin
  • Reputation:10

Posted 08 June 2006 - 08:07 PM

At the end of the last line of his post:

btw. This was built with paint.net v2.63 and if you want source let me know here.


Since two persons have expressed an intrest in the source, he'll probably provide the information next time he's on. :)

I am not a mechanism, I am part of the resistance;
I am an organism, an animal, a creature, I am a beast.
~ Becoming the Archetype


#10 pleska

pleska
  • Members
  • 12 posts
  • Reputation:0

Posted 09 June 2006 - 10:32 PM

Glad you all like the plug-in. The source is at

http://www.sapphireo...lugInSource.zip

Enjoy,

:) Paul

#11 trickman

trickman
  • Members
  • 1,151 posts
  • LocationLeiria, Portugal
  • Reputation:1

Posted 15 June 2006 - 11:30 AM

Wow! Five stars!
Posted Image

#12 crosswalker

crosswalker
  • Members
  • 168 posts
  • Reputation:0

Posted 15 June 2006 - 03:03 PM

btw. This was built with paint.net v2.63


Where is this in 2.63? I didn't see the effect till I downloaded the dll.
Posted Image

#13 Pc dokter

Pc dokter
  • Members
  • 44 posts
  • LocationAntwerp, Belgium
  • Reputation:0

Posted 15 June 2006 - 03:13 PM

This plugin is not standard aviable in Paint.NET, you have to download it yourself and install to use it.

#14 Crazy Man Dan

Crazy Man Dan

    Former Moderator

  • Members
  • 4,227 posts
  • LocationWisconsin
  • Reputation:10

Posted 15 June 2006 - 03:25 PM

Yeah crosswalker, I believe that by that he meant it was built to work under the PDN 2.63 structure.

And just so you know, pleska, your gradient effect plug in will be featured in an upcoming video tutorial I'll be making to supplement my existing glass orbs tutorial! :D

I am not a mechanism, I am part of the resistance;
I am an organism, an animal, a creature, I am a beast.
~ Becoming the Archetype


#15 Valen

Valen
  • Members
  • 10 posts
  • Reputation:0

Posted 15 June 2006 - 05:06 PM

Is anyone else having trouble doing Radial gradients? All the other gradients seem to work fine for me, but for some reason Radial just doesn't want to.

#16 Crazy Man Dan

Crazy Man Dan

    Former Moderator

  • Members
  • 4,227 posts
  • LocationWisconsin
  • Reputation:10

Posted 15 June 2006 - 05:26 PM

I'm really not sure what the deal is with Radial. I guess I'd expect the center of the gradient to be in the center of the selection, but it never seems to end up in the same place...

I am not a mechanism, I am part of the resistance;
I am an organism, an animal, a creature, I am a beast.
~ Becoming the Archetype


#17 Valen

Valen
  • Members
  • 10 posts
  • Reputation:0

Posted 15 June 2006 - 06:49 PM

That's odd, I think I'm doing something wrong then because I get no effect at all. Like, the entire circle does a fill with my primary color and the secondary is nowhere.

Oh well, still nice to have the other gradients!

#18 Crazy Man Dan

Crazy Man Dan

    Former Moderator

  • Members
  • 4,227 posts
  • LocationWisconsin
  • Reputation:10

Posted 15 June 2006 - 06:58 PM

It depends on where the selection is, I think.

I did a small rectangle in the upper-left of the image, and I got a radial gradient, but the center was down low in the selection, cutting of the bottom part of the fade. Then I did a large rectangular selection more in the middle of the image, and the center of the gradient was somewhere off the right side of the canvas, as the fade only caught a bit of the lower right corner.

I don't know. It'd be a plus to figure out what's going on, but I just love the plug-in so much for vertical gradients, I can't fault it. :)

One thing I did notice though, pleska:
You have Diagonal and Reverse Diagonal fades in your drop-down. The Diagonal fades from Foreground to Background from the top-left to the bottom-right [\]. Reverse Diagonal fades from Background to Foreground along the same line.

Since this effect can be achieved by switching the Foreground and Background colors around, would it be possible to make the Reverse Diagonal option make the fade from lower-left to upper-right [/]? Right now there is no way to do this other than reversing the layer.

Anyway, that's enough of my nit-picking for one day. :D

I am not a mechanism, I am part of the resistance;
I am an organism, an animal, a creature, I am a beast.
~ Becoming the Archetype


#19 pleska

pleska
  • Members
  • 12 posts
  • Reputation:0

Posted 16 June 2006 - 09:41 PM

Hi all,

Glad you like the gradient plug in. When I get back from vacation in a week I will look at adding the up-slope gradients in addition to the two that currently are in there. I really just ran out of time. Also, yes, I did mean to indicate that I built it against that version of Paint.Net. Wasn't sure how backwards compatible the plug-in model was so I thought I would mention it.

Regarding gradients, the plug-in basically looks at the rectangle that encloses the selection, or the entire image if no selection is available. It then uses that rectangle for the basis (i.e. the start, end and increment of color to use across that rectangle). In the case of the radial gradient, which I might have messed up, I divide that rectangle by 2 and start going out from there, going from the primary color to the secondary color. If you have masking turned on make sure your selection rectangle is centered over the general area you want to make your gradient in. Either way, I will look to see if I messed up something in that fill when i add the other two fills in the plug-in in a week or so.

Btw. I love this Paint.NET program, I keep thinking of new ideas to add to it.

Thanks,

:) Paul Leska

#20 pleska

pleska
  • Members
  • 12 posts
  • Reputation:0

Posted 16 June 2006 - 10:02 PM

Hi all quick note. I just updated the Zip file on the server and fixed the radial gradient, it was way messed up. In a week I will get back and hopefully can add the other directions. Just get the new zip and replace the DLL in the zip with the bad one already in your effects directory and relaunch PDN.

http://www.sapphireo...dientPlugIn.zip

Thanks for finding the bug.

Paul