Jump to content
How to Install Plugins ×

'Bezncurve' - 6 control points (new 21st May 2013)


Recommended Posts

New version that runs on Pdn4.0.13 and Pdn3.5.11

Now in my 10.1 pack

Red ochre plugin pack V 10.1

 

 

'Bezncurve':
For rendering open and closed curves with 6 control points.

under: Render/BeziersAndCurves: .dll name = 'Bezncurve':

There have been a few requests in the past for more control points for the line tool. This may help, although it takes a little getting used to. It is easiest to show the colour coded control points on screen until you are happy with the shape, then untick the box before rendering.

Notes:
1. The black control points are calculated based upon the positions of the control points on either side.
2. There seems to be a slight bug (more noticeable on large line widths on closed curve through points). I think this is in the    GDI methods 'DrawCurve' & 'DrawClosedCurve'?
3. More control points would have been possible but the U.I. become very unwieldy.
4. The curves are anti-aliased. Again adding a tick-box to disable it makes the U.I. too big - (but if this is an issue for pixel artists, Pm' me.) Thanks to Midora the UI is now resizeable and I have added the option to turn off antialiasing.
5. Try the closed Bezier option! - I'm quite proud of this one, it actually uses 10 control points and would be very challenging to draw with the current built in line tool.

Here is the .dll and some screen shots below. Enjoy!
       
(updated 30th May 2013 helped by 'Null54' and 'Midora', many thanks - the 'closed Bezier' now closes correctly)

7WI5blR.jpg

JSeRHRK.jpg

  • Like 1
  • Upvote 4

 

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

 

PdnForumSig2.jpg

Link to comment
Share on other sites

I will use it, thanks :-)

 

Maybe set the dialog to resizable. Srolling is always a mess if your screen is large enough.

 

        protected override void OnCustomizeConfigUIWindowProperties(PropertyCollection props)
        {
            props[ControlInfoPropertyNames.WindowIsSizable].Value = true;
            base.OnCustomizeConfigUIWindowProperties(props);
        } /* OnCustomizeConfigUIWindowProperties */

 

I like the trick to show temporary infos in the image which are not needed for the final rendering. But it's a little bit a pain to remember to switch them off.

 

So if Rick could provide an effect property in the future which tells that the userinterface is in use (I.e. Effect.Interactive) would help to distinguish if the help information should be rendered or not. This is available in OptionBasedLibrary.

midoras signature.gif

Link to comment
Share on other sites

I like the trick to show temporary infos in the image which are not needed for the final rendering. But it's a little bit a pain to remember to switch them off.

 

So if Rick could provide an effect property in the future which tells that the userinterface is in use (I.e. Effect.Interactive) would help to distinguish if the help information should be rendered or not. This is available in OptionBasedLibrary.

 

No. I won't be adding this to the Effect system. By design, the effect does not know whether it's being run w/ a configuration dialog, or whether it's the first time or a repeat (Effect -> Repeat). This adds more test cases, and would be a bug hazard if you had different rendering code for each mode (e.g. low quality "preview" vs. high quality "final"). I don't want any discrepancies between what you see with the configuration dialog vs. without. This is part of the reason why the effects don't have an automatic "low quality" mode they use when the configuration dialog is open. What you see is what you get ... always. No exceptions, no compromises.

 

Rendering stuff onto the image is not good UI, it's just something that was available. There's no good reason to productize and encourage this.

 

If anything, what you want is real UI on the canvas that you can interact with instead of or in addition to what's on the configuration dialog. Although at that point you're more of a Tool, not an Effect. I wouldn't hold your breath, but it's a good idea that's crossed my mind several times.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Thanks for that suggestion Midora - I have included it, and added a checkbox to allow disabling of the AntiAlias smoothing mode. New (re-sizeable!) version in first post.
I may experiment with even more control points now!

Nitenurse - you can call it anything you like! ;)
- Curves would have been the natural name but it would get confused with the colour/tone adjustment.

Sasha - good work, thanks for posting! :star:

Rick - thanks for the explanation. Ideally I would create a plugin UI screen like  'Liquify' and  'Custom brushes' etc. which would behave in a similar way to the built-in line tool. Unfortunately that's way above me at the moment and probably overkill for a plugin like this.

If you are considering more control points for the line tool in the future (after 4 is released), I think that would be the best soloution (if people find this useful). In the meantime (and for people like me on Vista), this is a stop gap.

 

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

 

PdnForumSig2.jpg

Link to comment
Share on other sites

Nice one Red Ochre!  Thank you.  

 

I think you missed the opportunity to call it Mercedes Benz! :)

Link to comment
Share on other sites

If I could see the tangent lines formed by the control points then it would help me to use the tool.

 

 

If anything, what you want is real UI on the canvas that you can interact with instead of or in addition to what's on the configuration dialog. Although at that point you're more of a Tool, not an Effect. I wouldn't hold your breath, but it's a good idea that's crossed my mind several times.

 

That would be great. For sure an IsInteractive property would just be a workaround for tool-like effect plugins like this one. An interactive surface which would be rendered without clipping on top of all other surfaces would be better. But WYSIWYG is a software design decission, so nothing to discuss just to think about.

Edited by midora

midoras signature.gif

Link to comment
Share on other sites

I think you missed the opportunity to call it Mercedes Benz! :)

Bentley? ... I'm British! :lol:

 

Midora - I will play with the idea of showing the construction lines - (effectively the same as the 'straight line to points' for the open Bezier) and may put the code over in plugin developer's central - eventually.

 

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

 

PdnForumSig2.jpg

Link to comment
Share on other sites

  • 2 weeks later...

User AndrewDavid kindly informed me that Bezncurve crashed Pdn 4.0.13.

I have re-written it (and an option for dot dash lines). Download in post 1.
Runs on Pdn 3.5.11 AND Pdn 4.0.13 (for me) - DO report any problems!

I will update the v10 plugin pack as soon as I can.;)

  • Upvote 3

 

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

 

PdnForumSig2.jpg

Link to comment
Share on other sites

Well Done Red, It doesn't crash paint now and I can see what the app does. Amazing a small file like that would cause me so much grief. Looks like the app wants to leave its signature on my art. Are the control points supposed to embed themselves into my art work? After clicking OK my curves were created-but the lines and the control points did too. Am I missing something? I may not be using it right. here˝s a SS

 

MGT9iTs.png

Edited by AndrewDavid
removed ss

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

I know using the default UI and a button to not show the control points is a bit of a hack but writing a custom UI means a ton of extra work.:(
This was written as a 'stop gap' as positioning the native Beziers in Pdn is tricky. For advanced users the Shapemaker plugin is a better alternative now.

 

Eli - I started work on a tapered Bezier plugin but ran into a few problems when the edges crossed at extreme settings. Might see if I can fix it, no promises though.;)

 

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

 

PdnForumSig2.jpg

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