# Xhin

Members

131

• #### Days Won

6

Xhin had the most liked content!

## Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

97

2. ## Reptorian's G'MIC Code Workshop

We're evidently doing things very differently so I don't know how well this will translate. All of my distortion plugins work like this: Each pixel is converted into polar coordinates (Angle and Distance from the centerpoint) Some set of modifications happens to the Angle and Distance variables. The Angle and Distance are converted back into "source" cartesian coordinates. If the source coordinates aren't in the image, the image gets seamlessly mirrored in every direction infinitely to compensate. The current pixel turns into the source pixel, or gets averaged from whatever subpixel stuff is happening in the quality slider. All of my distortion plugins are almost exactly the same except for step #2. If you mirror the distance, you get a Polar Reflection, if you reflect the angle you get a kaleidoscope, if you add the angle to the distance you get a spiral, etc. There's some more complicated trigonometry stuff that happens with "rectangular intensity" effects, but in the end you're still modifying the distance and angle. So for the skew settings in my Self-spiral plugin, what's happening is you're adding the current X or Y coordinate to the distance. The code looks something like this: D += __x_skew*x; D += __y_skew*y; So the float in your X Skew and Y Skew settings is determining what percentage of the X or Y coordinate get added to the distance. If you skew both the same amount, the effect skews diagonally. If you did another polar-to-cartesian conversion, then instead of having only X and Y skew (or both) you could skew in any direction whatsoever. This will happen in an upcoming version of the plugin.

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

It's not the same effect obviously, but it's close enough to demonstrate the difference in quality:
6. ## Rectangular Inversion -- now version 2 (more interesting settings and a great quality slider)

It's actually set to arbitrary values -- I had no idea how to make a quality slider other than what I could gather from this post and subsequent supersampling research: So I just tied quality values to whatever increments looked the best between -0.5 and 0.5 without realizing that the amount of increments is what the quality number actually means. In any case you do definitely get better results above 5 samples, so a newer version of that slider will have a 6 and 7 which mean 10 and 20 respectively. These are currently what my 4 and 5 are set to.
7. ## Rectangular Inversion -- now version 2 (more interesting settings and a great quality slider)

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.

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

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: 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.

11. ## Reptillian    Xhin

I have a question for you, do you plan to leave comments for other programmers using other programming language or software to understand how your filter works? As in, leaving note on the source codes you're planning to release? Something like a base documentation and how the underlying math works, so that other programmers can find the most effective route if there's a way to simplify them.

1. I wrote an article that does some of that:

I would like to make a longer more fleshed-out article whenever the polar group of plugins is more fleshed-out.

2. Okay, thanks. I'll be using that article when I do finish some of the filters I need to fix.

12. ## Lattice Transform

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:
13. ## Polar Singularity

Distort > Polar Singularity This effect mirrors an image in an acorn-like shape towards a vanishing centerpoint. It feels very much like a polar inversion, but looks completely different. The way the development of these are going, it might make sense soon to move this set of plugins out into a "Polar" menu. There's still a lot of untapped potential there. Intensity -- determines the intensity of the effect. Higher settings are a lot more complicated-looking, with singularities that fill the screen and a lot more warping throughout. Complexity -- Adjusts the amount of "sides" to the distortion without altering the complexity of the singularity. Useful for tweaking the look of a distortion. Source Zoom -- Keeps the singularity settings the same but uses more or less of the source image. At lower settings the image will fill each "spoke" (or they might even be partials), at higher settings, the source image will repeat itself many times along the spoke. Source Rotate -- Essentially rotates the orientation of each quadrant. You're reflecting the entire source image at any given time, so this mostly just determines the way the singularity looks internally. Destination Zoom -- Zooms in or out of the rendered image. Destination Pan -- Lets you move around the rendered image. Because of how my plugins work, the image is actually infinitely large so you the effect is quite smooth wherever you are. Quality v0 -- a faked-out quality slider. Will be fixed when I fix it with the rest of my plugins. Development is somewhat slow at the moment, but I'm making progress. Let's take a look at what the plugin does: Here's a source image for comparison. Continuing the tradition of using Obama. Here's what your default settings look like. Overall a pretty interesting effect. Increasing and decreasing the Intensity setting, respectively. With the default settings the same, decreasing the Complexity. This is what it looks like if you lower the Source Zoom -- note how the entire image is being mapped to each spoke now. A bit of Source Rotation and a lot of Destination Zoom gets you a result like this -- when you zoom out a lot, the image gets a lot less complex and the original image shines through more. This is the kind of thing you can get by altering the Destination Pan. Note how there are no wrap lines or anything, the image is what you'd expect it to be. Still to do Releasing the source code, fixing the quality slider and other standard stuff for my plugins. The intensity can apparently go negative with some interesting secondary effects. Because of how different this looked and how poorly it plays with the other sliders, it makes more sense to release those settings as a separate plugin. Similarly, I need to explore in-zooms and out-zooms with much higher magnitudes. There's probably some interesting effects to find there. Download Link https://github.com/Xhin23/Paint.net-Plugins/blob/master/Polar_Singularity.dll
14. ## Lattice Transform

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.