Jump to content
How to Install Plugins ×

BoltBait & Illnab1024 Gradient Plugin (UPDATED!) v3.0


Illnab1024

Recommended Posts

Okay, here is a quick preview of what should be coming out today or tomorrow:

previewhue.jpg

Yeah, if I can get the HSV fades to work...

Nothing like a little deadline pressure :D

EDIT: I've made the changes to the Render function. Now for Illnab1024 to put the final UI on it. It will now do HSV fades like the one you see above.

Major props goes out to evanolds for writing the RGBtoHSV and HSVtoRGB routines that I used for the HSV fades.

Link to comment
Share on other sites

Okay. UI all finished, and version 2.0 is ready to go! Also, please report any bugs. This is very precise math, and it tends to get wierd.

~~

Link to comment
Share on other sites

Its not clear to me how the HSV fade works?? I see the results, but what exactly does it do?

 

Take responsibility for your own intelligence. 😉 -Rick Brewster

Link to comment
Share on other sites

Its not clear to me how the HSV fade works?? I see the results, but what exactly does it do?

Yeah, could you do a simple tut for us non-advanced users?

sig6rj3.png
Link to comment
Share on other sites

HSV fades along the HSV curve. RGB fades from the primary color to the secondary color.

So, say you choose a green for your primary color and a blue for your secondary color. RGB would fade from the geen to the blue. HSV would fade from the green, through teal, to blue. HSB long would fade from green, through yellow, orange, red, violet, to blue.

For those of you who have PDN 3.0, look at H slider under the More >> tab of the color window. HSV fading fades along that color band, between your two selected colors. HSV long just goes around the long way.

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

Link to comment
Share on other sites

Maybe this will help you understand:

Going from orange to blue...

RGBHSV.jpg

RGB follows a straight path across the color wheel.

HSV follows a curved path around the color wheel.

HSV Long follows a curved path taking the long way around the color wheel.

Other than for making rainbows, why do we need HSV fades? Well, for short distances on the wheel, like from dark blue to cyan, HSV will give a similar but more vibrant fade than RGB.

Clear? :D

BTW, the render function went from 200 lines of code to over 500 for something that I don't think anyone will ever use. Please prove me wrong. Show me something done with one of the HSV fades. Make me feel better about spending a whole day on this.

http://boltbait.googlepages.com/Gradient.dll

Download, install, profit.

Link to comment
Share on other sites

.....BTW, the render function went from 200 lines of code to over 500 for something that I don't think anyone will ever use. Please prove me wrong. Show me something done with one of the HSV fades. Make me feel better about spending a whole day on this.

I think it is awesome, and I will try and utilize it.

 

Take responsibility for your own intelligence. 😉 -Rick Brewster

Link to comment
Share on other sites

wow, really nice plugin :D :wink:

one improvement suggestion: i sometimes need some special angle for the gradient which i can't achieve with the "horizontally", "vertically" and "diagonally" options. would it be possible to enter a custom angle size? :D

Link to comment
Share on other sites

wow, really nice plugin Very Happy Wink

one improvement suggestion: i sometimes need some special angle for the gradient which i can't achieve with the "horizontally", "vertically" and "diagonally" options. would it be possible to enter a custom angle size? Very Happy

I very much agree with that.

Does this plugin have to utilise the primary and secondary colours? When trying to make a background with a gradient tie in with the foreground it takes a few attempts to get the colours right which can be kind of annoying when you have to close the dialogue box, select different pri/sec colors and then re-open it. Is the current pallet script(s) dynamic enough to allow it to be used in situations other than in the 'colors' menu? If it is you could use it let users define the colors inside the dialouge and you could probably also use it to allow for the use of more than two colors in the gradient (excluding HSV).

I also think that some way to determine the ratio of the gradients colours would be another worthy addition (and perhaps also some way to make the gradient change-over more abrupt or more drawn out).

I.e.

gradxn6.png

Great plugin by the way :P

Link to comment
Share on other sites

Harumph...Have to basically make a solo dialog, and see what kind of math will be involved...I will see what can be done...

~~

Link to comment
Share on other sites

aatwo, so it sounds like you would benefit from being able to have access to the Colors window while at the same time interacting with the gradient dialog.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

BTW, the render function went from 200 lines of code to over 500 for something that I don't think anyone will ever use. Please prove me wrong. Show me something done with one of the HSV fades. Make me feel better about spending a whole day on this.

Hey, if nothing else this is proving educational for me when I go to write stuff for v3.0's gradient tool :)

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

wow, really nice plugin :D :wink:

one improvement suggestion: i sometimes need some special angle for the gradient which i can't achieve with the "horizontally", "vertically" and "diagonally" options. would it be possible to enter a custom angle size? :D

No. Just, no. In fact, just come over here so I can smack you around some.

I suggest you create your gradiant on a separate layer and then use the layer rotation function.

Does this plugin have to utilise the primary and secondary colours? When trying to make a background with a gradient tie in with the foreground it takes a few attempts to get the colours right which can be kind of annoying when you have to close the dialogue box, select different pri/sec colors and then re-open it. Is the current pallet script(s) dynamic enough to allow it to be used in situations other than in the 'colors' menu? If it is you could use it let users define the colors inside the dialouge and you could probably also use it to allow for the use of more than two colors in the gradient (excluding HSV).

I also think that some way to determine the ratio of the gradients colours would be another worthy addition (and perhaps also some way to make the gradient change-over more abrupt or more drawn out).

I.e.

gradxn6.png

Great plugin by the way :P

This wouldn't be too hard to add--except for the diagonal fades. Just thinking about the diagonal fades gives me a headache.

aatwo, so it sounds like you would benefit from being able to have access to the Colors window while at the same time interacting with the gradient dialog.

Rick, that would be more handy than you can imagine!

BTW, the render function went from 200 lines of code to over 500 for something that I don't think anyone will ever use. Please prove me wrong. Show me something done with one of the HSV fades. Make me feel better about spending a whole day on this.

Hey, if nothing else this is proving educational for me when I go to write stuff for v3.0's gradient tool :)

Heh. All of the gradiants are pretty straight forward except for the diagonal ones. Good luck with those. The code looks deceptively simple.

Link to comment
Share on other sites

aatwo, so it sounds like you would benefit from being able to have access to the Colors window while at the same time interacting with the gradient dialog.

Well yes I guess I would but I think it would be better to have a seperate rainbow wheel embedded into the gradient plugins dialogue.

Link to comment
Share on other sites

I have written notes on this while I have been gone...and it looks pretty nice so far; all I need is a way to get the angle to y=mx+b form, then I am well set!

~~

Link to comment
Share on other sites

Arctan / inverse tangent

That's what you need for finding the angle.

y=mx+b

m = rise/run

rise/run = y/x

tan(a)=y/x

so...

arctan(y/x)=a

(what I have there is not at all code...I'm not sure of the syntax for the trig functions in PDN source/C#...I've used them in effects before, though, so if you need, I can help figure it all out)

You may need to adjust this in the code a bit (since the images have the origin at the top left not the bottom left), but it should do the job.

Link to comment
Share on other sites

Okay sweet! C# has a lot of functions I don't know about; so does Paint.NET, but that's another story...;)

Edit: I figure this would be in radians, though?

~~

Link to comment
Share on other sites

Edit: I figure this would be in radians, though?

Try a bit to figure it out, and then (if you need it):

To convert from degrees to radians:

pi*(degrees/180)=radians

Radians to degrees:

(radians/pi)*180=degrees

Link to comment
Share on other sites

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