• Content count

  • Joined

  • Last visited

Community Reputation


About kshotts

  • Birthday 01/01/1970

Profile Information

  • Location

Contact Methods

  • Website URL
  1. Woops! My bad. I'm going through a site redesign, and nuked the links. Doh! I've attached the plugins previously on my site to the post in a zip file - just so this won't happen again :-)
  2. That's the way it is! Not only you... New version 2.6 should help a bit. For one, you can stop any active operation... (at least it works for me!) and i stopped blending zero valued pixels - which for flares really improves things (not so much for spheres or diamonds). I'd be curious to hear if it seems any faster to you guys.
  3. Madjik - Yes! Thank you!!!!!!! Can't wait to get home and try this thing out. I was annoyed at the original Twist plugin too, but this looks AWESOME.
  4. Coming - as additional shapes. A couple of the current shapes approximate the earlier attempts very closely, but not exactly, but I'll be happy to add the others in... I may name them "legacy glow" and "legacy flare" or something similar to make it obvious which ones they are. Yeah..... I wish I knew of some speed optimizations. Unfortunately, the system, for every pixel it decides to process, has to then process ((size*2)+1)^2 pixels, which, say, for an image of 800 by 600 with an average size of 50 and, say, a few hundred flares... well... it adds up very quickly! (On the order of millions and millions of pixels... oy!) Plus, it is doing some floating point math behind the scenes: squaring, square-rooting, dividing, multiplying, etc., and that consumes more time than if i could do everything in integer world.... But still, maybe one day something will hit me over the head and point out how it could be made even faster in a simple way... Oh -yes, the source is still coming, so maybe someone else will figure that part out! ;-)
  5. Thanks! I'm glad you're having fun with it. Just FYI too - I also want to add an option that restricts the flare to your existing selection so that you would have pinpoint control over where the flare was generated. I think it would source the color from the Primary color, and probably fade out with Alpha (so it could be on a different layer) rather than the current method... Some of the options become a little meaningless in that world (like min/max size and probability...) but I think it would be cool for that perfectionist nature in me. I just have to figure out how to work the UI without making it even more messy/complicated than it is. And what to call these new options... So far the only appropriate label I can think of is "Select source material:" with options "Selection in current layer", "Ignore layer content and use selection with Primary color", and "Generate layer content" (which would generate the dots and such that sources the flares)... I just can't come up with simpler/shorter terms at the moment. Something will pop in my head eventually, though... anyway, wanted to let you know something like that was coming! :-)
  6. It'd be sort of like that... just need to figure out how I want the interface to work without making the interface more complicated...
  7. At the moment the plugin needs something in the image to "source" the flares and stars. A completely black background pretty much has a zero threshold value, which means the plugin will never find source material to work with. Try it with some random points on the background - you can use either the Stars codelab plugin in this forum (soon to be enhanced... :-) ), or the Add Noise effect; both should work. Or load a picture that has some high contrast so that you can see the effect easily. In all cases, keep the probability low, and if it renders nothing, ramp it up slowly... the higher the probability the more likely you'll freeze your computer while it thinks for every pixel in the image. You can also do the same with "threshold" - ramp it down slowly (again, same caveat applies). Eventually I'd like to give the plugin the ability to generate its own flares without the need for source material, and also give it the ability to render just one shape in the selection, which would allow pin-point control over size and location of the flare. Until then, see if the above helps... :-)
  8. Updated plugin to version 2.1, grab here: Sparkle_Glitter.dll (v2.1) Changes: * Added additional shapes, including a 45 degree rotated flare, an eight-spoke flare (45 + 0 degree rotated flare), and a flare combo which picks 0 degree rotated flare 50% of the time and 45 degree rotated flare the other 50% of the time Modified GUI * Instead of the previous trackbars, the GUI uses an interface similar to Paint Shop Pro: the bar underneath the text box is a slider. It can be clicked/dragged to select values just like a trackbar. Also added a "rnd" button to many of the options - click to get a random number for the given control. (The only control without rnd is the probability control; this is to prevent the number generated being so high that the computer goes nuts trying to create the glitter) * Seed gets the new slider control too, so you can randomly pick a seed, as well as select a specific seed. * Added version/date string on the GUI so you can tell which version you've got * Changed "Brightness" to "Intensity" Anyone got suggestions for more shapes? Or any other suggestions are always appreciated, too :-)
  9. Thanks :-) I've updated the plugin, including these suggestions. Brightness is renamed Intensity, and Seed has a random button :-)
  10. Lots of the credit goes to Madjik... His source code for his plugin helped immensely in building my own UI... Thanks Madjik! :-)
  11. Sparkle_Glitter.dll (version 2, 09/19/07) Found under Render --> Glitter (replaces my previous Glitter plugin, so if you prefer that version, make a backup before downloading!), this plugin lets you generate glowing spheres, diamonds, and flares, with lots and lots of parameters (as evidenced in the above screenshot). Here's an example image using each of the shapes (though not nearly each different combination of options): A short description of each option: Shape: Determines the shape of the glitter. Available shapes are circle, diamond, and two kinds of flares. Threshold: As always, specifies the minimum value of any pixel (in R,G, or B, or A overall) before further processing occurs. Maximum Size: Maximum size of the glitter Minimum Size: Minimum size of the glitter. NOTE: If these two values are different, the system will generate a glitter with a random size between the minimum and the maximum. The only way to generate glitter of a consistent size is to make the two values equal. Probability: For each pixel that is going to be processed, this is the probability it will be processed. For images with LOTS of pixels that'll be processed, use a low probability (like .010); for an image with only a few pixels that will be processed, use a high probability (like 20). Brightness: Adjusts the brightness of the glitter, up to four times. Blend Mode: Determines the type of blending used when rendering the glitter. Available modes: Overwrite, Add, Subtract, Multiply, and Average. "ADD" produces some of the best results, though "Ovewrite" can generate very cool results when using Circle shapes and large sizes (resulting image is similar to molecules... very cool). Subtract works best on bright content (otherwise the glitter isn't very visible). Multiply doesn't do a whole lot at the moment... and average does an average between the area and the glitter, not sure what this can be used for. Seed: Determines the random # seed. Assuming the probability and the threshold aren't changed, you can modify brightness and other options without changing the arrangement of glitter by keeping this number the same. Process Center Pixel: if checked, the center pixel is processed. This means that it is blended with itself. If the blend mode is Add or Subtract or Multiply, then the pixel is modified (Add produces a brighter pixel). Sometimes desirable, sometimes not. Vary Size Based On Value: This varies the size of the glitter based upon the value of the pixel being processed (i.e., a bright pixel produces a brighter piece of glitter). If not checked, the glitter varies between Minimum size and Maximum size irregardless of value. Important Note: Since some options can consume significant CPU time (if lots of glitter ends up being drawn), this plugin comes with a safety: it only renders if "Preview" is checked, or when "OK" is pressed. While this won't stop the plugin from consuming a lot of CPU with bad settings, it does at least prevent just accessing the plugin for the first time on any image from nuking the CPU. For this reason, Preview does not save its state - it must be checked each time it is used to enable real-time updates. Have fun! Source code is coming soon as soon as I package it up into something nice (Thanks to Madjik for such excellent source code in his plugin... :-) ). (This is also re-posted on the first post)
  12. I can only speak for my own plugins - the glitter version does vary in color depending upon the source pixel (esp. if the threshold is set low, but that also comes at a significant increase in CPU time depending on your other settings). But once I figure out how to build a nice UI, it would be cool to have a color filter one could apply... or maybe I could even use the primary/secondary colors... that wouldn't require a new UI at the moment...
  13. I added a link and a copy of part of your post to the front page... You can gaurantee I'm looking through your source code because I've been wanting to add more than three sliders to my UI too...! I think'd also be cool to be able to lump a lot of the options under one larger UI (i.e., one option could be: Glitter, Glow, Star, etc... that would determine the kind of effect... but maybe not... may be out of my league and time available!) I want to at least add a check box that can turn on/off the randomness, and maybe add additional options with regards to the shape of the sparkle.... lots of thoughts rolling around, not enough time to implement... I do want to figure out how to make the firsttime indicator always reset to zero... if I could figure that out I've got a lot of other things I want to try, but until I get that right, I'm hesitant to build a lot of plugins that I'd have to go back and fix once I do figure out the solution..... Any one out there know a solution? Beautiful examples, btw!
  14. Really? What settings are you using? Size of image? Since I've only tested against a black background with white primary color, does it work with that?
  15. A couple more goodies, just because my brain wouldn't let things go.... They aren't perfect, by any means, but they are a little more sane for large images (at least on my computer)... Sparkle_Stars Sparkle_Glitter Sparkle Stars: Located under Render -> Stars, is a lot like Add Noise, except that it is a little more suited to sparse starfields, IMO. The controls are a little wonky, yeah, but the default settings should give a pretty good example. I'd suggest having your primary color be white and fill the background black to see anything of interest... haven't tried it with other settings... should be interesting tho! "Star Probability" indicates how likely any pixel is to become a star; 1000 is equivalent to 10%. "Intensity" affects how bright the resulting stars are; the higher the number the lower the brightness; 1500 seems to do a decent job. "Saturation" indicates whether the stars can have color or not; 255 = lots of color, 0 = grayscale. Sparkle Glitter: Located under Render -> Glitter, is a work in progress - pretty much like all the other things here :-) Be careful with it - the wrong setting can cause your computer to think a VERY long time... Sparkle Glitter has three settings: "Brightness Threshold" (default 200) selects only pixels with a value (in R, G, or B channel) greater than the threshold. (It also expects Alpha to be greater than threshold). "Maximum Glitter Size" (default 100) indicates how large the glitter can become. However this doesn't mean every glitter placed on the image will be this size - there's a lot of randomness going on underneath so that the glitter can be anything from 0 (none) to the full size. "Glitter Possibility" is the change that any pixel that meets the threshold requirements will become a glitter pixel. Keep this low images with lots of pixels that would satisfy this requirement... and by low, I mean between 5 and 15. On smaller images with fewer pixels this can go up much higher, but the small values work best on large images. The default is 5. Glitter takes a few seconds to compute the image before it renders it on-screen, and I'm certain I'm not really doing it the right way, but it was the best I could come up with at the moment to get around Paint.NET's pipelining of the image... Unfortunately this brings with it its own share of bugs... namely when anything less than the entire image(/selection) is on screen, well... it doesn't listen to your changes.... I will post code below and see if anyone else can think of a decent solution... (The problem is in determining when I'm rendering the very first time... I tried to do that by assuming the first thing rendered was the top left of the selection, but that isn't always true... :-( ) Just remember: for best performance of Glitter, keep the threshold high, the glitter size reasonable (especially if you intend to process a lot of pixels over the threshold) and keep the possibility low (within 5-15). Anyway - here's a sample of Glitter: And the code... int Amount1=200; // [0,255]Select Brightness Threshold int Amount2=100; // [0,100]Maximum Glitter Size int Amount3=005; // [0,500]Glitter Possibility Random rNum = new Random(0); bool randomness = true; int FirstTime = 0; Surface tmp; void Render(Surface dst, Surface src, Rectangle rect) { int Threshold = Amount1; int MaxSize = Amount2; double Brightness = 1;//(double)Amount3/100; double Possibility = (double)Amount3/1000; // Delete any of these lines you don't need Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); ColorBgra CurrentPixel; ColorBgra OriginalPixel; int top = selection.Top; int left = selection.Left; int bottom = selection.Bottom; int right = selection.Right; int itop; int ileft; int ibottom; int iright; double val; int xdif; int ydif; double Weight = 0; int size = MaxSize; double Divi = 1; if (rect.Top == selection.Top && rect.Left ==selection.Left) { FirstTime = 0; } FirstTime = FirstTime + 1; if (FirstTime==1) { try { tmp.Dispose(); } catch { } tmp = new Surface( src.Width, src.Height ); for(int y = top; y < bottom; y++) { for (int x = left; x < right; x++) { tmp[x,y] = src[x,y]; } } for(int y = top; y < bottom; y++) { for (int x = left; x < right; x++) { CurrentPixel = src[x,y]; if ( ( CurrentPixel.A > Threshold ) && ( ( CurrentPixel.R > Threshold ) || ( CurrentPixel.G > Threshold ) || ( CurrentPixel.B > Threshold ) ) && ( rNum.Next(0,(selection.Width * selection.Height)) <((selection.Width*selection.Height)*Possibility) )) { if (randomness) { size = rNum.Next(0,(MaxSize * (((Math.Max(Math.Max(CurrentPixel.R,CurrentPixel.G),CurrentPixel.)) - Threshold)/(255-Threshold))); } if (size > 1) { itop = y-size; ileft = x-size; iright = x+size+1; ibottom = y+size+1; if (itop < top) { itop = top; } if (ileft < left) { ileft = left; } if (iright > right) { iright = right; } if (ibottom > bottom) { ibottom = bottom; } for (int y1 = itop; y1 < ibottom; y1++ ) { for (int x1 = ileft; x1< iright; x1++) { xdif = Math.Abs(x1-x); ydif = Math.Abs(y1-y); val = (((size^2)-(Math.Sqrt(size)))-(xdif * ydif)) /Brightness; if (x1==x || y1==y) { val = val - (Math.Max (xdif, ydif)/(Brightness*2)); } val = val * (255/size) ; if (val<0) { val=0; } if (val>255) { val=255; } OriginalPixel = tmp[x1,y1]; OriginalPixel.R = (byte)((double) Math.Min(255,((OriginalPixel.R + (CurrentPixel.R * (val/255)))))); OriginalPixel.G = (byte)((double) Math.Min(255,((OriginalPixel.G + (CurrentPixel.G * (val/255)))))); OriginalPixel.B = (byte)((double) Math.Min(255,((OriginalPixel.B + (CurrentPixel.B * (val/255)))))); tmp[x1,y1] = OriginalPixel; } } } } } } } for(int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { dst[x,y] = tmp[x,y]; } } }