frio Posted November 4, 2023 Share Posted November 4, 2023 (edited) Effects->Color->Vector Rotation (Axis-Angle) Effects->Color->Vector Rotation (Euler) Effects->Color->Vector Cross Product Download: F_ColorVectorRotations.zip Description: I've been geeking about quaternions and color space conversions recently, which led me to wonder what happens if you interpret one image's pixels as 3-dimensional vectors and another image's as quaternions, then rotate the first one's pixels. There's three methods available: Axis-angle representation - each color determines a 3D axis, and its intensity or alpha the angle. Euler angles - each color component determines amount of rotation around each of the 3D axes. Vector cross product - each color determines a second vector and does a cross product (straight quaternion multiplication). First two produce similar effects but are mathematically different, with axis-angle being the "less messy" option. Cross product generally turns things black or does crazy things, with little chill. Some demo images: a picture of northern lights with a simple horizontal gradient used for rotation, with an embedded kitty with a radial gradient. You're of course not restricted to gradients, but too detailed images might get quite intense. The second last image is just 2 applications of the angle filters on a horizontal blue-magenta-red gradient+black-white gradient. Finally, a comparison of all the filters in the bundle on the same photo. Settings, axis-angle & Euler: Rotation source layer: can be either the current layer, the layer above, or layer below. If the layer doesn't exist, there's no effect. Euler works better with a single layer than axis-angle, so the latter defaults to below instead of current. Target vector offset: changes the zero value that's used to interpret the target layer's colors into vectors. For example, offset 0 means RGB 255, 127, 0 is interpreted as the same vector, but offset 127 means it's taken as 128, 0, -127 instead. Rotation vector offset: same as above, but for the rotation angles/axis. Works kind of like a hue adjustment, and loops around at the extremes. Angle multiplier: by default a value of 255 on the rotation layer is interpreted as one full rotation (which means it has no effect), but the multiplier changes the number of cycles per 255 units. (Euler style) Rotation order: when doing 3D Euler rotations the order matters, so you can choose the order the color channels' rotations are applied. Pick the one that looks the nicest. (Axis-angle style) Source alpha as angle: by default the rotation angle is taken as the maximum value of the RGB components, but alpha on the rotation source layer can be used instead. Negative values as inverse color: rotations can make the color components negative and by default the absolute value is used, i.e. -255 G would be taken as +255 G. When this setting is enabled, -255 G will instead become +255 R, +255 B. Cross product: Second vector layer: either the layer below or above, since the cross product of anything by itself is black and that's boring. Intensity scaling: cross product has a hard time doing "subtle", so the intensity can be scaled to source image intensity or so that the highest RGB component is maxed out. Negative values as inverse color: same as angle styles. Notes: The tool uses a limited layer picker because the built in one in CodeLab often gets stuck if working on multiple documents or the number of layers changes. With axis-angle you're likely to need 2 layers to get good effects: rotating a vector around itself does nothing (point a finger forward, turn your hand upside down around the finger's axis: the finger still points forward) and the other adjustments help only so much. As mentioned above, cross product requires 2 layers: there're no logical adjustments I can think of to make it work with just a single layer without producing all black pixels. Try combining the effects with a slightly altered duplicate of the same layer, e.g. duplicate, do a zoom blur and then color rotate. Version History: V1.2: Added cross product, even if it's arguably not quite the same thing as a true rotation. Fixed an error in the negative values as inverse colors -setting: the negative value was never zeroed out properly. V1.1: Renamed the first effect to Vector Rotation (Euler), added the Axis-Angle variant. Added the negative values as inverse colors -setting. Edited November 6, 2023 by frio version 1.2, added a variant 2 1 3 Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted November 4, 2023 Share Posted November 4, 2023 Like....Wow, Man. This is freaky 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...
frio Posted November 4, 2023 Author Share Posted November 4, 2023 Immediate 1.1 update since I had a shower thought that I could use axis-angle representation as well and take color intensity as the angle. It's maybe even more fun, since they're not janky like Euler angles! 1 1 Quote Link to comment Share on other sites More sharing options...
lynxster4 Posted November 5, 2023 Share Posted November 5, 2023 Took me a bit to figure out how to use this, but as EER says: On 11/3/2023 at 11:52 PM, Ego Eram Reputo said: Like....Wow, Man. This is freaky Good job @frio! 😊👍 3 1 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...
BlastOfBN Posted November 6, 2023 Share Posted November 6, 2023 Oddly enough, this reminds me of Red ochre’s Psychocolour plug-in (I solemnly apologize for the unwanted comparison), which consists of one slider. All comparisons aside, I might need to try this out. You know I love everything of the psychedelic genre 1 Quote Link to comment Share on other sites More sharing options...
frio Posted November 6, 2023 Author Share Posted November 6, 2023 Another quick update to 1.2, now I think I'm done with this train of thought. A good learning experience, now if I get other (maybe less abstract) filter ideas I can give them a go in CodeLab. Changes: fixed an error in the "negatives as inverse" option and added the final simple vector combination that I can think of, cross product (= direct quaternion multiplication discarding the scalar part). Arguably not really a rotation but still similar enough, go easy on me about terminology. 😛 13 hours ago, BlastOfBN said: this reminds me of Red ochre’s Psychocolour plug-in Wasn't familiar with that one but it does appear to have potential for similar results. These are really quite abstract, but the axis-angle one has maybe the most potential: duplicate a layer, do some kind of small adjustment on the bottom copy like a blur, then run the axis-angle rotation on the top layer. Makes for some groovy psychedelic auras around things. Quote Link to comment Share on other sites More sharing options...
BlastOfBN Posted November 6, 2023 Share Posted November 6, 2023 2 hours ago, frio said: Wasn't familiar with that one but it does appear to have potential for similar results Yeah, it doesn’t seem that anyone is familiar with this one: Not even some of the moderators know about this plugin. 1 Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted November 8, 2023 Share Posted November 8, 2023 On 11/7/2023 at 6:30 AM, BlastOfBN said: Not even some of the moderators know about this plugin. I doubt this is true. Why do you say that? I even know why it is called Psychocolor.... 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...
BlastOfBN Posted November 8, 2023 Share Posted November 8, 2023 12 minutes ago, Ego Eram Reputo said: I doubt this is true. Why do you say that? I primarily brought this up considering how whenever it was mentioned (primarily out of context or randomly), not many people were aware of it, including a moderator, whose identity won’t be revealed for this, as I don’t want to start any harassment or ill wills. Quote Link to comment Share on other sites More sharing options...
lynxster4 Posted November 8, 2023 Share Posted November 8, 2023 I use it when I'm looking for color variations. 👍 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...
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.