Xhin Posted October 3, 2019 Share Posted October 3, 2019 (edited) Distort > Lattice Transform This is one of the plugins I've been wanting to do for a long time, but up until recently I didn't really have a good idea how to accomplish it. It's quite a bit more complicated math-wise than my other distortion plugins. This plugin takes a triangular section of an image and then tiles it over the whole thing -- it's like a six-sided kaleidoscope except all you get are hexagons. Me being me, I also added a lot of extra features to it. Radius -- Determines the size of the hexagons that are formed. This can be anything from 1% of the width to the entire width. Source Center / Source Rotate -- these let you pick a different triangle essentially. The "source center" option will pan around and the "source rotate" option will rotate it. Source Zoom -- Keeps the triangle settings the same but zooms out of the source image. This essentially adds more detail to the lattice pattern you've selected. With a high enough level, you can get the entire image in there. Destination Zoom -- Zooms out of the resulting image as a whole. Hexagonal Warping -- A neat little effect that warps the image around the hexagons which are formed. Has kind of a 3-d effect to it. Preview Triangle v0 -- Lets you preview the triangle that's used in the lattice. As a version 0, this isn't perfect, but it works pretty well already. I will fix it when I fix a similar feature in my Advanced Kaleidoscope plugin. Quality v0 -- a faked-out quality slider. I'll fix this when I fix it in all of my plugins. This is at least better than nothing though. Let's take a look at what this plugin actually does: Here's a base image, which I made by adding the word "lattice" to a bunch of words. And recoloring it of course. Here's what your default settings look like. Note how you're tiling the same triangle around the whole image. Making the radius bigger or smaller respectively. With the default settings the same, changing the Source Center and Source Rotate options. Basically this gives you a different triangle to work with. With the default settings, changing the Source Zoom. Note how the overall lattice pattern is the same, but what's inside each triangle is zoomed out. Like the rest of my plugins, the image will mirror itself in all directions so you never get random wrap lines. With the default settings, changing the Destination Zoom, which just zooms out of the image you've created. I have an intuition that you can mimic one of the three (radius, source zoom, destination zoom) with two of the other three, but I'm not sure which one it is. In any case, redundancy isn't a bad thing with a distortion plugin. Here's what a hexagonal warp looks like, with a fairly high setting. These definitely give you some cool effects. Altering the radius and/or source zoom helps these effects shine as well. A hexagonal warp, with a lower-than-normal settings. As expected, the triads that were bigger are now smaller, and vice-versa. Here's a hexagonal warp with a very high radius. Probably the most 3-D version of this effect, and worth sharing. Reminds me a bit of a smoother version of the Pyramid Convex setting of my Cubic Transformation plugin. Here's what Preview Triangle v0 looks like. It isn't perfect, but it's enough to generally give you an idea of what will show up in the image. Here's what that previewed triangle turns into. Still to do Fix the Preview Triangle feature. Will happen around the same time I fix it in my other plugin. Fix the Quality setting. Will happen globally for all of my distortion plugins around the same time. Release the codelab source code. Will happen when I release the source code for all of my plugins, which should be sooner now that I have a better understanding of C#. There's definitely some untapped potential here because I'm using polar coordinates in two different places. Will be worth exploring more when I flesh out my plugin set. Having destination pan and/or destination rotate options would be nice, but they're not really required. Download Link https://github.com/Xhin23/Paint.net-Plugins/blob/master/Lattice_Transform.dll Edited October 4, 2019 by Xhin 4 Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted October 3, 2019 Share Posted October 3, 2019 Hi @Xhin, Thank you for another delightful plugin. I think users would have a better appreciation of this effect if you used a non-abstract image as the base. While colorful and beautiful, the initial images shapes are mirrored horizontally and vertically - so it's hard to see exactly where the deformations are occurring. If you used a picture of a banana (for example ) I'm sure we would understand the changes much more easily. Just a thought.... 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 Link to comment Share on other sites More sharing options...
Xhin Posted October 4, 2019 Author Share Posted October 4, 2019 Fixed! It definitely needed to be a fairly complicated picture -- something with too little detail like a banana wouldn't work because you just end up with an abstract yellow/black thing with most settings. Quote Link to comment Share on other sites More sharing options...
lynxster4 Posted October 4, 2019 Share Posted October 4, 2019 You are killing me @Xhin! 🤣 How you keep churning out these plugins is beyond me. Another excellent plugin...purrfect for making seamless textures. Keep up the great work!! 😄 4 Quote My Art Gallery | My Shape Packs | ShapeMaker Mini Tut | Air Bubble Stained Glass Chrome Text with Reflections | Porcelain Text w/ Variegated Coloring | Realistic Knit PatternOpalescent Stained Glass | Frosted Snowman Cookie | Leather Texture | Plastic Text | Silk Embroidery Visit my Personal Website "Never, ever lose your sense of humor - you'll live longer" Link to comment Share on other sites More sharing options...
Reptillian Posted October 4, 2019 Share Posted October 4, 2019 He probably had those code way before, but was finishing them. Am I right, @Xhin? Quote G'MIC Filter Developer I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me. Link to comment Share on other sites More sharing options...
Xhin Posted October 5, 2019 Author Share Posted October 5, 2019 (edited) This particular plugin has been in development a long long time, though I didn't write any actual code (or really know what I was doing with it) until yesterday. All of my Distortion plugins use variations of a very similar codebase that I've explored a lot over the last few months. There's still a large amount of untapped potential there and I've gotten way way better at plugin development so this pace will probably continue for a while. @lynxster4: you're not alone, this plugin seems particularly well-suited to transforming animals: Edited October 5, 2019 by Xhin 1 Quote Link to comment Share on other sites More sharing options...
Elvis Hbpbgrtnk Posted October 5, 2019 Share Posted October 5, 2019 I knowings what him and other plugin authors is doing: They trying for Genniss book of work records! Quote Link to comment Share on other sites More sharing options...
Eli Posted October 5, 2019 Share Posted October 5, 2019 Thanks @Xhin There are so many possibilities. I feel like Dr Frankenstein 3 Quote Link to comment Share on other sites More sharing options...
Pixey Posted October 5, 2019 Share Posted October 5, 2019 My goodness @Xhin I think you are averaging a Plugin a day This time a squirrel for a change. 3 Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
HyReZ Posted October 6, 2019 Share Posted October 6, 2019 (edited) Here is my contribution using the plugin: Edited October 6, 2019 by HyReZ 2 Quote Link to comment Share on other sites More sharing options...
HyReZ Posted October 6, 2019 Share Posted October 6, 2019 2 Quote Link to comment Share on other sites More sharing options...
Seerose Posted October 8, 2019 Share Posted October 8, 2019 @Xhin! Thank you so much for your effort. 1 Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi 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.