stuff_gnome

Members
  • Content Count

    23
  • Joined

  • Last visited

Community Reputation

0
  1. Understood, seems pretty straight foward when you put it that way. I will start putting some work into it.
  2. @MyChemicalSnowman Your welcome, I had noticed some posts here and there mentioning the need/want to count the number of pixels of a specific color in an image and thought, "Hey, I can do that!" @Boude I don't think I completely understand what you are asking for, could you go into a bit more detail about your idea? Would this tolerance be based on the primary color chosen? Are you talking about measuring something like perceived color rather than actual color? I was going for something that worked around absolute rather than relative values, but I can be flexible. On a related note, I had planned to add the ability to count the occurrence of a set of colors found in any given pnd palette file. Once a figure out how to read a pnd pallete file that is
  3. Download: ColorCount.zip What does this plug-in do? This plug-in does exactly what its name implies, it counts the number of colors (or number of times a color is used) in an image. How does this plug-in work? What probably needs the most explanation is use of the control options for this plug-in, this is best described with screen shots. The following screen shots show an image that is 3 pixels by 3 pixels at maximum zoom. The image below shows the result of selecting to “count only the primary color.” In this case the primary color chosen is red with an alpha of 255, not transparent. The “ignore alpha” option serves to either narrow or widen your color search, in this case we are narrowing our search down to only red pixels with an alpha value of exactly 255. In this next screen the option to ignore alpha values is chosen, widening the search to count any red pixel in the picture. Ok, this is where it can get confusing. This time instead of counting the occurrence of a specific color we are going to do the exact opposite, which is to count the number of all the unique colors used. Continuing with the idea of doing things opposite from before, this time selecting the “ignore alpha” option will narrow our search results, confused yet? The next screen shot shows the result of counting colors while treating colors with differing alphas as individual colors themselves. Now here is the result of ignoring alpha values, effectively treating all colors as if they had the same alpha value. Location? Effects > Photo > Color Count If you have any questions, suggestions, or something does not work properly for you please let me know. Download: ColorCount.zip
  4. Hmmm... What if the label read: less <------- # of Line Segments -------> more
  5. @Benji2 I have updated the plug-in as you requested, it was a good idea. . @Simon I chose to use the word complexity because I feel it illustrates the result of modifying the value of that particular control. Recursion seems a bit too technical IMHO.
  6. DownLoad:Koch_Snowflake.zip[/attachment]
  7. DownLoad:Koch_Snowflake.zip Updated: now includes brush fill styles (as requested), the screenshots do not reflect this change yet This is a very simple fractal, as far as fractals go, and I guess you could really view it as a shape drawing plug-in. Screen shots can describe what this plug-in does better then I can so here they are. This just shows the menu in which this plug-in resides Effects > Render > Koch_Snowflake The following are just examples of the varying degrees of complexity (more complex = more verticies). Default: Most Basic: A bit more complex This shows how playing with the drawing angle can be used to make other shapes Thats all there is to it really. The only bug I know of is that rendering a snowflake in a circle or irregular selection causes some distortion, I have not figured out the cause yet but its not a major issue. I have not tried this on any other computers so let me know if it works for you, or does not work whatever the case may be. DownLoad:Koch_Snowflake.zip
  8. That looks like a lot of work was put into researching, compiling and typing that all up. I like the format and choice of categories, perhaps you could add a column or two for Main and Submenus (where they are located in PDN once installed) to aid in narrowing searches. I agree with what Simon stated but I can't help but think the idea could be taken a bit further, so the following is a bunch of random wild thoughts. A small database should/could be setup (maybe with something free like Postgresql) and then a method of searching could be setup using a simple form made of a search box for each column/category name, or a single search box and a custom parser could be used to build the SQL search statements from what was typed. Perhaps this could be made into a plug-in itself. I think it would fit nicely into the Help menu in the PDN program, right under the Plug-in forum link. Of course that would most likely involve Rick to do his magic if this plug-in were to be integrated in such a way.
  9. That looks like a lot of work was put into researching, compiling and typing that all up. I like the format and choice of categories, perhaps you could add a column or two for Main and Submenus (where they are located in PDN once installed) to aid in narrowing searches. I agree with what Simon stated but I can't help but think the idea could be taken a bit further, so the following is a bunch of random wild thoughts. A small database should/could be setup (maybe with something free like Postgresql) and then a method of searching could be setup using a simple form made of a search box for each column/category name, or a single search box and a custom parser could be used to build the SQL search statements from what was typed. Perhaps this could be made into a plug-in itself. I think it would fit nicely into the Help menu in the PDN program, right under the Plug-in forum link. Of course that would most likely involve Rick to do his magic if this plug-in were to be integrated in such a way.
  10. After playing around a bit more, using relector/intellisense to uncover some things, I have been able to reach a level of usability that I am comfortable with. The combination of both the property rules (if thats the correct term, for something like SoftMutuallyBoundMinMaxRule) and the ReadOnlyChanged/ValueChanged events has allowed for a greater range of UI control manipulation. I don't think it will be too much longer until I produce something worthy of public use. There are still a few features I would like to add though, mainly an open file dialog to be able to utilize color pallete files to further customize the rendering of random snowflake and a "re-randomize" button but that can wait for a rewrite. For now I just plan on using the unique colors present in the active layer as a palette to draw random colors from, any data structure suggestions for keeping track of these colors? A hashset came to mind but recently I have been trying to wrap my mind around the concept of an octree and its use in storing color information efficiently
  11. After playing around a bit more, using relector/intellisense to uncover some things, I have been able to reach a level of usability that I am comfortable with. The combination of both the property rules (if thats the correct term, for something like SoftMutuallyBoundMinMaxRule) and the ReadOnlyChanged/ValueChanged events has allowed for a greater range of UI control manipulation. I don't think it will be too much longer until I produce something worthy of public use. There are still a few features I would like to add though, mainly an open file dialog to be able to utilize color pallete files to further customize the rendering of random snowflake and a "re-randomize" button but that can wait for a rewrite. For now I just plan on using the unique colors present in the active layer as a palette to draw random colors from, any data structure suggestions for keeping track of these colors? A hashset came to mind but recently I have been trying to wrap my mind around the concept of an octree and its use in storing color information efficiently
  12. Yes, that was indeed what I was looking for and it worked rather well. Strange how there is something just for the very specific purpose of making sure two max and min values don't over lap each other, seems like something a bit more general that allows the programmer to update the UI control values as needed would be more appropriate. Not that I'm trying to be critical or complaining, I certainly found it useful . I am quickly beginning to second guess my decision to use IndirectUI, as I expand on my original idea I am finding it(IndirectUI) exceedingly restrictive, but I suppose thats the trade-off for being so easy to use. I thank you both for your replies.
  13. Yes, that was indeed what I was looking for and it worked rather well. Strange how there is something just for the very specific purpose of making sure two max and min values don't over lap each other, seems like something a bit more general that allows the programmer to update the UI control values as needed would be more appropriate. Not that I'm trying to be critical or complaining, I certainly found it useful . I am quickly beginning to second guess my decision to use IndirectUI, as I expand on my original idea I am finding it(IndirectUI) exceedingly restrictive, but I suppose thats the trade-off for being so easy to use. I thank you both for your replies.
  14. I have been working on a plug-in that draws the Koch snowflake fractal(s), and I have run into a bit of a problem. I plan to give the user the option to generate several snowflakes of random size and position, to do this I need a maximum and minimum size to be specified by the user. However, I can’t figure out how to automatically make these max and min slider control values equal to one another if the user tries to make the min become greater than the max, or the max becomes less than the min. As you can see in my code I have tried to use the PropertyBasedEffectConfigToken.SetPropertyValue(object propertyName) method to accomplish this but either I am not using it correctly or it was not ment to be used in this manner. Any help on this matter would be most appreciated. UI and plug-in results example: protected override void OnSetRenderInfo(PropertyBasedEffectConfigToken newToken, RenderArgs dstArgs, RenderArgs srcArgs) { Random random = new Random((int)DateTime.Now.Ticks); this.ComplexityValue = newToken.GetProperty(PropertyNames.Complexity).Value; this.MaxSizeValue = newToken.GetProperty(PropertyNames.MaxSize).Value; this.MinSizeValue = newToken.GetProperty(PropertyNames.MinSize).Value; if (this.MinSizeValue > this.MaxSizeValue) { newToken.SetPropertyValue(PropertyNames.MaxSize, this.MinSizeValue);//) this.MaxSizeValue = newToken.GetProperty(PropertyNames.MaxSize).Value; } this.AngleValue = newToken.GetProperty(PropertyNames.Angle).Value; this.BrushsizeValue = newToken.GetProperty(PropertyNames.Brushsize).Value; this.offsetValue = newToken.GetProperty(PropertyNames.Offset).Value; this.AntialiasValue = newToken.GetProperty(PropertyNames.Antialias).Value; this.Random = newToken.GetProperty(PropertyNames.Random).Value; this.RanNum = newToken.GetProperty(PropertyNames.RanNum).Value; if (this.Random) { MultSizes = new ArrayList(this.RanNum); for(int i=0; i this.MultSizes.Add(MinSizeValue + (random.NextDouble() * (MaxSizeValue - MinSizeValue))); } base.OnSetRenderInfo(newToken, dstArgs, srcArgs); }
  15. I have been working on a plug-in that draws the Koch snowflake fractal(s), and I have run into a bit of a problem. I plan to give the user the option to generate several snowflakes of random size and position, to do this I need a maximum and minimum size to be specified by the user. However, I can’t figure out how to automatically make these max and min slider control values equal to one another if the user tries to make the min become greater than the max, or the max becomes less than the min. As you can see in my code I have tried to use the PropertyBasedEffectConfigToken.SetPropertyValue(object propertyName) method to accomplish this but either I am not using it correctly or it was not ment to be used in this manner. Any help on this matter would be most appreciated. UI and plug-in results example: protected override void OnSetRenderInfo(PropertyBasedEffectConfigToken newToken, RenderArgs dstArgs, RenderArgs srcArgs) { Random random = new Random((int)DateTime.Now.Ticks); this.ComplexityValue = newToken.GetProperty(PropertyNames.Complexity).Value; this.MaxSizeValue = newToken.GetProperty(PropertyNames.MaxSize).Value; this.MinSizeValue = newToken.GetProperty(PropertyNames.MinSize).Value; if (this.MinSizeValue > this.MaxSizeValue) { newToken.SetPropertyValue(PropertyNames.MaxSize, this.MinSizeValue);//) this.MaxSizeValue = newToken.GetProperty(PropertyNames.MaxSize).Value; } this.AngleValue = newToken.GetProperty(PropertyNames.Angle).Value; this.BrushsizeValue = newToken.GetProperty(PropertyNames.Brushsize).Value; this.offsetValue = newToken.GetProperty(PropertyNames.Offset).Value; this.AntialiasValue = newToken.GetProperty(PropertyNames.Antialias).Value; this.Random = newToken.GetProperty(PropertyNames.Random).Value; this.RanNum = newToken.GetProperty(PropertyNames.RanNum).Value; if (this.Random) { MultSizes = new ArrayList(this.RanNum); for(int i=0; i this.MultSizes.Add(MinSizeValue + (random.NextDouble() * (MaxSizeValue - MinSizeValue))); } base.OnSetRenderInfo(newToken, dstArgs, srcArgs); }