Sign in to follow this  
Followers 0
MadJik

Moire (ymd:100726)

16 posts in this topic

Moire Texture Effect Plugin

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 source is available with the plugins package!

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

How to install

Close Paint.net

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

The User interface

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

moire.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-1.jpg

moire2.jpg

moire3.jpg

(Autolevel on this one!)

0

Share this post


Link to post
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?

0

Share this post


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

0

Share this post


Link to post
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)!

0

Share this post


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

0

Share this post


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

0

Share this post


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

0

Share this post


Link to post
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 ;)

0

Share this post


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

0

Share this post


Link to post
Share on other sites
I love what this can do. The UI was no problem for me...

moirekg5.png

Opera users, click and drag that picture ^^^ over the orignal and watch it! :shock:

0

Share this post


Link to post
Share on other sites

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!)

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

"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
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0