Jump to content
How to Install Plugins ×
Paint.NET 5.1 is now available! ×

Recommended Posts

Posted

Water Reflection Effect Plugin

 

What's this?

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

Based on Tom Jackson's Reflection water code lab...

water1.jpg

 

Download it!

Plugin WaterReflection.dll

 

WaterReflection.zip

 

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

water_UI.png

The settings in the dialog box:

Distance: Where does the water reflection start in % of the height of the image.

Values 0 to 400, default is 50 (middle of the image).

Waves period: This is the wave frequency (not the height but the width amplitude).

Values 0.01 to 100, default is 10.

Duration: The wave is fading slowly while it comes to the bottom of the image. You could change the speed of fading with this slider.

Values 0.01 to 200, default is 100.

Blur: As gaussian blur but done within the same effect.

Values 0 to 10 (very slow!!!), default is 0.

Start Angle: You could move the angle to change a bit the aspect of the wave...

Wind: Add some smooth distort effect.

Values -100 to 100, default is 0.

Distort: Add some strong distort effect.

Values -100 to 100, default is 0.

Transparent water: Progressive transparency

Distort full height: The effect applies also on the upper part of the image.

Use transparency as shore: This check box allows you to define the line the water should follow. You create a transparent cut in the image (top=image, bottom=transparent). The water effect will follow the curve of the cut.

A smooth curve gives a better result...

 

water9.png

  • 2 weeks later...
Posted

I love this plugin! Thanks MadJik.

I used the effect twice in this picture. I used it in the regular way to make the first (foreground) reflection, then I flipped the word vertically and made a second reflection. I used the second reflection to make a watery shadow behind the word.

waterpaintingKORTECKPNG360x240.png

KORTECKGOLDGIFSIG455x100.gif
  • 4 weeks later...
Posted

My water reflection effect. Implement with lua script on artweaver, not with .net code yet -- Honestly, I have not install paint.dot on this computer, and still have trouble to write the whole thing from loading to save.

I have not apply distortion on y direction. Working on it now, but first want to see if it is necessary.

Right now I got 10 control parameters, have not figure out which is more important yet, still need to try to get rid something not important.

As I feel, it is one of the fastest filter in lua on artweaver, because it just has one loop thru.

Effect with different paramters, which I have not found way or proper name to discribe them.

Edit by Rick: Images removed. They're kinda cool but we don't need 20 pages worth of them.

Now with y distortion, 11 control parameters

weak y distortion factor

Edit by Rick: Images removed. They're kinda cool but we don't need 20 pages worth of them.

Posted

I am studying .not now, that is the first reason.

I like computer graphics, that is the second reason.

I installed it on another computer, and wish sometimes later I will not need to pivate paintshop pro, therefore I support all good free paint programs (paint.net start slow on this one, therefore I use artweaver, as a comparison, some good freeware painter including:

paint.net

photobie.net --- not tried yet.

paintstar

artweaver

deep paint -- large

gimp

photoplus

Studioline -- large

and the huge ms acrylic preview and graphic designer (not tried)

pixia

graphicgale

photoclinic

photofiltre

As I know, gimp start very slow, then paint.net on this computer, artweaver a little faster but slower than paint.net on the other. The other software nearly same and fast.

I hate pixia's interface. I hate ms' huge size. And photoplus seems have lots of svg component. But the company freeware normally not attractive. They will make it candylike and there will be no improvement for years.

I like to try and see if there is new function or effect in other software. Like photoclinic, they have a swirl distortion that is much clearer than the one in the artweaver.

Last, I once was trying to enter your college:)

I am trying to use the lua to create the dialog for the controls. Artweaver dies or ignores all the time. There is suggestion in lua interface -- syntax error notification! No I have to adjust the parameter by hand:)

I made the first .net paint program yesterday, seems easier than using the openGL and original C graphics. But I still have problems to totally understand madjik's code. Algorithm part is ok, the beginning loops is hard to understand without any context.

Posted
Dude, those are way too big. Just post the thumbnails...

sorry for that, I forget to copy the tb link. and the thumbs look same to me.

Next time I will use smaller images.

Yeah, I understand he's not using PDN nor its plugins (only 3 sliders!).

What is that?

Another control parameter is added to make the interface between water and sky more distinctive.

lotr9az4.th.jpg

lotrawl8.th.jpg

strong effect is x-direction distortion, its power factor

y-direction distortion is not significant.

This is a game of mathematics !! :lol::lol::lol::lol::lol::lol::lol::lol::lol::lol:

Posted
I made the first .net paint program yesterday, seems easier than using the openGL and original C graphics. But I still have problems to totally understand madjik's code. Algorithm part is ok, the beginning loops is hard to understand without any context.

To be honest I'm not understanding all the code too. The fact is the code isn't from me at the begining (plugin template, paint.net source, codelabs codes, etc...)

Trying and testing (and mixing) the code(s) is a (my) way to learn about c#.

a PM discussion I had with a forumer

I'm not C# programer! (yet).

How do I do plugins then?

I know other programing languages and procedural languages (RPG, VB6, VBA,..). I was firstly teached to work with S/36, S/38 then AS/400 (IBM mini systems). Since a while I'm trying to learn about PC world(s)!

Last year I went to MS tech-days for Visual studio and I was told about VS 2005 express (free version of VS 2005). I first get familiar with Visual basic 2005 (by myself). Then I tested Visual Web...

AND.... I was digging in the MS forums for VS when I found a link to PDN !!!!!!!! Free MS-Paint Alternative (or something similar) it was said.

Download and test and press F1 and tutorial and PDN FORUM!!!

On this forum I found a lot of question/answers/discussions/argues/etc...

But I was attracted by the codes I've found on some topics.... Then I tried them with the codelab. It's easy to read for me but I'm still not a fluant writer... So I need a model to be able to code by myself.

The rest is more about logical problems or mathematical functions...

I'm seriously thinking about purchase a book on C# now I could create something...

end of PM

In the codelab we have only one dst/src.

Example (checker.cs from Codelab):

void Render(Surface dst, Surface src, Rectangle rect)
{
   for(int y = rect.Top; y < rect.Bottom; y++)
   {
       for (int x = rect.Left; x < rect.Right; x++)
       {
           byte c = (byte)(x ^ y);
           dst[x, y] = ColorBgra.FromBgr(c,c,c);
       }
   }
}

For a plugin we have to use a loop like this:

public override void Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, int startIndex, int length) {
 Surface dst = dstArgs.Surface;
 Surface src = srcArgs.Surface;
 for (int i = startIndex; i < startIndex + length; i++) {
    Rectangle rect = rois[i];
  ...

It's like that! it's not my code! And I agree that it's make a bit more complicate to adapt a codelab to be a plugin...

About the First/Second loop: I read somewhere that we should(must) write in the destination image line per line. This is why I thought about a temporary table to "plot" the curves without 'line per line' consideration and a second loop to write correctly in the destination.

This is the main change I've applied in the polygone plugins and it has a big impact in the speed of the rendering...

Regards

  • 2 weeks later...
  • 2 weeks later...
Posted

O.K., I've tried using this plugin, but nothing happens. What are the instructions and process for using it? It looks like a really cool plugin, I just for whatever reason can't get it to work.

Thanks,

M_Lyons4_Signature.jpg

My First Signature...

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