Jump to content

TechnoRobbo

Members
  • Posts

    1,740
  • Joined

  • Last visited

  • Days Won

    132

Everything posted by TechnoRobbo

  1. Sorry,it turns out that Boltbait had written a similar plugin with more options http://forums.getpaint.net/index.php?/topic/28500-
  2. PDN 3.5 compatible version available. http://forums.getpaint.net/index.php?/topic/30146-trs-simple-light/?p=417409
  3. After all the great suggestions you've made for my plugins, I owed you.
  4. do you mean something like this? Plugin Retracted It's under the Color menu CodeLab Source Code Hidden Content: // Submenu: Color // Name: TR's SimpleLight // Title: TR's SimpleLight- v1.0 // Author: TechnoRobbo // URL: http://www.technorobbo.com #region UICode Pair<double, double> Amount1 = Pair.Create( 0.0 , 0.0 ); // Hot Spot double Amount2 = 0.5; // [0,4] Coverage byte Amount3 = 0; // [1] Type|Normal|Flood|Spot double Amount4 = 1; // [0.5,2] Gain #endregion void Render(Surface dst, Surface src, Rectangle rect) { // Delete any of these lines you don't need Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); int CenterX = ((selection.Right - selection.Left) / 2)+selection.Left; int CenterY = ((selection.Bottom - selection.Top) / 2)+selection.Top; ColorBgra PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor; ColorBgra SecondaryColor = (ColorBgra)EnvironmentParameters.SecondaryColor; int BrushWidth = (int)EnvironmentParameters.BrushWidth; System.Drawing.PointF org =new System.Drawing.PointF( (float)Amount1.First, (float)Amount1.Second); float range = (float)Amount2; ColorBgra CP; for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { float relx = (float)(x - CenterX) / (float)CenterX; float rely = (float)(y - CenterY) / (float)CenterY; float dist =(float) Math.Sqrt((org.X - relx )*(org.X - relx ) + (org.Y - rely)*(org.Y - rely)); float coeff = (dist > range)? 0: (1f - dist/range); coeff *= (float)Amount4; if (Amount3==1) { coeff = (float)Math.Sqrt(coeff); }else if (Amount3==2) { coeff *= coeff; } CP = src[x,y]; float tmp = (float)CP.R * coeff; tmp = (tmp > 255) ? 255: tmp; CP .R = (byte)tmp; tmp = (float)CP.G * coeff; tmp = (tmp>255) ? 255: tmp; CP .G = (byte)tmp; tmp = (float)CP.B * coeff; tmp = (tmp>255) ? 255: tmp; CP .B = (byte)tmp; CP.A = (byte)CP.A; dst[x,y] = CP; } } } not published yet - need to make it 3.5 and Plugin browser compatible.
  5. The one I erased. We took it offline and figured it out.
  6. I think I found it I believe since this variable is not a local variable it's not initialized null but as a default private static Random RandomNumber; so this never executes if (RandomNumber == null) { RandomNumber = new Random((instanceSeed) ^ (randomSeed << 16) ^ (rect.X << 8) ^ rect.Y); } Post Edit http://msdn.microsoft.com/en-us/library/aa691171(v=vs.71).aspx
  7. I haven't tested this yet 'cause I'm not home but what if you changed float Randsize = (float)(myrandoms[c, 2]) / 500;//between 0 and 2 roughly float Randapexh = (float)(myrandoms[c, 3]) / 500; to float Randsize = (float)(myrandoms[c, 2]) / 500f; float Randapexh = (float)(myrandoms[c, 3]) / 500f; read below
  8. Glad I could help, That concentric pattern sure doesn't appear to be the result of the random object, looks like the seed keeps getting injected into the loop. I'll look at that random thing when I get home.
  9. You can mimic a light source by creating an empty layer on the top of the stack, with a multiply blend mode and a white to black gradient Use Curve to adjust lighting.
  10. Red Try following every graf.FillPath(YourGradientBrush, YourPath); with a graf.DrawPath(new Pen(YourGradientBrush), YourPath); you may not need to backfill anymore
  11. Red, I'd like to say, brilliant!!!! I'll have to dissect the code a bit and get back to you, but first I wanted to tell you how awesome this looks.
  12. It's called progress . If you don't build a better mouse trap how else do you catch a better class of mice?
  13. I agree that HSV is not perfect due to it's conical shape the properties merge into a point This confuses the data. Midora's Cylindrical color space may hold a better solution. A cylindrical colorspace would keep shades and tints parallel and make the adjustment more intuitive. In other words red can go black but still be red and when lightened it would retain it's red identity and not turn grey.
  14. Hi Dank5, Here's a few tips: First select the Clone Tool Set your brush size to something you can see - try 100. The cursor's circle will increase. Holding the Ctrl Key down will make a small anchor appear in the center of the circle. While holding Ctrl left click to mark the point to start copy. Click (no Ctrl) on the point you want to start the paste. Set the hardness slider to a low number like 25 to get really good feathering - less destructive - better blending. As you hold down the mouse you will notice that the copy circle and paste circle move together, to change their relationship repeat step 2. Here's a video example I did while having coffee this morning I slowed down the important parts Click on full screen for better viewing
  15. I tested that and it kept the same V. watch it fullscreen for HD image
  16. Sorry I didn't understand the thing about moire patterns. I don't have moire patterns there, I have a smooth gradient. And red, yellow and green are not opposing each other. the gradients from black our out of phase I would rather argue that the current implementation is not HSV. For example, "V" in HSV stands for Value, or lightness / brightness. Draw something in bright yellow color and change its hue by 180. The color will become deep blue, which is obviously darker, i.e. has different V (value). are you sure it's not the same S(Saturation). S affects V and vice versa. In other words if you change the V you can't maintain the S and if you change the S you cant maintain the V. Wow, code, something interesting. How do I run it? CodeLab
  17. If you whistle and hum at the same time, whenever you left click,it sounds like a death ray
  18. a double cone is an HSL color space. Complex indeed, color spaces are artificial constructs to catalog what is a purely analog phenomena - the continuously decreasing wavelength and increasing frequencies of electromagnetism. We are trying to quantify and interpret the un-quantifiable, you can never have a resolution small enough. Perhaps a photon.That being said this code performs the same demo in RGB - since RGB is a cube the creases move laterally and not in a circular fashion.Use it on the Alchemists example. Hidden Content: #region UICodeint Amount1 = 0; // [0,255] Rint Amount2 = 0; // [0,255] G Descriptionint Amount3 = 0; // [0,255] B#endregionvoid Render(Surface dst, Surface src, Rectangle rect){ ColorBgra CurrentPixel; for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { CurrentPixel = src[x,y]; int r = Math.Abs((int)CurrentPixel.R - Amount1); int g = Math.Abs((int)CurrentPixel.G - Amount2); int b = Math.Abs((int)CurrentPixel.B - Amount3); CurrentPixel= ColorBgra.FromBgraClamped(b,g,r,255); dst[x,y] = CurrentPixel; } }} It's merely to show the effect is about out of phase patterns and not HSV since we are using RGB.
  19. Awesome Pixey!!! ( or as dolphins say Click whistle squeak) +1 You know what they say about great minds...... they come to the same conclusion about making bubbles at approximately the same time.I'm paraphrasing, of course.
  20. I don't know guy, I could be wrong but, to me it looks like your rotating a moire pattern around due to the modular mathematics shifting the grey scales which are already in an opposing pattern. In other words the as the 255's become zero, the zeros become 128's and the 128's become 255's the moire pattern evolves especially since the images are initially out of phase. Isn't the RGB color space a cube and constant saturation the euclidan distance from zero, therefore a dome? Wouldn't changing the way HSV is calculated warp the hexacone colors space and therefore can no longer be considered HSV?
  21. "A lot of times, people don't know what they want until you show it to them." , Steve Jobs

  22. Thanks Red A famous dude once said, "A lot of times, people don't know what they want until you show it to them." I think that dude sold some kind of produce, oranges or something like that.
×
×
  • Create New...