Sign in to follow this  
Red ochre

'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

  • Upvote 3

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Sasha, love your trial!

 

Red Ochre, how awesome! I am a bit cranky though because I have to work & trying to move house so no time to play at the moment :(

 

Well done! You are a gem :D

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Thank you Red Ochre for this and many other plugins. 

Without a new post, users would not be aware of the 30th May update. Hopefully, this one will alert them to download the newest version.

  • Upvote 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks for the update Red ochre,

 

On my wish list :

Spoiler

pointy-bezancurves-5194755.png

 

@AndrewDavid you have forgotten to uncheck the show controls box. :) 

 

Edited by Eli

Share this post


Link to post
Share on other sites

Such a noob - Just call me Bart :D Thanks very much - Ill get on with learning more plug ins - Guess I˝ll have to write the users guide for this one Eli / Red :/

MGT9iTs.png

Share this post


Link to post
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.;)

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