Xhin

Rectangular Inversion -- now version 2 (more interesting settings and a great quality slider)

Recommended Posts

Distort > Rectangular Inversion

 

This plugin turns an image inside-out via polar coordinates. Unlike the other Inside-Out plugin, this one everts the entire rectangle instead of just a circular region. There are also move, rotating and zooming options which create some really neat-looking effects.

 

Let's take a look at it.

 

7ConNqY.png

 

  • Move -- This moves the centerpoint around. Pixels are inverted based on their distance from the centerpoint and how far away the edge is, so changing this option changes the way the image warps.
  • Rotate -- Rotates the image after the inversion step but before the remapping step. An interesting effect that rotates the content of the image while preserving the effect's rectangular nature.
  • Zoom Out -- Like my Polar Kaleidoscope plugin, the effect is mirrored in all directions. Zooming out will recreate the effect, creating an effect that looks suspiciously similar to a Polar Inversion.
  • Quality v0 -- Basically adds a mild blur. Larger canvases should use higher settings. I've marked it as a v0 because I plan to make a better quality slider for my plugins at some point. This is at least better than nothing.

 

Now, let's look at what the plugin actually does.

 

KQOvrA3.png

 

We'll start with a base image. Just a few spirals I've self-negated.

 

3mcudbw.png

 

Here's what the base effect looks like. The image has essentially been inverted based on its distance from the center. This is a very similar effect to the Inside-Out plugin, but it inverts things in a rectangular way rather than a circular way so it remaps to the entire image.

 

cgsagRG.png

2JigI11.png

 

You can move the centerpoint around. The top image I've moved 20% to the right, and the bottom image I've moved 30% down.

 

ZXv9ugz.png

 

Here's what a rotation looks like. Note how the image is clearly rotated but is somehow still a rectangle on the outer edge. Things have been warped a bit differently as well. Overall, a pretty neat effect.

 

jyuObno.png

FKjt20G.png

 

With higher zooms, you get these effects. They look very similar to a polar inversion, so I may have accidentally discovered how those work. The difference is that the image's rectangular nature is preserved so the outer edges aren't heavily warped.

 

Still to do

  • Fix the quality slider. This is probably something that I'll do with all of my plugins at once (I have a few more distortion plugins coming).
  • Release the source code. Again, this will probably be a global update.

Overall, I'm pretty happy with the state of this plugin. I don't think it needs anything else besides that.

 

Download link

https://github.com/Xhin23/Paint.net-Plugins/blob/master/Rectangular_Inversion.dll

Edited by Xhin
  • Like 4
  • Upvote 2

Share this post


Link to post
Share on other sites

@Xhin

I am really enjoying your plugin effects!
I used your Rectangular Inversion to create both the picture frame and the graphic that was framed.

 

Bow_Frame_001_w_linear_art.jpg



 

Edited by HyReZ
  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, HyReZ said:

I am really enjoying your plugin effects!

 

Totally agree with HyReZ @Xhin!!  These effects, though simple, can really change an image with some interesting looks!  :star:

 

Please keep them coming!  In no time, you can release your own plugin pack!  :D

 

Below image made entirely with Rectangular Inversion.

 

rectangularinversion_01.png

  • Like 1

Share this post


Link to post
Share on other sites

I like the way I can produce interesting frames for my images. I have experimented with various images files, its placement and the amount of transparent space around the central image to produce interesting frames. I erased all of the non-frame stuff at the center so that I can place my main image.
Concentric_Circles_AB13a.jpg

  • Like 1

Share this post


Link to post
Share on other sites

Rectangular Inversion Version 2

 

This is a rather large update that adds some new settings as well as heavily upgrading the Quality slider.

 

t7xkKOU.png

  • The range for the Zoom slider has been changed to be less sensitive, and instead you can now use the Zoom Intensity slider to give you a wider range to zoom in. This allows you to easily adjust the intensity of the effect without headaches, while still allowing a rather large range of intensities if you want them.
  • "Move" has been renamed to Source Pan. It also works a bit differently than it used to.
  • Rectangular Intensity will increase or decrease the "rectangularity" effect, making it more hyperbolic, parabolic or even circular.
  • Complexity is basically just a source kaleidoscope effect -- it'll reflect the image around the circle, creating a more complex effect.
  • Desination Pan -- Since "Source Pan" and the original "Move" setting changed the actual rendering of the image, this setting will instead just let you move around the result.
  • Quality -- this has been upgraded into a proper quality slider.

Let's take a look at the changes.

 

veu3BLw.png

 

Obama is rapidly becoming my default source image.

 

qhoYrel.png

 

And your default effect. I don't think the default setting changed, but I did shift a lot of stuff around, so it's possible.

 

4YxgaAH.png

 

This is what happens when you change the Source Pan setting -- it does what it did before, except now the image has the same centerpoint. So those nice "hallway"-like effects you got from this plugin before, you can now see them centered and can pan around with the other Pan setting at will.

 

zVZhDYk.png

 

Changing the Zoom will Zoom in or out in a much more gradual way than it used to. However if you adjust the Zoom Intensity and then touch the Zoom slider, you can now get much much stronger effects.

 

Rectangular Intensity

 

lGFwF3Z.png

 

Just as a reminder, here's what a default setting of Rectangular Intensity looks like.

 

6BpN1EG.png

 

Increasing it will give it a more "parabolic" effect.

 

HtunkYQ.png

 

Setting it to 0 will make the effect totally circular. With higher Zooms, you can get some nice effects that look quite similar to polar inversions.

 

FEiDKha.png

 

Setting it below 0 will instead make the diagonals "hyperbolic". Or you could think of it as the box turning inside-out or whatever. These effects are basically a more generalized form of the "Shape" setting in my plugin Cubic Transformation. Getting this effect to generalize into a slider was a pretty big undertaking, but will be enormously useful in my other polar plugins and probably just in general.

 

ybi0UDJ.png

 

Increasing the Complexity will make the image tile itself around the circle surrounding the centerpoint. Definitely an interesting effect -- similar to the Pieces setting in my plugin Polar Kaleidoscope or the Complexity setting in my other plugin Polar Singularity.

 

idwpaEN.png

 

The Destination Pan effect will let you move around the rendered image, since Source Pan (and its earlier version "Move") changed the rendering of the image as well. This definitely opens up new possibilities.

 

CRtlAMA.png

 

I played with some more settings and turned the Quality slider up to 5. The new version is wickedly strong -- would not recommend going above 4 on large images (and even that takes some time to render). I'll probably need to tweak it a bit before I incorporate it into my other plugins, though I'll still keep around a "very very high quality" setting in addition to the standard 5 settings.

 

New Download Link

Same as the old download link:

 

https://github.com/Xhin23/Paint.net-Plugins/blob/master/Rectangular_Inversion.dll

 

Still to do

  • Update the documentation up at the top of this page.
  • Zoom is apparently a source zoom -- the plugin probably needs a destination zoom slider as well.
  • I definitely want to migrate the "rectangular intensity" setting to other plugins that use that effect, and the quality slider as well once I tweak its settings a bit.
Edited by Xhin
  • Like 2

Share this post


Link to post
Share on other sites
On 9/11/2019 at 9:37 PM, Xhin said:

Quality v0 -- Basically adds a mild blur. Larger canvases should use higher settings. I've marked it as a v0 because I plan to make a better quality slider for my plugins at some point. This is at least better than nothing.

 

I take it from this comment that you probably aren't using multisampling. If you aren't, why not? For this type of plugin it works quite well, and is generally very easy to add. I wrote a tutorial, showing the steps involved in converting a plugin without mutisampling into one with multisampling.

Share this post


Link to post
Share on other sites

I'm doing something pretty similar to that in version 2 (which I released in the post above yours). It took me a while to figure out how exactly. The highest setting gets some really ridiculous quality:

 

pHXbXc7.png

 

Looking over your algorithm did help me figure out how to tweak my own settings though, so thank you for that. My settings are apparently set up like this (my settings on the left, your setting equivalents on the right.

 

  • 1 -- 1
  • 2 -- 3
  • 3 -- 5
  • 4 -- 10
  • 5 -- 20

I do kind of like having the higher settings (especially when working with really intense effects), so I'll probably keep them as an optional 6 and 7.

 

Edited by Xhin

Share this post


Link to post
Share on other sites
17 minutes ago, Xhin said:

I'm doing something pretty similar to that in version 2

 

Sorry I missed that you had upgraded the Quality control.

Share this post


Link to post
Share on other sites

<3 @Xhin!

 

Thank you so much for the new version. :cake: :coffee:

11-Oktober2019hs.png

 

11-Oktober2019.png

 

11-Oktober2019hss.png

 

*All images taken with the Rectangular Inversion. I'll give you points on Sunday. :) 

  • Like 1

Share this post


Link to post
Share on other sites

 

I'm really enjoying your Plugins @Xhin and you are very, very good at writing these :)

 

 

Broken-Apples.png

 

 

spooky-2.png

 

Share this post


Link to post
Share on other sites

@Xhin

Thank you for your plugins and the continued improvements!
3_Concentric_Rainbow_Disc_Divided_0A7_10

Edited by HyReZ

Share this post


Link to post
Share on other sites

Many thanks. However, seems to really hog CPU and is slower than molasses in January. Over 66% CPU on one image and 3 mins to complete. Using i7 4 core @ 3.1gHz. But it does work.

 

Share this post


Link to post
Share on other sites
Quote

However, seems to really hog CPU and is slower than molasses in January. Over 66% CPU on one image and 3 mins to complete. Using i7 4 core @ 3.1gHz. But it does work.

 

That's due to the weirdness of the quality slider -- 1 is 1, but 2 is 3, 3 is 5 and it kind of accelerates from there. Should be fixed in a later update.

Share this post


Link to post
Share on other sites
17 hours ago, Xhin said:

That's due to the weirdness of the quality slider -- 1 is 1, but 2 is 3, 3 is 5 and it kind of accelerates from there. Should be fixed in a later update.

 

Have you set it to a logarithmic scale?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.