Jump to content

'FurBlur' - ROI & 'Random' problems.


Recommended Posts

On larger canvases (3840x2040) I am seeing only horizontal lines no matter what the settings are & it does take a really long time even on my machine...

 

I'm thinking maybe some tute on how everyone got their lovely results would be good.

 

I love Doughty's outcome. Such a lovely texture. 

 

Great plugin that will come in handy for many, many things. Thanks Red Ochre!

THiGVp.png

Knowledge is no burden to carry.

 

April Jones, 2012

 
Link to comment
Share on other sites

- Just typed a long reply BBQ - then bashed the mouse and I've got to type it all again!

 

Ok. Best not to use on all of a large canvas to start with.

The calculations are run single threadedly - so none of the speed advantages of a powerful machine.

I suspect the little lines are the effect - it operates on a pixel size scale so may be hard to see on a huge canvas.

 

Suggest to test:

1. New image 800 * 600 - make background black.

2. New layer (transparent)

3. Draw 10 pix wiggly lines. nice bright colours

4. Possibly select around these lines with the lasso tool (leave plenty of room for the effect!)

5. Effects/Blurs/Furblur - lower the 'rep' slider and increase the 'length' slider to start.

6. Try each slider seperately to see what they do.

 

If still no joy report back please!

 

I am working on getting some examples together at the moment with screenshots.

6ifH20t.png

  • Upvote 2

 

Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings

 

PdnForumSig2.jpg

Link to comment
Share on other sites

If the answer to presets is "no" - then why not give the user the option of load/save the UI settings via XML (e.g. Shape 3D)?  At least that way they can save all the settings in one go.

Link to comment
Share on other sites

EER-reminds me of young Einstein after an escapade...:P

 

Red - doesn't that just suck! I am sorry to hear that happened to you but awfully glad for the great advice. Very much appreciated. Now I can play some more...:D

THiGVp.png

Knowledge is no burden to carry.

 

April Jones, 2012

 
Link to comment
Share on other sites

TR - love it! B)

EER - That is a good idea - I must admit I haven't got a clue where to start though and have never used that Shape3D option. If you would like to help me, I/we can either delay publication or add this as an update later?
I would favour publishing sooner - so people have a proper thread to show all these great images.

YM - great fun! :lol:

BBQ - I hope you are getting decent results now - if not, please post back. I am useless at explaining things (not great at understanding sometimes either!).

WB - I'm hoping this will be useful for textures and chromatography/watercolour type effects as well as photo-manips (which are great fun!).
 

 

Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings

 

PdnForumSig2.jpg

Link to comment
Share on other sites

@ Yellowman - you're in TROUBLE now!  :lol:

 

EER - That is a good idea - I must admit I haven't got a clue where to start though and have never used that Shape3D option. If you would like to help me, I/we can either delay publication or add this as an update later?


I would favour publishing sooner - so people have a proper thread to show all these great images.

 

I used an XML file to load and save the History in WhichSymbol+.  I'm sure all the other real coders would have a neat serialization solution rather than use my brute-force approach.

 

However, I'd be willing to help as I was reading up on this just yesterday - I'll send you a link to an article which you might find illuminating.

Link to comment
Share on other sites

Nice work Oceana! - glad the instructions helped.

 

EER - just about to publish - perhaps we can work on the XML idea for future updates.

 

All - you've made some good images here - please feel free to repost them on the published  FurBlur thread. Thanks for testing!

 

Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings

 

PdnForumSig2.jpg

Link to comment
Share on other sites

Sure.  I'm not completely sure how we can do it using IndirectUI.  You need a load/save option.

Link to comment
Share on other sites

Instead of a PropertyBased solution (using IndirectUi) the OptionBasedLibrary may be used. It offers the simplicity of PropertyBased plus extra features like

- xml serialization of options (load/save copy/paste of options)

- reset all

- about

- more ui elements including containers (i.e. tabs)

- translations via .dlc file

- extensibility (define your own option controls)

- distinguishes between intermediate and final rendering

There is just no final version in the moment because I^m a little bit busy on real life work ;-)

The library versions differ in name so there is no risk that changes in the interface will create incompatibilities.

The switch from a property based solution to the option based is typically done in some minutes (if you know both interfaces).

The library will be open source after reaching version 1.0 ;-)

  • Upvote 1

midoras signature.gif

Link to comment
Share on other sites

If your still looking for a Save Settings method Maybe this will help. It's my Pixel Puller with 10 save-able slots. kinda like GameBoy.

 

Please don't use such methods to implement things. This is really not the Paint.NET way and there is no need to do it.

1) You should never write to the program folder. It should be write protected.

2) If the UI elements do not reflect the settings used to render then you are disturbing the way how tokens are handled by the application. This has several side effects. I.e. you are not able to repeat the effect using Ctrl-F.

3) In general try to avoid to kill the multithreading of Paint.NET. Use the OnRender function to render the stuff. If you are not doing this then the user will never get any feedback in the progressbar nor gain from multicore environments.

4) Respect that IndirectUi is limited and allows together with CodeLab fast programming of effects (you are allowed to concentrate on the math). If you need more UI things go one step back and use the basic effect interface (Or maybe OptionBasedLibrary ;-)

  • Upvote 1

midoras signature.gif

Link to comment
Share on other sites

Midora - the OptionBasedLibrary sounds very promising!

TR - Thanks for the example code and .dll - I can just about get the idea of how it works. It could be a useful technique for future plugins. (Update: Midora has just posted - so, still interesting but looks like the long way is best - many thanks anyway)

Regarding presets or user saveable settings for FurBlur, I'm not sure it would make the effect any easier to use or understand. Because it is a blur on a pixel size scale, any preset would look very different on different selection sizes. If it was a GDI+ based render effect, then the preset sizes could take selection size into account - and presets would be a better idea.

I have used a drop-down list and switch block before, to make presets that change the way the control values are used (or ignore them). (e.g. 'Highlight' and 'Object2colour'). - Haven't tried anything saveable though.

I tend to think some users will want a plugin to work perfectly with the default values and others are happy to explore all the controls to get the effect they want. I'm not sure the first type would be bothered to create and save settings and the second type possibly wouldn't need to?

For Effects more generally, I tend to either use an effect with different settings each time or consecutively run the same effect with same 'auto-remembered' settings. If I really need to record exact settings for a plugin I write them down - (useful equations for 3D Object plugin for example).

So, I don't intend to add presets to Furblur but will consider it for future plugins. Many thanks for all the suggestions and info though. Some of it will sink in eventually!
 

 

Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings

 

PdnForumSig2.jpg

Link to comment
Share on other sites

Regarding presets or user saveable settings for FurBlur, I'm not sure it would make the effect any easier to use or understand. Because it is a blur on a pixel size scale, any preset would look very different on different selection sizes. If it was a GDI+ based render effect, then the preset sizes could take selection size into account - and presets would be a better idea.

 

Do you mean Windows Forms based?

 

 

As for loading and saving XML settings.

Hidden Content:
<?xml version="1.0"?>
<FurBlurToken xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <StartColor>FromSrc</StartColor>
  <Repetitions>5</Repetitions>
  <MaxLength>30</MaxLength>
  <LengthVariation>0.1</LengthVariation>
  <MainAngle>45</MainAngle>
  <BothDirections>false</BothDirections>
  <AngleVariation>0.1</AngleVariation>
  <CurveType>Spiral</CurveType>
  <Curvature>0.1</Curvature>
  <CurveVariation>0.1</CurveVariation>
  <Frizz>0.1</Frizz>
  <StartObjectTransparency>250</StartObjectTransparency>
  <BlurAmount>0</BlurAmount>
  <MixAlongFur>true</MixAlongFur>
  <ColourMixRatio>0</ColourMixRatio>
  <Antialias>false</Antialias>
  <OnlyKeepFur>false</OnlyKeepFur>
  <RandomSeed>0</RandomSeed>
</FurBlurToken>

  • Upvote 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

Hi Null54,

Imagine a preset called say 'very large curls' created on a standard 800 by 600 canvas.
The user next uses this preset on a 1600 by 1200 canvas and eventually sees a very small curly texture.
The effect the user sees is very dependant upon the selection size.

I think the presets idea would be more relevant for a 'Render' effect where the size, especially line width, can be related to the selection size. If FurBlur had used GDI+ to draw the lines it would have been relatively easy to change the line width based on selection size. But then it would be a different effect.

Thanks for the example XML - I can see presets being useful for other effects but not really convinced it is needed for this one.

Do I understand correctly, XML presets could only be used with a Windows Forms based effect (or the 'OptionBasedLibrary' in the future) but are not possible with the current IndirectUI?

Sorry for my confusing explanations!
 

 

Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings

 

PdnForumSig2.jpg

Link to comment
Share on other sites

Wouldn't tuples of an image and a preset would make sense?

 

 

Do I understand correctly, XML presets could only be used with a Windows Forms based effect (or the 'OptionBasedLibrary' in the future) but are not possible with the current IndirectUI?
 

 

Imagine the following (simplyfied): PropertyBasedEffect derives from Effect. It provides a token, a dialog and the renderer. The properties (variables) you are defining are used to create the controls in the dialog and the content of the token. Entering a property value in the dialog triggers the creation of a token containing all current values of the properties. The token will then be sent to the render function. Dialog and render function are running in different threads. So render does not block the UI.

If you press OK then a final token will be created and sent to render. At the same time Paint.NET stores this token and and reuses it the next time to setup the dialog or to allow to repeat the command by just sending the token to render w/o opening the dialog.

 

But there is no way in PropertyBasedEffects to create a token and tell the effect to use it. The only thing you may do is to set a flag which will be evaluated in the render function which uses a different setting or saves the current one. But there is no way to store property values in a token and sent it back to the effect or dialog. This disturbs the standard way how Paint.NET works.

 

OptionBasedEffect is simular to PropertyBased but with some add-ons like the load/save copy/paste of the token feature. You do not have to do something special. This is a build-in functionality (OK you have to set a config flag ;-) Only if you are creating your own OptionControls and the datatype of the control is complex then you also have to provide an xml-serializer and deserializer.

  • Upvote 1

midoras signature.gif

Link to comment
Share on other sites

Where can I find documentation for the  OptionBasedLibrary

 

There is an ExampleOptionBasedEffect project like the ExamplePropertyBasedEffect which I posted earlier in this forum. This I may upload because it exists. Everything else is - as always - timecritical. To provide a good documentation is costly I guess you know. But we may discuss the stuff in an OptionBasedEffect thread.

midoras signature.gif

Link to comment
Share on other sites

Very nice explanation of the plugin system Midora! Thank you for making it so clear.

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