BMC Posted June 26, 2017 Share Posted June 26, 2017 Hi guys, a long time PDN user, first time poster. I need to automate a very specific kind of effect. What I want is to sort of displace the center of elements while stretching one side and contracting the other... Left is the original image, right is the processed one: The difference is that the centre of the original image has been shifted to the right. This image was processed manually so it's not precise, but it shows the general goal. I need a way to apply such a transformation to many elements. This is a small fraction of an actual data map that contains hundreds of such elements. The gradients can be different in orientation. It would be very problematic to do manually for each element, exactly because they are oriented randomly. Is there a plugin that may help me with this? If there is no such plugin, maybe someone can point me to how I can write my own? Quote Link to comment Share on other sites More sharing options...
Red ochre Posted June 26, 2017 Share Posted June 26, 2017 I think Pyro's Gridwarp is probably your best bet?... or read up on BoltBait's codelab tutorials and post on the developers central thread. https://forums.getpaint.net/index.php?/topic/109990-how-to-write-an-effect-plugin-tutorialsresources/ 1 Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
MJW Posted June 26, 2017 Share Posted June 26, 2017 My guess is there's no remotely easy way to do what you want to do. I think it would help, though, if you showed a version with a number of the elements you want to modify. Seeing a single element, out of context, makes what you are trying to do unclear. Handling each element in relation to the surrounding region seems to me to be a major part of the problem. Also, are all the pixels in all the elements to be shifted the same direction? You say the pixels are shifted right, but is that actually so? Are they shifted right, or are they shifted right and down, in the direction the gradient changes? From the single-element image, I can't tell. Are the "elements" always gradients, as in the example, where the boundary is defined by the point at which they're white, or are they defined in some other fashion? Perhaps if you explained why you want to do this, the method to achieve it would be clearer. 1 Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted June 26, 2017 Share Posted June 26, 2017 Related: It does not solve the problem of different rotations/orientations though. 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...
MadJik Posted June 27, 2017 Share Posted June 27, 2017 About ten years ago we did that "by hand" Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
BMC Posted June 27, 2017 Author Share Posted June 27, 2017 Here is a more zoomed out portion of the map. It lost a little bit of quality because of scaling(the actual image is something like 9k pixels in both directions), but it shouldn't really matter. For all of these gradient-like river lines I need to shift the middle in the same direction. This is a dune edge map. It's stored as a grayscale. It defines where dune edges are, and how steep they are. It's in prototyping stage, so much is still not done(hence the lines are all the same width). What I do with this is load it into a terrain engine, alongside other maps, and out comes a desert. The problem I'm solving is that the dune sides described by such a map are equally steep on either side(the steepness is described by the gradient). Dunes are a result of wind piling up sand on one side so one side is usually smoother than the other. As a concept it works when I manually edit some small parts of it, but it's pretty terrible to do manually for the whole thing. Not only is it a whole lot of work, but since it's manual I end up with errors introduced by hand. Besides, since this is a work in progress sort of thing I constantly discard and generate improved map versions and end up going through the same processes many times. From the looks of it, it doesn't seem like I can cheat my way out of this one, so I guess I'll have to write myself a plugin that displaces stuff based on the colour intensity. Quote Link to comment Share on other sites More sharing options...
MadJik Posted June 27, 2017 Share Posted June 27, 2017 Something like this ? 2 Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
MJW Posted June 27, 2017 Share Posted June 27, 2017 You might want to try Red ochre's ClipDisplace plugin. Use the image (or perhaps an inverted version) in the clipboard as the displacement map, and apply it to the image. 1 Quote Link to comment Share on other sites More sharing options...
BMC Posted June 27, 2017 Author Share Posted June 27, 2017 7 hours ago, MadJik said: Something like this ? 20 minutes ago, MJW said: You might want to try Red ochre's ClipDisplace plugin. Use the image (or perhaps an inverted version) in the clipboard as the displacement map, and apply it to the image. Thank you both for your solutions. You guys saved me at least a week of headache. I tested Motion Sharpen and it's very nice, I get even better results by applying smaller steps several times. As for ClipDisplace, it's more versatile, I haven't grasped it fully yet, but from the quick test I did by moving the displacement map slightly to the side the results seem to be in the realm of what I need. With further experimentation I may even come across something amasing with this tool. All in all, with plugins like this I am well equipped to tackle my problem and I express my gratitude towards the participants of this thread/community. I don't think I ever got a more helpful answer on anything on the internet in my time. 1 Quote Link to comment Share on other sites More sharing options...
MadJik Posted June 27, 2017 Share Posted June 27, 2017 You're welcome, glad to help you for this task. Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Eli Posted June 27, 2017 Share Posted June 27, 2017 2 minutes ago, BMC said: All in all, with plugins like this I am well equipped to tackle my problem and I express my gratitude towards the participants of this thread/community. I don't think I ever got a more helpful answer on anything on the internet in my time. I am glad you found a solution for your needs. You got the help from some of the best in the forum. Thanks for saying "Thanks". Many will not bother. 2 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.