TechnoRobbo Posted June 15, 2013 Posted June 15, 2013 (edited) TechnoRobbo's Tesselation Combo New Paste Fill 2.0 and Copy Alpha handle Alpha Channel correctly One of my favorite type of graphic is tessellations. I like using them for wallpapers and Powerpoint backgrounds. This Combo includes 3 key plugins to create the effect: Offset Plugin (Menu: Effects->Object Paste Fill Plugin (Menu: Effects->Selection) Copy with Alpha Plugin (Menu: Effects->Selection) Here's my Youtube Instructions: http://youtu.be/OPZifrgPuLE Here's a simpler demo http://youtu.be/lRDuYBvWbSc Alpha Channel Demo Tessellation example (eyeballs): Everybody, everybody, let's get into it, get stoopid...... Yay, horsies..... The Code: Offset Plugin - Source Code for Programmers Hidden Content: // Submenu: Object // Name: Offset // Title: Offset Plugin - v1.0 // Author: TechnoRobbo // URL: http://www.technorobbo #region UICode double Amount1 = 0; // [-0.5,0.5] XOffset double Amount2 = 0; // [-0.5,0.5] YOffset #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); double CenterX = ((selection.Right - selection.Left) / 2)+selection.Left; double CenterY= ((selection.Bottom - selection.Top) / 2)+selection.Top; ColorBgra CO; double radx; double rady; for (int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { radx= selection.Width * Amount1 + x; rady= selection.Height * Amount2 + y; CO = src.GetBilinearSampleWrapped((int)radx,(int)rady); dst[x,y]=CO; } } } Paste Fill - VS Source Code for Programmers TRsPasteFillSrc.zip Copy Alpha - VS Source Code for Programmers CopyAlphaSrc.zip Plugin Download Tesselation Combo.zip Edited March 29, 2014 by TechnoRobbo Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
sashwilko Posted June 15, 2013 Posted June 15, 2013 The video looks complicated, But I will try this out, nice share (I hope) Quote
TechnoRobbo Posted June 15, 2013 Author Posted June 15, 2013 (edited) Nah, its not complicated. Offset moves the edges to the center so you can blend them, then moves them back. Paste Fill works like a regular paste but repeats the pattern on the clipboard. Here's a simpler demo Edited June 15, 2013 by TechnoRobbo Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
Ego Eram Reputo Posted June 16, 2013 Posted June 16, 2013 A nice pair of plugins, but both have been done before. Offset - see Panelling Effect. I also made one similar which I didn't ever release because of this sort of duplication (Echo - find it here: http://forums.getpaint.net/index.php?/topic/14832-stereogram-tools-betas/). PasteFill - see Tile Fill from Clipboard I do enjoy reading through your code! Thanks for posting it. 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
TechnoRobbo Posted June 16, 2013 Author Posted June 16, 2013 (edited) Ego, I assumed there's a lot of duplication around. I was trying to provide some Photoshop functionality that I couldn't find in the stock program. I am trying to get the transparency to work in the Paste Fill. Success!!!!! Update: I got transparency to work - Posting Version1.1 Also the Offset Plugin does not use pixel as an adjustment on purpose it uses -.50 to .50 (half to half) which is important when doing tessellations so you can shift the edge to center and back quickly. Otherwise it's a lot of work. I'm gonna work up one more example to show transparency at work. Done!!! Edited June 16, 2013 by TechnoRobbo Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
Djisves Posted June 20, 2013 Posted June 20, 2013 TR, the new (supposedly v1.1) PasteFill.dll reads as version no. 1.0.4914.41674 I'll be a few days before I can test it but I thought I'll let you know (in case you forgot to upload the newer version). Quote
Ego Eram Reputo Posted June 20, 2013 Posted June 20, 2013 It's been four days and TechnoRobbo hasn't released a new plugin - I'm losing all hope 1 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
TechnoRobbo Posted June 21, 2013 Author Posted June 21, 2013 (edited) Im working a 3D version of displacement map where I convert the pixel map in to polygons to add real shading and color channel control, it's looking pretty cool PasteFill Version was 1.1 but I didn't update the header Edited June 21, 2013 by TechnoRobbo Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
ratty redemption Posted March 3, 2014 Posted March 3, 2014 hi technorobbo, i just started using your paste fill and i like it, although i've found a critical crash bug. i'm using paint.net 4 5168 on a win 7 mid range dell laptop. i'm aware this is user error but in repeated tests, if i attempt to run your plugin without first copying a selection to the clipboard then your plugin's ui starts to hang, even when the cancel button is pressed. then my cpu usage shoots up and i have to use task manager to terminate paint.net. i just thought you should know this, in case no other users have reported it? Quote ratty redemption deviantart.com
TechnoRobbo Posted March 7, 2014 Author Posted March 7, 2014 thanks for the heads up I'll work on it. Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
ratty redemption Posted March 7, 2014 Posted March 7, 2014 you're welcome. Quote ratty redemption deviantart.com
TechnoRobbo Posted March 8, 2014 Author Posted March 8, 2014 Paste Fill has been updated to V 1.2 - should work quicker too. Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
ratty redemption Posted March 8, 2014 Posted March 8, 2014 cool, thanks very much tr, seems to be working perfectly now. Quote ratty redemption deviantart.com
ratty redemption Posted March 13, 2014 Posted March 13, 2014 hi tr, i found another potential bug with paste fill. i appear to be only able to use it on a filled in background or layer, not a new clear layer. i tested this several times. can you test it your end? Quote ratty redemption deviantart.com
TechnoRobbo Posted March 17, 2014 Author Posted March 17, 2014 that's correct actually due to the limitations of C# and the clipboard it does not use Alpha Channel it uses a Key Color - in this case it's pure white or RGB 255,255,255. Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
ratty redemption Posted March 17, 2014 Posted March 17, 2014 understood, and at least it's easy to work around by making sure we do have a filled in layer. glad it's not a bug. Quote ratty redemption deviantart.com
TechnoRobbo Posted March 29, 2014 Author Posted March 29, 2014 (edited) ratty, I am totally taking my last response back. The Clipboard issue is in PDN's copy routine which, as I understand is going to be updated FOR 4.0, until then (and for those 35.11) I am updating Paste Fill and adding a new plugin that Copies images with Alpha channel so Paste Fill can do it's job correctly. Look for the update in the first post. http://forums.getpaint.net/index.php?/topic/26605-tessellation-combo-v11/?p=392678 Edited March 29, 2014 by TechnoRobbo Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
ratty redemption Posted March 29, 2014 Posted March 29, 2014 (edited) hi tr, understood, and i've just tested your updated paste fill and the new copy with alpha. they appear to be working very well together. one thing i'm puzzled about, is if i use your copy with alpha, then instead of paste fill, i do a standard paste using my test image, i'm getting a light grey color where the alpha 0 would have been. i thought the colors of alpha 0 pixels were always colored black, not grey? if i use standard copy and paste, again without your plugins, it results in a layer with transparency showing any layers beneath it and or the checkerboard. i hope that all makes sense, are those result to be expected with your plugins? i'm not complaining, just curious. Edited March 29, 2014 by ratty redemption Quote ratty redemption deviantart.com
TechnoRobbo Posted March 29, 2014 Author Posted March 29, 2014 (edited) Copy with Alpha is intended to work with Paste Fill only. Similar Behavior: If you open an image with alpha in Google chrome and copy the image you will see that Paste Fill works just as expected. But if you open the same image with PDN - Copy(PDN) and Paste it with Paste Fill it will have an opaque background. In other words the big difference is "who is setting the clipboard". If it's Copy with Alpha or Google Chrome - alpha is preserved and works with a plugin. If it's PDN it works with PDN's internal routines. So my conclusion would be - Copy in PDN is meant for PDN. If Alpha is not an issue it will work with an external program. I'm not sure why the background becomes grey. No other color appears altered (tested with eye dropper). I'll have to do some image comparisons and get back to you. Edited March 29, 2014 by TechnoRobbo Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
ratty redemption Posted March 29, 2014 Posted March 29, 2014 thanks and that does all make sense. also i'm using paint.net most days at the moment (since i'm having a break from working with blender 3d) and i'll gladly beta test these plugins if it would help. Quote ratty redemption deviantart.com
TechnoRobbo Posted March 29, 2014 Author Posted March 29, 2014 I did some test on the grey image and it appears that PDN pre - multiplies with grey as opposed to pre-multiplying with black because it yields a better blend with background image. Black actually darkens the background image but grey acts as a neutral and looks more natural. Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
ratty redemption Posted March 29, 2014 Posted March 29, 2014 (edited) i just noticed it's pdn's erase selection that appears to change rgb values to 0 0 0, but if i use the alpha to 0 plugin, then use alpha to 255 the rgb remains intact. edit: apparently you answered my question about the grey values as i was typing, he he. Edited March 29, 2014 by ratty redemption Quote ratty redemption deviantart.com
TechnoRobbo Posted March 29, 2014 Author Posted March 29, 2014 (edited) Here's a test I conducted. I took this file: Copied it from google chrome and I got this - notice how the alpha darkened the sky incorrectly. then I used the Copy with Alpha (grey premultiply) - note how it correctly fades out without darkening the sky Edited March 29, 2014 by TechnoRobbo Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
ratty redemption Posted March 29, 2014 Posted March 29, 2014 cool, and good example images tr. Quote ratty redemption deviantart.com
ratty redemption Posted April 3, 2014 Posted April 3, 2014 hi tr, is it at all possible to have a version of the paste fill that distorts the pasted image to the contours of a selection? Quote ratty redemption deviantart.com
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.