Leaderboard


Popular Content

Showing content with the highest reputation on 05/22/2015 in all areas

  1. 2 points
    Thank you everyone, glad you like them. I use many plugins to make nebulae and many layers with different blending modes. Here is one I made using three separate terragen images blended together in PDN . The haze and planet were made using PDN. Just wanted to show an image that was made using PDN as an image editor and for creation all in one. Sorry, no critters on this planet,lol
  2. 2 points
    Thank you @NN - I'm glad I'm not the only one who found this noun totally un-necessary. Yes, I understand the meaning of 'ignorance': "The condition of being uneducated, unaware, or uninformed." And I found it offensive too. Based on the history of feelings being hurt on this forum, I think more care could have been given in this instance.
  3. 2 points
    I think you need a snappier name though! (Used TR'sContour Filler on the text object first - background from clouds zoomed in)
  4. 2 points
    If someone does not understand code is does NOT make them "ignorant" To me that is insulting!
  5. 1 point
    This is a plugin I wrote to test a method for computing the color gradient, but which might be useful for non-testing reasons. I call it (the rather unwieldy) "Display Color Change Direction" because "color gradient" has another common meaning for plugins, and I didn't want to be confusing. The maximum direction of the color change is shown by the hue. It's in the Effects>Stylize menu. The interface is: The Color Scale controls control the color brightness. To allow for a wide range, I have coarse and fine controls. Color Range expands or compresses the range of colors. Because the colors no longer form a continuous circle, some anomalies may a occur when adjacent colors with almost the same color-change direction are colored with colors at the opposite ends of the color range. This problem can be reduced by using Reflected Color Range. Color Shift shifts the hue around the color circle. Color Phase changes which color is associated with which color-change direction. When the full range of colors is used, it duplicates the function of the Color Shift control. When used with a restricted range, the Color Shift selects which colors are used, and the Color Phase selects how the current range of colors are associated with the color change directions. Reverse Color Order reverses the order around the color circle. Full Circle assigns a direction to the color change. Normally, since the color changes as rapidly in the opposite direction, the direction of maximum color change is between 0° and 180°. When this option is set, a direction is assigned to the color, based on the change in intensity of the back-and-white image. I made True the default, both because I think the images generally look better, and because it makes the encoded color change direction correspond to the PDN color wheel. Reflected Color Range reflects the current color range so instead of the going from the beginning color to the ending color, it goes from the beginning color to the ending color at mid-range, then in the opposite order, back to the beginning color. (E.g., Red->Yellow->Green->Yellow->Red.) This makes the color range continuous around the circle of color-directions, avoiding color anomalies when using restricted color ranges. Transparent Background colors makes the background transparent instead of black. As I've mentioned, the purpose was to test the algorithm, but it can be used to produce some interesting effects. For example, the background for this sig was produced using only Clouds and this plugin: The plugin can also be used for edge detection. For example, by running the plugin, then converting to black-and-white and inverting the colors. Here is the CodeLab code: Hidden Content: // Author: MJW // Name: Display Color Change Direction // Title: Display Color Change Direction // Submenu: Stylize // Desc: Show the direction of the maximum color change as a color. // Keywords: color change direction #region UICode double Amount1 = 10; //[0, 25]Color Scale (Coarse) double Amount2 = 0; //[-1, 1]Color Scale (Fine) double Amount3 = 1.0; //[0, 2]Color Range double Amount4 = 0.0; //[0, 1]Color Shift double Amount5 = 0.0; //[0, 1]Color Phase bool Amount6 = false; //Reverse Color Order bool Amount7 = true; //Full Circle bool Amount8 = false; //Reflected Color Range bool Amount9 = false; //Transparent Background #endregion Surface Src, Dst; int maxX, maxY; double colorScale; bool maxScale; double colorShift; double colorPhase; double colorRange; double colorOrder, colorOrderAdj; bool fullCircle; bool reflectColors; bool transparentBackground; const int middleWeight = 2; const double angleScale = 1.0 / Math.PI; void Render(Surface dst, Surface src, Rectangle rect) { colorScale = 0.002 * (Amount1 + Amount2); if (colorScale < 0) colorScale = 0; maxScale = (colorScale >= 25.0); // If scale is max., display all colors at full range. colorScale *= 4.0 / (2.0 + (double)middleWeight); colorShift = Amount4; colorPhase = Amount5; colorRange = Amount3; if (Amount6) // Sign of scaling chosen to match color menu wheel. { colorOrder = -angleScale; colorOrderAdj = 1.0; } else { colorOrder = angleScale; colorOrderAdj = 0.0; } fullCircle = Amount7; reflectColors = Amount8; transparentBackground = Amount9; Src = src; Dst = dst; Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); int left = rect.Left; int right = rect.Right; int top = rect.Top; int bottom = rect.Bottom; maxX = src.Width - 1; maxY = src.Height - 1; for (int y = top; y < bottom; y++) for (int x = left; x < right; x++) dst[x, y] = FindGradientColor(x, y); } protected ColorBgra FindGradientColor(int x, int y) { ColorBgra MM, UM, UR, MR, LR, LM, LL, ML, UL; ColorBgra gradColor = ColorBgra.Black; int lX, rX, uY, lY; lX = (x == 0) ? x : x - 1; rX = (x == maxX) ? x : x + 1; uY = (y == 0) ? y : y - 1; lY = (y == maxY) ? y : y + 1; MM = Src.GetPointUnchecked(x, y); UM = Src.GetPointUnchecked(x, uY); UR = Src.GetPointUnchecked(rX, uY); MR = Src.GetPointUnchecked(rX, y); LR = Src.GetPointUnchecked(rX, lY); LM = Src.GetPointUnchecked(x, lY); LL = Src.GetPointUnchecked(lX, lY); ML = Src.GetPointUnchecked(lX, y); UL = Src.GetPointUnchecked(lX, uY); int xR = (UL.R - UR.R) + middleWeight * (ML.R - MR.R) + (LL.R - LR.R); int xG = (UL.G - UR.G) + middleWeight * (ML.G - MR.G) + (LL.G - LR.G); int xB = (UL.B - UR. + middleWeight * (ML.B - MR. + (LL.B - LR.; int yR = (UL.R - LL.R) + middleWeight * (UM.R - LM.R) + (UR.R - LR.R); int yG = (UL.G - LL.G) + middleWeight * (UM.G - LM.G) + (UR.G - LR.G); int yB = (UL.B - LL. + middleWeight * (UM.B - LM. + (UR.B - LR.; int xDelta, yDelta, mag2; // The straight-forward implementation. // The change in each color component can either be consdered positive or negative. // Since changing all the signs won't change the magnitude of the change, red is // fixed and blue and green can have either sign. // Compute all four versions and choose the on that gives the largest magnitude. int xDeltaA, yDeltaA, xDeltaB, yDeltaB, xDeltaC, yDeltaC; int mag2A, mag2B, mag2C; xDelta = xR + xG + xB; yDelta = yR + yG + yB; xDeltaA = xR + xG - xB; yDeltaA = yR + yG - yB; xDeltaB = xR - xG + xB; yDeltaB = yR - yG + yB; xDeltaC = xR - xG - xB; yDeltaC = yR - yG - yB; mag2 = xDelta * xDelta + yDelta * yDelta; mag2A = xDeltaA * xDeltaA + yDeltaA * yDeltaA; mag2B = xDeltaB * xDeltaB + yDeltaB * yDeltaB; mag2C = xDeltaC * xDeltaC + yDeltaC * yDeltaC; // Use the one with the largest magnitude. if (mag2A > mag2) { xDelta = xDeltaA; yDelta = yDeltaA; mag2 = mag2A; } if (mag2C > mag2B) { xDeltaB = xDeltaC; yDeltaB = yDeltaC; mag2B = mag2C; } if (mag2B > mag2) { xDelta = xDeltaB; yDelta = yDeltaB; mag2 = mag2B; } if (mag2 == 0) { return transparentBackground ? ColorBgra.Transparent : ColorBgra.Black; } else { // Adjust sign of deltas so yDelta >= 0. This will produce an ATan between 0 and PI. if (yDelta < 0) { xDelta = -xDelta; yDelta = -yDelta; } double magnitude = Math.Sqrt((double)mag2); double xComponent = xDelta / magnitude; double yComponent = yDelta / magnitude; double value = maxScale ? 1.0 : Math.Min(1.0, colorScale * magnitude); // 0 <= hue <= 1.0 double hue = colorOrder * Math.Atan2(yComponent, xComponent) + colorOrderAdj; // If full circle, use the intensity to determine the direction. if (fullCircle) { hue *= 0.5; double intensity = xComponent * (xR + xG + xB) + yComponent * (yR + yG + yB); if (intensity > 0.0) hue += 0.5; } // Adjust the phase before restricting the range. hue += colorPhase; if (hue >= 1.0) hue -= 1.0; // Reflected colors match at the endpoints for better restricted range colors. if (reflectColors) { hue *= 2.0; if (hue > 1.0) hue = 2.0 - hue; } hue = colorRange * hue + colorShift; gradColor = transparentBackground ? HSVtoRGBA(hue, 1.0, 1.0, value) : HSVtoRGB(hue, 1.0, value); return gradColor; } } public ColorBgra HSVtoRGBA(double H, double S, double V, double A) { byte r, g, b; HSVtoRGB(H, S, V, out r, out g, out ; return ColorBgra.FromBgra(b, g, r, (byte)(255 * A + 0.5)); } public ColorBgra HSVtoRGB(double H, double S, double V) { byte r, g, b; HSVtoRGB(H, S, V, out r, out g, out ; return ColorBgra.FromBgr(b, g, r); } public void HSVtoRGB(double H, double S, double V, out byte bR, out byte bG, out byte bB) { // Parameters must satisfy the following ranges: // 0.0 <= H < 1.0 // 0.0 <= S <= 1.0 // 0.0 <= V <= 1.0 // Handle special case of gray (so no Hue) first if ((S == 0.0) || (V == 0.0)) { byte x = (byte)(int)(V * 255.0); bR = x; bG = x; bB = x; return; } H = HueConstrain(H); double R = V, G = V, B = V; double Hi = Math.Floor(6.0 * H); double f = 6.0 * H - Hi; double p = V * (1.0 - S); double q = V * (1.0 - f * S); double t = V * (1.0 - (1.0 - f) * S); if (Hi == 0.0) { R = V; G = t; B = p; } else if (Hi == 1.0) { R = q; G = V; B = p; } else if (Hi == 2.0) { R = p; G = V; B = t; } else if (Hi == 3.0) { R = p; G = q; B = V; } else if (Hi == 4.0) { R = t; G = p; B = V; } else // if (Hi == 5.0) { R = V; G = p; B = q; } int iR = (int)(R * 255.0 + 0.5); int iG = (int)(G * 255.0 + 0.5); int iB = (int)(B * 255.0 + 0.5); bR = (byte)iR; bG = (byte)iG; bB = (byte)iB; } public double HueConstrain(double MyHue) { // Makes sure that 0.0 <= MyAngle < 1.0 // Wraps around the value if its outside this range while (MyHue >= 1.0) { MyHue -= 1.0; } while (MyHue < 0.0) { MyHue += 1.0; } return MyHue; } Here's the (not especially attractive!) icon: Here is the plugin: DisplayColorChangeDirection.zip EDIT: Fixed spelling of "Coarse" (H/T, Djisves). Changed version to 1.1. EDIT: Restored icon, which I forgot in the previous version (sorry about that). Changed version to 1.2. EDIT: Added Color Range control. Changed version to 1.3. EDIT: Added Color Phase control. Changed version to 1.4. EDIT: Removed mostly unnecessary Middle Weight and Original Image controls. Replaced (at Eli's suggestion) White Background with Transparent Background. Added Reflected Color Range for improved colors when using restricted ranges. Changed version to 2.0.
  6. 1 point
    Thanks MJW It works for me too. I wonder if a transparent (alpha) background option could be added (just like white background)
  7. 1 point
    So exactly how does this plugin work ? I have tried it on after running clouds using yellow and red for my colours and I don't get anything like the images posted here.
  8. 1 point
    I will not be entering in any more comps of any kind at this forum in the future. Other than a adding a few images in my gallery or select plugins to my bag of tricks I will also not be adding any comments on any other issues. It seems that no matter what I say, it causes drama so the best medicine for that is to remain silent. If by a slim chance I win this comp please ask the runner up to pick the next theme, I am done.
  9. 1 point
    I have to apologize for accusing MJW of using Neoflames for the entry in SOTW because it is obvious now he used his own plugin which wasn't published at the time so I had no idea it even existed yet when I posted my complaint.
  10. 1 point
    If a descriptive name doesn't pop into your thoughts try an offbeat one. "Rainbow Eye Bleed" - because it makes my eyes whimper....
  11. 1 point
    Excellent work Djisves! It`s always nice to see people adapting a tut to get their preferred result. Best way to learn. The B&W image is super. The diamond necklace just needs a bit of a drop shadow to match the rest of the image. Other than that I can`t fault it.
  12. 1 point
  13. 1 point
    *Thank you ReMake and barbieq! *Thank you barbieq! *Thank you MJW!
  14. 1 point
    @I am always happy for your feedback, and a thousand times thank you very much. @barbieq! Special thanks for the pdf file. I have tried it. Very easy to follow.
  15. 1 point
    This one I have managed to successfully compile and use on PdN 3.5.11 I'll give it a better try later on but in the meantime I like the preliminary results I've obtained. Thanks for sharing, MJW!
  16. 1 point
  17. 1 point
    Here's a little CodeLab plugin the might be helpful. I call it the "Two Color Mixer" ( I chose a name that probably won't be used by some more commonly used plugin). It's in the Effects>Render menu. You can specify two colors, and the percent of the first color. It will fill the current selection (or the whole window if no selection) with the mixed color. Code: Hidden Content: // Author: MJW // Name: Two Color Mixer // Title: Two Color Mixer // Submenu: Render // Desc: Fill a region with a mixture of two colors // Keywords: mix colors #region UICode ColorBgra Amount1 = ColorBgra.FromBgr(0, 0, 0); // First Color ColorBgra Amount2 = ColorBgra.FromBgr(0, 0, 0); // Second Color bool Amount3 = false; //[0, 1] Use Primary Color as First Color and Secondary Color as Second Color double Amount4 = 50; // [0, 100] Percent of First Color in Mixture double Amount5 = 1; //[0, 4] Brightness double Amount6 = 1; //[0, 4] Saturation #endregion // Here is the main render loop function void Render(Surface dst, Surface src, Rectangle rect) { ColorBgra color1, color2; double dr, dg, db, da; byte r, g, b, a; double frac = 0.01 * Amount4; double omfrac = 1.0 - frac; if (Amount3) { color1 = (ColorBgra)EnvironmentParameters.PrimaryColor; color2 = (ColorBgra)EnvironmentParameters.SecondaryColor; } else { color1 = Amount1; color2 = Amount2; } dr = frac * (double)color1.R + omfrac * (double)color2.R; dg = frac * (double)color1.G + omfrac * (double)color2.G; db = frac * (double)color1.B + omfrac * (double)color2.B; da = frac * (double)color1.A + omfrac * (double)color2.A; double min = Math.Min(dr, Math.Min(dg, db)); double max = Math.Max(dr, Math.Max(dg, db)); // Saturation double diff = max - min; double ks = Amount6; if (ks * diff > max) ks = max / diff; dr = max - ks * (max - dr); dg = max - ks * (max - dg); db = max - ks * (max - db); // Brightness double kb = Amount5; if (kb * max > 255.0) kb = 255.0 / max; r = (byte)(kb * dr + 0.5); g = (byte)(kb * dg + 0.5); b = (byte)(kb * db + 0.5); a = (byte)(da + 0.5); ColorBgra mixture = ColorBgra.FromBgra(b, g, r, a); for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { dst[x, y] = mixture; } } } Plugin: TwoColorMixer.zip EDIT: Added the ability to choose the Primary and Secondary Color as the colors to mix. This might be useful, since it more easily allows the Color Selector tool to select the colors. EDIT: Added adjustments for the brightness and saturation of the mixed color. EDIT: See further down in the thread for a 3.5.11-compatible version.
  18. 1 point
  19. 1 point
    Great new additions! I love the smokey effect in the candle.
  20. 1 point
    Fa-bu-lous! Yep. You're quite the artist. The fruit photo manipulation is spot on--who would've ever thought to use Dents for that effect? The pinwheels are excellent. Again, this was quite something. Congrats on getting your work to the Galleria!
  21. 1 point
  22. 1 point
    Very creative use of the plugin - well done!