Jump to content

Escher / Droste plugin


PJayTycy
 Share

Recommended Posts

MODERATORS NOTE:  this plugin has been superseded by a newer version:

https://forums.getpaint.net/topic/32240-droste-v11-may-8-2019/

 

 

 

[edit]

If you come looking for the latest version, go to this post.

What follows here are the original text and downloads from when I just started this plugin.

[/edit]

Hello, this is the first "good" version of my Escher / Droste plugin.

First some references to other places:

  • It is based on the mathematics on this page
  • It uses an external mathematics library, mainly for its Complex Number support.
  • The idea for the plugin itself was inspired by this flickr group.
  • I used the code lab plugin to test out some things first. (but sadly could not continue using it when I started using an external library).
  • I used the plugin template, together with BoltBait's detailed steps (4th response in that thread) to create the plugin in visual studio.

 

Currently there are not yet many parameters to tweak, except for inner radius and outer radius. One simple parameter which is still missing for example, is the ability to move the center position.

It does work with non-circular boundaries too, if you create transparent sections in your image. See for example the image I attached here. I transformed it using inner radius = 25, outer radius = 110 to get the result.

 

Attached are these files :

  • a zipfile with the compiled dll + external dll (put them both in Paint.NET/Effects)
  • a zipfile with the visual studio project (you might need to fix the references to the dll's if you installed Paint.NET in a non-standard directory)

 

Have fun, and post your resulting images please :)

DrosteEffect.zip

droste_vs_project.zip

 

Edited by toe_head2001
Link to comment
Share on other sites

Few tests done!

Remarks:

1: submenu distort

2: (icon?)

3: need sliders!!

4: and yes perhaps a way to choose the center

5: ...and the start angle?

BTW, you should wait the next Paint.net version, so you'll be able to add/create easilly the UI and the controls...

Thanks for testing. I think the plugin is polished enough for this forum, but not yet for the general plugin forum. :)

1, 2 : Will try to do that, was not really a focus now. I just added a simple UI on top of it after I got the algorithm working.

3 : sliders : I searched them in the Visual Studio toolbox, but somehow didn't find them :?:

4 : choosing center is very easy to implement in the algorithm, so should be in the next update

5 : by choosing start angle, I think you mean rotation ? It's on my list of "maybe interesting features, which might or might not be easy to add". That list contains : rotation direction, rotation start angle, zooming, number of repetitions in 360 degrees (currently == 1), mirror subsequent repetitions, ...

About waiting for the next version, 2 questions :

  • [*:xzwo9amg] I'm using 3.20 beta 2 currently. Can I use the new UI features with that version already ?
    [*:xzwo9amg] The compiler gives an "obsolete" warning on this part of the code (from the plugin template) :
        public EffectPlugin()
           : base(EffectPlugin.StaticName, EffectPlugin.StaticIcon, EffectPlugin.StaticSubMenuName, true)
       { }

Which PaintDotNet.Effects.Effect constructor should I use instead ? And how do I set the properties then ?

Link to comment
Share on other sites

I'm using VS2008 express and Paint.net 3.20 beta 2 with the IndirectUI : great!

I've placed your code in a template to use the UI (but it's vs2005 express!)

So this is just the droste.cs (plus an icon if you want).

You'll find the syntaxes for the Indirect UI in it (I've tested the center offset:ok, and the angle:not ok)...

    public static string StaticSubMenuName { get { return SubmenuNames.Distort; } }

   public EffectPlugin()
     : base(StaticName, StaticImage, StaticSubMenuName, EffectFlags.Configurable)
   {
   }

replace true by EffectFlags.Configurable

Hope that will help you... Great plugin BTW!

Link to comment
Share on other sites

Hello,

Thanks for the help Madjik and Rick. I will certainly try to convert my plugin to use the new UI methods and include the center offset code.

For now however, I have been working on a new feature : work with transparency on the outside circle instead of on the inside (transparency on both sides should work too).

An example of what you can do :

  • [*:yn3bui68]I took
this photo
[*:yn3bui68]I expand the canvas so the center of the cup is +/- center of the picture (only necessary because I have not yet added the center offset code).
[*:yn3bui68]I removed some of the outer parts (ie: made them transparent) using the magic wand tool in Paint.Net
[*:yn3bui68]Applied the droste effect with "outer transparency" selected (sorry, I don't remember the exact radius settings)

11228_adb99e9038b0fa1c47c3bfb912a29c04

droste_vs_project_002.zip

DrosteEffect_002.zip

Link to comment
Share on other sites

I'm liking this plug in. but why do I have to have two .dll's for it to work? and is this still in the works? I''d like a reset to default button at least, and maybe just a little text showing the range of numbers say works 0-300 0=1000 what ever for each axis.

thank OMA

PS I'm definetly not a tech head but from my end its a nice plug in but needs some work on the user friendliness factor.

Link to comment
Share on other sites

I'm liking this plug in.

thanks

why do I have to have two .dll's for it to work?

one is the external library for Complex Numbers, one is the actual plugin

is this still in the works?

yes

I'd like a reset to default button at least, and maybe just a little text showing the range of numbers say works 0-300 0=1000 what ever for each axis.

the next version should use sliders instead of numbers

from my end its a nice plug in but needs some work on the user friendliness factor.

I know, but somehow I am more interested in adding features than polishing the UI for the moment.

btw, an other image I made with the second version:

2095706414_3462b1d281_m_d.jpg

http://www.flickr.com/photos/21654695@N02/2095706414/

Link to comment
Share on other sites

thanks for the quick reply.

as I said I'm not a tech head so won't even presume to tell you how to write this plug in up.

but saying that I am a fairly experienced PDN user and if I have difficulties figuring it out there will be others in the same boat.

look forward to phase two of your plugin and hopefully you find some time to polish the user interface in the near future.

thanks for your work on this plugin, makes my enjoyment of paint.net increase ++++++

OMA

Link to comment
Share on other sites

  • 1 month later...
I really like this plug-in, but I am wondering, is it going to be any further developed? PJayTycy's last log-in was Dec. 13...

I don't know, maybe it's already finished but lacks an UI?

This plugin (ASCII Art) was not "released" in the plugin forum but is finished (?).

Maybe someone could just make a better UI and it would be done.

Link to comment
Share on other sites

Ok, I have updated this plugin. It's not feature complete yet, but close enough for me.

Thanks to Madjik for converting the previous version to use IndirectUI. The UI is better and easier to expand now, however, I would have spent a lot of time trying to figure out how IndirectUI works.

I also add yet an other feature : multiple repeats / turn. It works good if the center is correctly chosen, if the center is not chosen completely OK, you might get visual artefacts (ie: with 3 repetitions / turn, you could get something triangle-spiral looking instead of a normal spiral)

No example picture this time as third attachment, but a User Interface screenshot :mrgreen:

DrosteEffect_003.zip

droste_vs_project_003.zip

11228_3099e131ab1ba672761c7274ab0bb4b2

Link to comment
Share on other sites

Ok, I have updated this plugin. It's not feature complete yet, but close enough for me.

Then why don't you publish it in the Plugins forum? I'm sure many people who have never so much as looked at this forum would be interested in downloading this plugin. :-)

 

The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.
Amy: But how did it end up in there?
The Doctor: You know fairy tales. A good wizard tricked it.
River Song: I hate good wizards in fairy tales; they always turn out to be him.

Link to comment
Share on other sites

Ok, I have updated this plugin. It's not feature complete yet, but close enough for me.

Then why don't you publish it in the Plugins forum? I'm sure many people who have never so much as looked at this forum would be interested in downloading this plugin. :-)

Maybe because PJayTycy feels "It's not feature complete yet" ??

The_next_thousand_words_by_0_ASH_0.png

All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ]

Link to comment
Share on other sites

Neither are some of pyrochild's stuff. :-)

 

The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.
Amy: But how did it end up in there?
The Doctor: You know fairy tales. A good wizard tricked it.
River Song: I hate good wizards in fairy tales; they always turn out to be him.

Link to comment
Share on other sites

Ok, I have updated this plugin. It's not feature complete yet, but close enough for me.

Then why don't you publish it in the Plugins forum? I'm sure many people who have never so much as looked at this forum would be interested in downloading this plugin. :-)

Maybe because PJayTycy feels "It's not feature complete yet" ??

Nah, I'll probably post it there somewhere next week if nobody reports any problems here.

Link to comment
Share on other sites

This is the code to add for the center with the preview image:

Replace

        protected override ControlInfo OnCreateConfigUI(PropertyCollection props)
       {
           ControlInfo configUI = CreateDefaultConfigUI(props);
           return configUI;
       }

by

        protected override ControlInfo OnCreateConfigUI(PropertyCollection props)
       {
           ControlInfo configUI = CreateDefaultConfigUI(props);
           Surface sourceSurface = this.EnvironmentParameters.SourceSurface;
           Bitmap bitmap = sourceSurface.CreateAliasedBitmap();
           ImageResource imageResource = ImageResource.FromImage(bitmap);
           configUI.SetPropertyControlValue(PropertyNames.Center, ControlInfoPropertyNames.StaticImageUnderlay, imageResource);
           return configUI;
       }

A icon?

Link to comment
Share on other sites

  • 9 months later...

This is a terrific plugin. I've made so many beautiful images with it.

Flowers with green or some color background seem to work good for me.

Here's one I made with a flower.....

DrosteEffect2-1.jpg

DrosteEffect.jpg

Is it me --or do buffalo wings taste like chicken?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...