hamwizard Posted December 7, 2016 Share Posted December 7, 2016 Hi is there a plugin which will do this specific pixelization effect? Note the spacing in the pixels which has been achieved - pixelising in itself I imagine is probably easy but that whole 'snap to grid' conformity is good plus the pixels have a small 1 pixel spacing between them. Thoughts? Thanks. Quote Link to comment Share on other sites More sharing options...
Eli Posted December 7, 2016 Share Posted December 7, 2016 It is a nice effect. I think someone will come with something.This is my try: Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted December 7, 2016 Share Posted December 7, 2016 That would be an extremely easy plugin to write (a few lines of code in CodeLab). Call the Pixelate effect and draw a grid. That's it. Further more, the templates in CodeLab would probably do 75% of the work for you. @Eli, if you ever wanted to learn to write effects, this would be the time. Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
hamwizard Posted December 7, 2016 Author Share Posted December 7, 2016 1 hour ago, Eli said: It is a nice effect. I think someone will come with something.This is my try: Hey Eli, That's actually a pretty good result, it just needs to have some kind of code which enforces each 'pixel' MUST be a single colour and that perhaps the 'gap' grid line over the pixels is a tiny bit larger (perhaps 2 pixels) Did you just make that? Quote Link to comment Share on other sites More sharing options...
Red ochre Posted December 7, 2016 Share Posted December 7, 2016 Cuboids Zero height and size < 0. Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
hamwizard Posted December 7, 2016 Author Share Posted December 7, 2016 (edited) This is pretty much what I'm after! Thank you. EDIT: actually how do I make them all identical in size and a single colour ONLY? Edited December 7, 2016 by hamwizard Quote Link to comment Share on other sites More sharing options...
hamwizard Posted December 7, 2016 Author Share Posted December 7, 2016 Here's an Apple and the best I could produce from it. http://imgur.com/a/dzBbH It's not got 100% square pixels and the spacing between them isn't a uniform colour Make no mistake, your plugin is fantastic but not quite doing what I'm after - I'll try it regardless mind you, but I was hoping to produce very very low total colour content images. Quote Link to comment Share on other sites More sharing options...
Red ochre Posted December 7, 2016 Share Posted December 7, 2016 1 Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
hamwizard Posted December 7, 2016 Author Share Posted December 7, 2016 I've found messing with the size of the cuboid and the quantity comes close to what I want but it's a bit fiddly - a 'lock' button to force it to always produce single colour pixels and consistent spacing would be nice, regardless of cuboid count. Regardless it's very good, thank you. Quote Link to comment Share on other sites More sharing options...
Eli Posted December 7, 2016 Share Posted December 7, 2016 11 hours ago, toe_head2001 said: That would be an extremely easy plugin to write (a few lines of code in CodeLab). Call the Pixelate effect and draw a grid. That's it. Further more, the templates in CodeLab would probably do 75% of the work for you. @Eli, if you ever wanted to learn to write effects, this would be the time. Toe_head2001, I was traumatized by code so many years ago. Somehow I found myself on a computers class (Fortran). The first day, the teacher assigned some exercises to do on a computer lab. And so I went, never before I had seen or touched a computer. The kids started to work on the assignment as soon as they sat down. I found an empty place and I sat down in front of a big screen. I started pressing the keyboard and nothing happened. My computer was OFF. I glanced to my left and to my right and I saw everyone typing things. I kept pressing the buttons on the keyboard and still nothing happened. I took out my notes and read that I had to switch the computer ON. I looked for the switch and could not seen any so figured it must be one of the buttons on the keyboard... I kept pressing every key and nothing happened... Ten minutes later, a young lady noticed that I was typing and that my computer was OFF. She kindly showed me the switches for the screen and the central unit. They were in the back... I felt stupid. I turned the switches ON and a few minutes later some green words appeared on the black screen and I was prompted to enter a USERNAME and a PASSWORD . I looked at my notes and they said that in order to LOG ON I had to enter a USERNAME and a PASSWORD. So I typed "USERNAME" and "PASSWORD" and of course nothing happened. 1 Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted December 7, 2016 Share Posted December 7, 2016 Eli, that's a sad story ... but also funny at the same time @hamwizard, here's a script. Copy and paste it into CodeLab. If it's to your liking, I can publish it here on the forum as a plugin. If not, let me know what to change. Spoiler // Name: Cell Board // Submenu: Stylize // Author: toe_head2001 // Title: // Version: 0.1 // Desc: // Keywords: // URL: // Help: #region UICode IntSliderControl Amount1 = 20; // [0,100] Cell Size IntSliderControl Amount2 = 1; // [0,100] Cell Spacing #endregion void Render(Surface dst, Surface src, Rectangle rect) { int cellSize = Amount1 + Amount2; PixelateEffect pixelateEffect = new PixelateEffect(); PropertyCollection pixelateProps = pixelateEffect.CreatePropertyCollection(); PropertyBasedEffectConfigToken pixelateParameters = new PropertyBasedEffectConfigToken(pixelateProps); pixelateParameters.SetPropertyValue(PixelateEffect.PropertyNames.CellSize, cellSize); pixelateEffect.SetRenderInfo(pixelateParameters, new RenderArgs(dst), new RenderArgs(src)); pixelateEffect.Render(new Rectangle[1] { rect }, 0, 1); ColorBgra CurrentPixel; for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { CurrentPixel = dst[x, y]; if (x % cellSize < Amount2 || y % cellSize < Amount2) CurrentPixel.A = 0; dst[x, y] = CurrentPixel; } } } Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted December 7, 2016 Share Posted December 7, 2016 I've come to the party late Cellmaker! Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Eli Posted December 8, 2016 Share Posted December 8, 2016 5 hours ago, toe_head2001 said: Eli, that's a sad story ... but also funny at the same time Reveal hidden contents I was frustrated at the time but now I thinks it is funny The code is working I applied the effect to a layer that had a white background. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted December 8, 2016 Share Posted December 8, 2016 You need to update your copy of CodeLab to the latest. v2.17 was the Bee's Knees, and v2.18 had some nice speed improvements. If you want to eliminate the translucent edges on the shapes, I can easily add a slider for opacity tolerance. For example, cells above 127 will become 255, and cell 127 & below will become 0. 1 Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
hamwizard Posted December 8, 2016 Author Share Posted December 8, 2016 The translucent edges are definitely a problem, if they could be nixxed I'd super super appreciate it! Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted December 8, 2016 Share Posted December 8, 2016 There you go... an option to make the cells opaque. Alpha values above the Tolerance level will become fully opaque, and values below the Tolerance level will become fully transparent. Checkbox must be enabled/true. Spoiler // Name: Cell Board // Submenu: Stylize // Author: toe_head2001 // Title: // Version: 0.2 // Desc: // Keywords: // URL: // Help: #region UICode IntSliderControl Amount1 = 10; // [0,100] Cell Size IntSliderControl Amount2 = 1; // [0,100] Cell Spacing CheckboxControl Amount3 = false; // [0,1] Make cells opaque IntSliderControl Amount4 = 127; // [1,255] Cell Opacity Tolerance #endregion void Render(Surface dst, Surface src, Rectangle rect) { int cellSize = Amount1 + Amount2; PixelateEffect pixelateEffect = new PixelateEffect(); PropertyCollection pixelateProps = pixelateEffect.CreatePropertyCollection(); PropertyBasedEffectConfigToken pixelateParameters = new PropertyBasedEffectConfigToken(pixelateProps); pixelateParameters.SetPropertyValue(PixelateEffect.PropertyNames.CellSize, cellSize); pixelateEffect.SetRenderInfo(pixelateParameters, new RenderArgs(dst), new RenderArgs(src)); pixelateEffect.Render(new Rectangle[1] { rect }, 0, 1); ColorBgra CurrentPixel; for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { CurrentPixel = dst[x, y]; if (Amount3) { if (CurrentPixel.A >= Amount4) CurrentPixel.A = 255; else CurrentPixel.A = 0; } if (x % cellSize < Amount2 || y % cellSize < Amount2) CurrentPixel.A = 0; dst[x, y] = CurrentPixel; } } } 1 Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
hamwizard Posted December 8, 2016 Author Share Posted December 8, 2016 Sorry I have no idea how to use that? I wish i could import it into Red ochres plugin, because it's (mostly) really nice. How do I use your code? 1 Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted December 8, 2016 Share Posted December 8, 2016 1 minute ago, hamwizard said: How do I use your code? Simply copy and paste into the CodeLab plugin. Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Eli Posted December 8, 2016 Share Posted December 8, 2016 Thanks Toe_head2001, 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.