Jump to content

MJW

Members
  • Posts

    2,863
  • Joined

  • Last visited

  • Days Won

    70

Everything posted by MJW

  1. You should choose a more descriptive thread name. Imagine if every thread asking for help were called "Help me!" It's rule 6 of the forum rules: Thread titles must be descriptive and specific -- NOT generic. I think from what you've said, you can probably just use the Windows file explorer (the built-in Window program that lets you look at folders and files) to rename the file. Just right click on the file, choose "rename" from the drop-down list, and type the name with the correct extension. Windows will ask you if you're sure you want to change the extension. I assume you are sure. You can actually do the same from within PDN. Just click on "File>Open" and when it brings up the file menu, right click on the file and rename it. If things work right, you should now be able to open the file. EDIT: My other right! Right click, don't left click. EDIT 2: Decided it made more sense to use File>Open instead of File>Save As.
  2. It's easy to do with a few controls, and (as I mentioned in a reply to Rick) I've done that on occasion. When it's done with a plugin like Texture Shader that has around a dozen control values, it's a mess to have to save and compare shadow copies for each value. And plugins with many controls are the ones that waste the most time redoing the setup for every ROI. I think the control dirty flag is a very useful idea which is trivial to implement and easy to use, but apparently I'm alone it that opinion. (I'd forgotten when I replied to Rick that I'd actually posted code using the shadow-copy method. I only remembered using it for a few non-posted plugins.)
  3. The "get a suntan idea" is silly. I suggest you hit the gym, and build a body like Arnold's at his prime. That would eliminate the need to superimpose your face on his body. If that's not practical, then besides Darty's very useful blending suggestion and the contrast adjustments, you might try BoltBait's Hue / Saturation+. There are number of other recolor plugins that might also be useful, along with the built-in Recolor Tool. As others have said, you need the lighting to be similar or the result will never look right. If the lighting is from opposite directions, you might try flopping the image of Arnold.
  4. Thanks Drew! Perhaps I'll try my hand at one o' them thar vertical sigs!
  5. The confusion is understandable. it's been a long, long time since I've seen a vertical entry. Maybe the rules should make clear whether they're allowed. When struggling to find a concept that fits within the size constraints, I've considered using a vertical format, but decided not to. First, because I wasn't certain they're still permitted; and second, because they don't really seem to me to be practical as sigs. I'd think they would make the height of even short comments rather excessive.
  6. I don't know the current rules, but it used to be that the dimensions could be either horizontal or vertical. In fact, there was a SOTW devoted to vertical sigs.
  7. All PDN (except the Chat Noir image from the poster). The sign font is Las Enter (personal use) by Måns Grebäck, downloaded from dafont.com. The brick wall is based on Welshblue's fabulous tutorial, with the Texture Shader used for some steps. The random variation of the brick colors was done with pyrochild's pixelate+, along with my Offset Alternating Stripes. (And I'm actually very fond of dogs, even though they do sometimes drool.) EDIT: Applied Ed Harvey's Vibrance plugin, which improves the sign, and also seems to give the image a little more "nighttime" feeling.
  8. I was wrong about there being a bug for -90°. It works exactly as it's supposed to, just not how I expected. When rotated -90°, the leftmost column is differently shifted than the second column. I thought that was an error, but it's not. For that rotation, the leftmost column is x=0, so it should be an odd stripe (since the stripes are numbered from 1), while the next column is x=-1, which is the last column of an even stripe. The Phase control can be used the shift the starting point left.
  9. I think there's a place for both. I've often used AA's Assistant to intentionally erode an object's edge, but at other times that behavior is a detriment.
  10. PDN does not do batch processing. For suggestions for some programs that do, you might check here. Converting rectangles to squares seems non-trivial, unless you're willing to just crop equally on each side of the the longer dimension.
  11. I was curious about how Red ochre and others got it to compile. I'm sort of glad it was a strange error; I was worried it was something completely obvious, and I looked like a fool.
  12. Whatever it is, when I cut and paste it into CodeLab, I get four unclosed-parentheses errors. I'll untangle what this horribly formatted code is doing once I have a version that compiles.
  13. Perhaps what to do is obvious, and I'm just being dense, but I can't compile the code under CodeLab because of lines like: if((x>selection.Left) && (x { Is it supposed to be: if((x>selection.Left) && (x<selection.Right)) That seems most likely, but there are other possibilities.
  14. To my considerable annoyance, I found another bug. With a -90° angle, the stripes are shifted half a pixel right. As soon as have time to figure out the best way to fix it, I will. EDIT: Actually, it was a full pixel from what I expected, not half a pixel, but as I explain in a later comment, it isn't a bug.
  15. If I may be so bold as to offer a suggestion, for the Eve Torres photo, you might experiment with two effects. The first is the built-in Effects>Blurs>Surface Blur, and the second is Michael Vinther's intriguing plugin, Effects>Photo>Laplacian pyramid filter. Both can be used to add a more digitally-painted look to photos, which I think would help blend the photo with the drawn image. The Laplacian pyramid filter is usually used to enhance details, but for a digital look, it's used to smooth the details. It often works well to follow up with the built-in Effects>Photo>Sharpen. There's also a tutorial by WelshBlue on how to Get the Digitally Painted Look.
  16. I probably would, because I don't think 45° is the best default. On the other hand, I may be looking at the plugin with my original purpose in mind, which was to offset horizontal stripes, with the angle control just added as a bonus. Perhaps to others, 45° is as logical a default as any. It's up to you. Either would be perfectly usable.
  17. The double slider is, I think, the best solution. A double slider isn't as elegant as an angle control, but isn't functionally much worse. I'm very happy BoltBait eliminated the old 45° restriction, which really reduced the usefulness of angle controls.
  18. A very imaginative use of the plugin, Eli!
  19. Thanks, Maximilian! I'll add a link in my original comment. Did you replace the angle control with a double or integer slider, or did you use the angle control with the 45° default?
  20. I believe I've fixed the bug. I also discovered and fixed a multi-threading bug caused by moving a line of code without deleting the original line.
  21. lynxster4, off hand, I don't know what causes that, but I'm sure it can be fixed. I'll look into it. I suspect there are cases where the line-number calculation produces a negative value prior to integer truncation. EDIT: I'm almost certain that's the problem. I'll try to fix it later tonight.
  22. Here is the plugin you've been waiting for!!! Just kidding. This is a plugin I developed for a specific purpose, that I decided to release in case anyone has a use for it. As the Help menu says: Offset Alternating Stripes offsets alternating stripes of pixels selected distances. Stripe Width is the width of the stripes in pixels. Odd Offset is the number of pixels to offset the first stripe and all other odd numbered stripes. Even Offset is the number of pixels to offset the second stripe and all other even numbered stripes. Stripe Phase moves the point at which the first stripe begins. Stripe Angle rotates the direction of the stripes. Edge Behavior specifies how to handle points that are shifted beyond the edge of the image. The options are None, Wrap, or Clamp. Quality specifies the amount of antialiasing to use. A value of one disables antialiasing. Higher values increase the number of samples per pixel. Generally, no antialiasing is needed when the Width and Offsets are integer values. Here is the user interface: Here is an example of the plugin applied to an image: Here is the CodeLab source: Hidden Content: // Name: Offset Alternating Stripes // Submenu: Distort // Author: MJW // Title: Offset Alternating Stripes // Version: 1.0.* // Desc: Offsets alternating stripes of a selected width by specified amounts // Keywords: offset alternating stripes // URL: // Help: #region UICode DoubleSliderControl Amount1 = 20; // [1,1000] Stripe Width DoubleSliderControl Amount2 = 0; // [-1000,1000] Odd Stripe Offset DoubleSliderControl Amount3 = 20; // [-1000,1000] Even Stripe Offset DoubleSliderControl Amount4 = 0.0; // [-0.5,0.5] Stripe Phase AngleControl Amount5 = 0; // [-180,180] Stripe Angle RadioButtonControl Amount6 = 0; // [1] Edge Behavior|None|Wrap|Clamp IntSliderControl Amount7 = 1; // [1,5] Quality #endregion Surface Src; int edgeBehavior; float Syx, Syy, Syw; float evenX, evenY, oddX, oddY; void Render(Surface dst, Surface src, Rectangle rect) { Src = src; bool antialias = (Amount7 != 1); if (antialias) SetupForSubpixels(Amount7, Amount7); edgeBehavior = Amount6; float width = (float)Amount1; double ang = (Math.PI / 180.0) * Amount5; float Mxx = (float)Math.Cos(ang); float Myx = (float)Math.Sin(ang); float Mxy = -Myx; float Myy = Mxx; // Set up the offset distances. I tend to think of the initial line is even, // but then I can't really call it the first line. oddX = Mxx * (float)Amount2; oddY = Mxy * (float)Amount2; evenX = Mxx * (float)Amount3; evenY = Mxy * (float)Amount3; // Calculate the values used to calculate the stripe number. Only the low bit of the // result matters. It's used to determine if it's and odd or even stripe. float widthRecip = 1.0f / width; Syx = widthRecip * Myx; Syy = widthRecip * Myy; // Calculate the offset. Include the phase. Add a large number to always make // the result positive. Use an odd number so the first line is odd. Add half the // width-scaling value for rounding. Syw = (float)Amount4 + 40001.0f + 0.5f * widthRecip; for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; float fy = (float)y; for (int x = rect.Left; x < rect.Right; x++) { float fx = (float)x; if (!antialias) dst[x, y] = GetTransformedPixel(fx, fy); else dst[x, y] = GetTransformedPixelAA(fx, fy); } } } ColorBgra GetTransformedPixel(float fx, float fy) { // Get the rotated, scaled, and offset Y distance as an integer stripe number. int dy = (int)(Syx * fx + Syy * fy + Syw); if ((dy & 1) == 0) { fx -= evenX; fy -= evenY; } else { fx -= oddX; fy -= oddY; } if (edgeBehavior == 0) return Src.GetBilinearSample(fx, fy); else if (edgeBehavior == 1) return Src.GetBilinearSampleWrapped(fx, fy); else return Src.GetBilinearSampleClamped(fx, fy); } ColorBgra GetTransformedPixelAA(float fx, float fy) { int b = 0, g = 0, r = 0, a = 0; fy += ssYStart; float bx = fx + ssXStart; for (int iy = 0; iy < ssYSamples; iy++) { fx = bx; for (int ix = 0; ix < ssXSamples; ix++) { ColorBgra pixel = GetTransformedPixel(fx, fy); int alpha = pixel.A; if (alpha != 0) { b += alpha * pixel.B; g += alpha * pixel.G; r += alpha * pixel.R; a += alpha; } fx += ssXStep; } fy += ssYStep; } if (a == 0) { return ColorBgra.Transparent; } else { // Compute the (rounded) averages. int twiceA = a << 1; b = ((b << 1) + a) / twiceA; g = ((g << 1) + a) / twiceA; r = ((r << 1) + a) / twiceA; a = (twiceA + ssSamples) / ssTwiceSamples; return ColorBgra.FromBgra((byte)b, (byte)g, (byte)r, (byte)a); } } int ssXSamples, ssYSamples, ssSamples, ssTwiceSamples; float ssXStart, ssYStart, ssXStep, ssYStep; void SetupForSubpixels(int xSamples, int ySamples) { ssXSamples = xSamples; ssYSamples = ySamples; ssSamples = xSamples * ySamples; ssTwiceSamples = ssSamples << 1; ssXStep = 1.0f / (float)xSamples; ssYStep = 1.0f / (float)ySamples; ssXStart = -0.5f * (1.0f - ssXStep); ssYStart = -0.5f * (1.0f - ssYStep); } Here is the plugin: OffsetAlternatingStripes.zip Maximilian has a 3.5.11 build. EDIT: Fixed double-stripe-for-negative-angles bug, and a multi-thread bug caused be forgetting to delete a line of code.
  23. I while ago, I suggested some ideas for making a stamp looked roughed up. They might be combined with the cloud idea, if you want to make the paint look scraped off and chipped. Cc4FuzzyHuggles also had some suggestions on the same thread. EDIT: I realized the method may not work directly, but will with a fairly easy modification. Instead of adding the noise layer to the underlying layer, what you'll probably want to do is use BoltBait's Paste Alpha plugin to paste the alpha into the text, before applying the text to the surface image. Assuming you're starting with text (which may already be colored) on a transparent background: 1) Duplicate the Text layer. 2) Apply BoltBait's Effects>Object>Switch Alpha to Gray. (You should get black text on a white background.) 3) Follow the instructions for adding noise to the stamp (including using Additive blend mode), but don't Flatten as the last step. 4) Use Merge Layer Down to merge the noise layer with the black-and-white text layer. 5) Use Edit>Copy (or Ctrl+C) to copy the just-merged layer. 6) Switch to the original Text layer, and use Effects>Object>Paste Alpha to paste the modified alphas into the layer. Select the "Invert calculation" option. 7) You can now delete the black-and-white text layer. (You could also delete it after step 5.) After step 3, before copying the black-and-white text, may be a good time to use the Paintbrush tool to add some edge chips. You might go with something more angular than the round chips on the stamp example. The same alpha-modification idea can also be used to modulate the text transparency with cloud noise, or other types of noise. The combination of using the black-and-white text layer with the Additive noise layer means only the text will be modified by any added noise. One more observation: There are hundreds of PDN built-in effects and plugins to manipulate color; far fewer to manipulate transparency. Therefore, if you want to alter transparency, you'll have many more options if you convert alpha to gray, modify the gray image, then paste it back into alpha.
×
×
  • Create New...