Jump to content

davidf

Members
  • Posts

    63
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by davidf

  1. At the moment I'm using a thing called IndirectUI which provides GUI controls specifically for PDN ... it gives you limited control over the interface, though. I don't think it includes support for tabs (anyone know different?). Edit: looks like midora beat me to the answer while I was writing this!
  2. If you'd ever like to make your own plugin, the best place to start is the CodeLab plugin, which does lots of the work for you: http://forums.getpaint.net/index.php?showtopic=880 (There are some links to tutorials in the first post in that thread).
  3. I love it! Width-wise instead of length-wise shading sounds good ... it would help with "flame" images and things like that. The next version might not be for a little while, though.
  4. Very cute! Animated, too. That's one of the effects I had in mind when I started writing the plugin (as well as the idea of electricity flowing between two points). It was originally called Lightning / curve. One parameter I didn't get around to adding was "fork" (or "split") to make lightning more realistic and create fractal-looking tree things.
  5. If I could remember them all! I did write some down, actually. Is there a particular example you were wanting parameters for? Maybe there could be a "recipe book" with example images and their parameters? Not sure how much one is needed ... Being able to save and restore a set of parameters via XML sounds like a good idea. Two things I wasn't sure how to implement using IndirectUI: Ideally, pressing Reseed should fill in the Randomization code field (with a random string). It would be good to have a Reset all button that sets all of the parameters to their default values. Is there a safe way to set control values programmatically for a PropertyBasedEffect?
  6. Amazing. I reconize the flower petals, but how did you do the inside of the sunflowers and the veins in the leaves?
  7. Hope that doesn't put people off too much! Normally you only need to use a small number of parameters at a time. For example, to draw a star, click Radial then set Displacement to zero, Number of lines to 10 (or whatever) and move the start end and end points. (Then change Start width and the colors).
  8. Here's an example image created with this plugin (some kind of sea creature):
  9. Effects > Render > Curly Lines This plugin draws all kinds of curly (and straight) lines ... Added in Version 1.1a: Draws an initial line instead of just a dot. Added in Version 1.1: The dialog is now resizeable (thanks to midora). Two new color modes: "First to second color -- across width" and "Emboss", along with "Emboss angle". "Swap colors" checkbox. "Transparency". "Start radial direction is random". For information on the new features, see this post: http://forums.getpai..._20#entry381760 The PDF guide has been updated too, though it only describes the new controls very briefly. (Note: the dialog shown below is for version 1.0). There are a large number of parameters, so I wrote a small guide, which I recommend reading before using the plugin (it includes a quick tour of all the parameters): http://home.lizzy.co...gin%20guide.pdf (856 K) Have fun! I'd love to see people's pics. Download: CurlyLines1.1a.zip Known bugs: As mentioned in the PDF guide, this plugin has a problem handling lines with high widths and chaotic (low smoothness) lines or the "short sharp" end style.
  10. Thanks, I didn't know about that -- the .zip file in the original post has been updated to version 1.2 now (this is the only change, so no need for English speakers to re-download). How do you learn about these kinds of things? The template code I was using didn't have this information. I'd love it if there was a "complete guide to writing PDN plugins" ...
  11. Using some of my plugins: Cell Texture ... http://forums.getpaint.net/index.php?/topic/25508-cell-texture-plugin-26th-oct-2012-updated-to-v11 Local Noise ... http://forums.getpaint.net/index.php?/topic/25467-local-noise-plugin-18th-oct-2012 Curly Lines ... coming soon!
  12. Try this: Adjustments > Posterize to reduce to six colors, then Artistic > Dot with either "lighten only" or "darken only" selected, depending on the image. Is that the kind of thing you were thinking of? If not, could you describe it another way? Thanks for the encouragement!
  13. The positions are based on a square grid, so using uniform positions doesn't look very interesting -- just a screen full of squares ... You could try other types of grids (triangular, etc.) but the way I wrote the plugin depends on using a square grid, so it isn't simple to try that out.
  14. The levels are just proportional to the distance from each point. The main algorithm for "nearest neighbor" is: For each square in the grid (side length = "cell size" parameter), pick a random point (the cell centre). For each pixel (x, y), find the distance D to the nearest cell centre and divide by the cell size to give a value W; if W > 1, set W to 1. Linearly interpolate between the foreground and background colour using W: foreground * (1 - W) + background * W. The "intensity" parameter is also added to W (and the result is restricted to the range 0 to 1). I tried it out, and here is the result: Download: CellTextureWithDisplacement.zip The new parameters are "X displacement" and "Y displacement". If these values are not zero, the X or Y component of the distance is multiplied by 1 + abs(displacement): if the parameter is less than zero, only negative X/Y values are multiplied, otherwise only positive values are multiplied. If the paramaters are X displacement = 2 and Y displacement = -2, the result is exactly the same as your code above. I'm not very fond of this variation though (I think it leaves too many empty areas), so I won't make it the official download.
  15. Thanks! I'm already on something at the moment ... it's a surprise, though It'll take a few more days (and then another few days to add the extra features I've thought of by then ...) Is there a general area where people post ideas or requests for plugins, by the way? Or is that just mixed in with the other forums?
  16. Hmm! Takes a while to get to know the existing plugins out there ... thanks.
  17. Ah, I hadn't noticed the Tiling option ... oh, well!
  18. Effects > Distort > Seamless Move Note: it turns out this plugin is fairly redundant (see posts below), so feel free to ignore! This is a small plugin to help create seamless images: it lets you scroll an image around, wrapping around the left & right and top & bottom of the image. For an alternative, see the Seamless Texture Maker plugin (which does something similar to this with the "only cut" option, but with no scrolling): http://forums.getpai...?showtopic=4591. The parameters are: Position - drag to change the center of the image. Fine tune X / Y - pixel perfect X and Y adjustment. The CodeLab code is very short: #region UICode Pair<double, double> Amount1 = Pair.Create( 0.0 , 0.0 ); // Position int Amount2 = 0; // [-100,100] Fine tune X int Amount3 = 0; // [-100,100] Fine tune Y #endregion void Render(Surface dst, Surface src, Rectangle rect) { int w = src.Bounds.Width; int h = src.Bounds.Height; int dx = -((int) (Amount1.First * 0.5 * w) + Amount2); int dy = -((int) (Amount1.Second * 0.5 * h) + Amount3); for (int y = rect.Top; y < rect.Bottom; y++) { int ypos = (y + dy) % h; if (ypos < 0) { ypos += h; } for (int x = rect.Left; x < rect.Right; x++) { int xpos = (x + dx) % w; if (xpos < 0) { xpos += w; } dst[x,y] = src[xpos,ypos]; } } } One problem is that there is no obvious way to reset the parameters to all zero when the effect is restarted; it always remembers the parameter values last used, which is not really appropriate for this particular plugin. Anyone know of a way to do this (within either CodeLab or a Visual Studio project)? Download: SeamlessMove.zip
  19. Great! Took me some time to work out where in the image you used it ...
  20. OK, that's fine -- I can understand the reason for doing things that way. But it would be great if there was a way to extend PropertyBasedEffect one day to allow custom WinForms controls to be added to it. Thanks! (I really do appreciate the existence of IndirectUI after coding an effect that uses it ... it definitely makes things easier). Yep, I've had a go at using it already -- thanks.
  21. IndirectUI is great, but for a plugin I am thinking of writing I will need to use some other kinds of controls ... but I still want it to feel like Paint.net. Is there anywhere I can find the code used to create the various controls that exist in IndirectUI (i.e. to do what PropertyBasedEffect.OnCreateConfigUI() does by hand?).
  22. Effects > Render > Cell Texture Edit: Updated to version 1.2 (no code changes, just made sure it uses the internationalized Render menu instead of the string "Render"). Edit: Updated to version 1.1 (added "Combined" distance type and changed "Multiply" method to "Root sum of squares", which looks a bit nicer - also handled coloring better for this method. See left image in the second row below for an example). This plugin was inspired by the page: http://www.blackpawn...ar/default.html The algorithm can create quite a lot of different texture types: The parameters are: Foreground - the color inside the cells. Background - the color around the edge of the cells. Swap background and foreground - exactly what it says! Avoid border - do not place cells near the edge of the image. If this is not set, the image is tileable (i.e. it wraps around the edges). Cell size - the side length of the invisible squares the cells are based on (there is one "point", i.e. cell centre, at a random location inside each square - with a slight bias towards the middle). Intensity - adjust the distance where the foreground turns into the background. Random color - amount of random color to add to individual cells. Method - formula to use to determine the color (see the link mentioned above). Distance - distance metric to use. "Euclidean distance" is distance in a straight line, "Manhattan distance" is the sum of the X and Y differences, "Chebychev distance" is the maximum of the X and Y differences and "Combined" is a combination of all of these. I'd love to see any interesting uses people find for this ... (My first plugin created using Visual C#. Yay!) Download: CellTexturev1.2.zip By the way, when adjacent cells are different colors, there is no antialiasing at the moment -- I need to investigate the best way to do that. Known bug: for large cell sizes with "Subtract nearest two neighbors" and "avoid border" both set, there are sometimes some problems near the right or bottom edge of the image.
×
×
  • Create New...