Jump to content
How to Install Plugins ×

Moire (ymd:100726)


MadJik

Recommended Posts

Moire Texture Effect Plugin

 

Moire1.jpg

 

What's this?

Provided in the samples with the CodeLab you could find a Moire.cs:

void Render(Surface dst, Surface src, Rectangle rect)
{
   for(int y = rect.Top; y < rect.Bottom; y++)
   {
       int v = (2 * y - dst.Height) / 2;
       for (int x = rect.Left; x < rect.Right; x++)
       {
           int u = (2 * x - dst.Width) / 2;
           byte c = Utility.ClampToByte(
               128 + 127 * Math.Sin((u*u+v*v) / 100.0));
           dst[x, y] = ColorBgra.FromBgr(c,c,c);
       }
   }
}
 

I've revised the code to :

1. have it centered

2. have sliders per chanel of colors Red, Green, Blue and Alpha.

3. change the raduis, etc...

 

:( :oops: all this gives a long UI... Sorry...

 

 

:Warning: This is a texture plugin. It replaces the selection (or the active layer if no selection).

 

 

Download it!

Plugin Moire.dll

ar.pngHere is the DLLal.png

 

 

The MadJik's All plugins package is available !

http://forums.getpaint.net/index.php?showtopic=7186

 

 

How to install

Close Paint.net

 

Classic version of Paint.net

Unzip and (re)place the DLL in your Effect folder usually: C:/Program Files/Paint.NET/Effects

 

Microsoft Store version of Paint.net

Unzip and (re)place the DLL in your Effect folder usually: /My Documents/paint.net App Files/Effects/

You have to adapt for your language My Documents

 

 

The User interface

This plugin is added to the menu Effects, submenu Texture.

Moire_UI.png

 

For each chanel:

Zoom: to increase/decrease the size of the circles.

Light: to set the strength of the color.

Fog: to make the circle smoother or vice-versa.

Offset: you could move the center.

 

Some examples:

moire.jpg

 

moire2.jpg

 

moire3.jpg

 

Link to comment
Share on other sites

To be honest Madjik, it's the UI that's keeping me from this one. :(

Agreed. Nice effect and what not, but the UI is the farthest thing from user friendly. Perhaps some tabs, a little jaz, who knows?

signature.png

Link to comment
Share on other sites

It is quite interesting what this plug in dose. Thank you for making and publishing it.

But I do have to agrea with the other comments. A few plug ins use scrolling UI. And I think this should be avoided, if possible.

My DA: http://leif-j.deviantart.com/

--------------

Some people seek justice so persistent, that they will do great injustice themselves.

Link to comment
Share on other sites

Ok, I agree, it's a sad long UI.

But I think this plugin isn't great enough to take more time on it.

Just show me I'm wrong, then I'll revise it (perhaps)!

Well, you could use the forms designer in VS to do the tabs idea.

Link to comment
Share on other sites

Adding tabs won't make the UI easier.

You should focus on a few things, instead of requiring the user to figure out every possible input to your functions. Make the UI fun, not complicated. Just because flexibility is possible doesn't mean it's what anybody wants.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Adding tabs won't make the UI easier.

You should focus on a few things, instead of requiring the user to figure out every possible input to your functions. Make the UI fun, not complicated. Just because flexibility is possible doesn't mean it's what anybody wants.

Using the indirect UI, is it possible to add tabs? I was under the assumption that the indirect UI is limited to a set of UI controls, and I have not seen the ability to add tabs... did I miss that?

I realize you can use the earlier plugin api to use winforms and create your own UI, but I also assumed that was being obsoleted.

Total hack.

Link to comment
Share on other sites

Using the indirect UI, is it possible to add tabs? I was under the assumption that the indirect UI is limited to a set of UI controls, and I have not seen the ability to add tabs... did I miss that?
No. No tabs.
I realize you can use the earlier plugin api to use winforms and create your own UI, but I also assumed that was being obsoleted.

It's not really obsoleted, seeing as the PropertyBasedEffect and whatnot is an extension of Effect. You can't obsolete something when the new version depends heavily on the thing you're trying to obsolete ;)

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

It's not really obsoleted, seeing as the PropertyBasedEffect and whatnot is an extension of Effect. You can't obsolete something when the new version depends heavily on the thing you're trying to obsolete ;)

Understood... but some of the methods (or overrides) are marked as "obsolete", so I assume that means Rick is trying to tell us something.... like, "hey, don't use these, they might not be here later".

I would much rather use my own UI for most things... maybe I'll just start doing that.

Total hack.

Link to comment
Share on other sites

  • 4 months later...

I got this one, using the moire plugin:

moirekj2.png

I like it. Reminds me of those colored "church-window-glass-thingies" (it's 'glas-in-lood' in dutch, but I don't know what it's called in english, :roll: :? sorry!)

signature2mr.png

Link to comment
Share on other sites

  • 5 years later...

"You can't obsolete something when the new version depends heavily on the thing you're trying to obsolete." lol What?

don't worry about it ;P

No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait

Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo

Link to comment
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.

×
×
  • Create New...