Sign in to follow this  
Followers 0
black2hack

Shatters

14 posts in this topic

Hello! It's my first Paint.NET plugin. It's not complete yet but it works (to a greater or lesser extent) and I'd like to show what I've done.

The main point of the plugin is easy - it shatters a picture to fragments. Fragments are placed on a rectangle matrix.

ae4ae03a1148t.jpgdc0ba2d5265ct.jpg

200d3779a45dt.jpg

The plugin's config has 5 parameters:

Count of Columns = number of columns of a matrix of fragments (integer, >=1)

Count of Rows = number of rows of a matrix of fragments (integer, >=1)

Shifting (pixels) shows a distance between fragments (integer, >=0)

Fluctuation (%) shows how much fragments differ from rectangle (integer, >=0, <=100)

Max Angle (degrees) shows how much fragments rotate (integer)

In this plugin I've used Interpolation function I had found in AdvancedRotate plugin by Stuart Radforth. Stuart, I hope you don't mind. boltbait.smile.png

Please, don't forget it's only a beta version! The general disadvantages are it has no anti-antialiasing and it works slow. VERY SLOW I mean boltbait.smile.png. You can help me to cope with the second problem here, I'd really appreciate it. Good news is the plugin has no bugs as far as I know.

Enjoy!

Shatters_0.55beta.zip

Edited by black2hack
0

Share this post


Link to post
Share on other sites

I tried it. The canvas doesn't seem to update when you change the parameters. This leaves you blind in trying to figure things out.

0

Share this post


Link to post
Share on other sites

You mean nothing happens until you click OK? Yep, but taking into account speed of the rendering in this beta it's not an issue =)

Though I've just realized the way to make it better. I'll fix it.

Edited by black2hack
0

Share this post


Link to post
Share on other sites

It's a lot easier if you just use IndirectUI. Instead of deriving from Effect, derive from PropertyBasedEffect. All that WinForms nonsense just vanishes into a cloud of stress relieving helpfulness.

0

Share this post


Link to post
Share on other sites

This looks useful. I hope you get the issues sorted. I'd like to try it once the bugs mentioned are ironed out. Good on you & thank you!

0

Share this post


Link to post
Share on other sites

Very similar now that you come to mention it.

0

Share this post


Link to post
Share on other sites

Thank you for comments. I'll continue working at the plugin next weekend and will try to make it better.

2yellowman. No, it's a different effect. Firstly, fragments can be not only regular rectangles. Seconly, fragments are unaffected parts of an initial picture.

0

Share this post


Link to post
Share on other sites

2yellowman. No, it's a different effect. Firstly, fragments can be not only regular rectangles. Seconly, fragments are unaffected parts of an initial picture.

You are right, it is actually different, I thought it is not working, then realized it is very slow on my PC, and when I tried it on a small size (200x150) I saw the effect, it is rotating the pieces in random angles, right?

0

Share this post


Link to post
Share on other sites

2pdnnoob. Thank you, I'll do my best =)

2yellowman. Yes. Max Angle defines a maximum angle of random rotations of fragments, Fluctuation defines maximum deviation of fragments from regular rectangles. The more size of a picture and a count of fragments the more time of rendering. I gotta make ROI system work. When I do it rendering process will be much faster.

Btw, I still don't understand how ROI actually works and why it reduces time of rendering. If you wish to explain it, please follow here and leave your message after the beep.

0

Share this post


Link to post
Share on other sites

I read this before and I'd like to see more detailed explanation.

Edited by black2hack
0

Share this post


Link to post
Share on other sites

ROI = Rectangle of Interest (a number of grouped pixels)

Really basically: Paint.net divides the effects 'work' into manageable hunks. Hunks = ROI. A dual core processor (for e.g.) may process two hunks simultaneously, so dividing up the work into chunks allows for faster processing on multi-core processors.

Think of it like this:

A builder has a brick wall to build containing 1000 bricks.

He can do it all himself - but it takes 10 hours at 100 bricks an hour.

If his mate helps, they can build the wall in 5 hours (combined speed of 200 bricks an hour).

If all his mates help (20 of them) they can build the wall in 30 minutes.

Now substitute pixels for bricks, and processing cores for mates and you'll begin to understand why passing the work in small units (ROI) can make the work much easier and faster.

2

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