Jump to content

n d

Members
  • Posts

    120
  • Joined

  • Last visited

Posts posted by n d

  1. That's a nice idea Sarkut. Unfortunately it's a bit harder to implement on the plugin itself - this would require to call the zoom blur only after all of the gradient is rendered, and I know of no good way to do this thanks to the ROI system which splits the render area in smaller segments...

    Anyway, I'm still trying various options - I'm trying to do something like a convolution filter.

    On the good news, can you notice the speed up I achieved on Trail 3d compared to Shaped gradient? I found a way to optimize the code further, so you can expect a speed-up update to shaped gradient as well, soon.

    ... meh, didn't work after all... the code happens to be too different in that particular spot... damn.

  2. This is similar to my other plugin, shaped gradient. But instead of making the gradient in the shape of the selection, this is object-based - ie. it creates a sort of "trail" from the object to center point.

    You'll have to draw something on a transparent layer, then apply trail 3d, and see what happens...

    Examples

    Before:

     

    trex1.png

     

    After:

     

    trex2.jpg

     

    To-do:

    -implement anti-alias. As soon as I figure out how to do it on Shaped Gradient I will do the same on this - the code is very similar so porting a feature from one effect to the other is easy.

    -a feature to adjust the length of the trail. This should be relatively easy to code and will be in the next version, I hope.

    Enjoy.

    trail3d.zip

    • Upvote 1
  3. The plugin keeps crashing for me.

    Here's the error details

    File: C:\Program Files\Paint.NET\Effects\Lightning.dll
    	Name: LightningC.LightningC
    	Version: 1.0.3892.21014
    	Author: Cookies
    	Copyright: Copyright © Ego Eram Reputo
    	Website: http://www.getpaint.net/redirect/plugins.html
    	Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.NullReferenceException: Object reference not set to an instance of an object.
    at PaintDotNet.Effects.CloudsEffect.OnRender(Rectangle[] renderRects, Int32 startIndex, Int32 length) in D:\src\pdn\pdn_35x\src\Effects\CloudsEffect.cs:line 137
    at PaintDotNet.Effects.Effect`1.Render(Rectangle[] renderRects, Int32 startIndex, Int32 length) in D:\src\pdn\pdn_35x\src\Effects\Effect`1.cs:line 57
    at LightningC.LightningC.Render(Surface dst, Surface src, Rectangle rect)
    at LightningC.LightningC.OnRender(Rectangle[] rois, Int32 startIndex, Int32 length)
    at PaintDotNet.Effects.Effect`1.Render(Rectangle[] renderRects, Int32 startIndex, Int32 length) in D:\src\pdn\pdn_35x\src\Effects\Effect`1.cs:line 57
    at PaintDotNet.Effects.Effect`1.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length) in D:\src\pdn\pdn_35x\src\Effects\Effect`1.cs:line 100
    at PaintDotNet.Effects.Effect.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois) in D:\src\pdn\pdn_35x\src\Effects\Effect.cs:line 211
    at PaintDotNet.Effects.BackgroundEffectRenderer.RendererContext.Renderer(EffectConfigToken token) in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 127
    --- End of inner exception stack trace ---
    at PaintDotNet.Effects.BackgroundEffectRenderer.DrainExceptions() in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 372
    at PaintDotNet.Effects.BackgroundEffectRenderer.Join() in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 363
    at PaintDotNet.Effects.BackgroundEffectRenderer.Abort() in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 327
    at PaintDotNet.Effects.BackgroundEffectRenderer.Start() in D:\src\pdn\pdn_35x\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 274
    at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClass1d.<>c__DisplayClass21.<RunEffectImpl>b__10() in D:\src\pdn\pdn_35x\src\PaintDotNet\Menus\EffectMenuBase.cs:line 827
    

  4. I'd definitely start with the template boltbait.wink.png Read @Sepcot's instructions thoroughly and note where he says: "do NOT unzip the template".

    If you want a little more help I'm happy to send you a copy of something I'm currently working on (in VS 2010 express).

    That'd be great, please do :)

    I also use vs2010 and seems most of the templates & sources pyro posted are for earlier versions... they don't always convert properly (like the blendmodes plus source.)

  5. Hi, this time I'm helping everyone make their images legible for the colourblind.

    If you're doing webpage design, or something similar where accessibility is important, you'll want to make sure that any critical elements of your webpage or other application are clearly visible for the colourblind.

    This effect simulates colourblindness, so you can see how your image looks in the eyes of a colourblind person. It currently only supports red/green colourblindness, but I intend to add more colourblindness types in the future. Red/green colourblindness is the most common form though, blue/yellow colourblindness is like 100 times rarer or so...

    Usage is simple, 3 options:

    Protanope - simulates protanope type colourblindness where red cone cells are dysfunctional
    Deuteranope - simulates deuteranope type colourblindness where green cone cells are dysfunctional
    General red/green - a general purpose red/green blindness simulation, just sets both red & green into an average of red & green

    colourblindsim.zip

  6. Ok, taking another approach, how would I go about implementing a winforms interface on a paint.net plugin?

    Is it a complicated task? I know how to design winforms applications, but I have no idea how to add them to a class library... or rather, I know how to add it, but how do I make it so that it replaces the indirectUI which is used by default by any codelab-generated code...?

  7. One solution would be to replace the 2nd slider with increase and decrease buttons, although this obviously wouldn't be as convenient as a slider.

    True.. it would be kinda inconvenient.

    is there no way the value of the indirectUI controls can be manipulated from within the code? Do I need to create a winforms interface for this?

  8. Now there's a new problem though:

    Every time slider1 is moved, it automatically sets the kerning values to whatever slider2 happens to be at that time. So this would mean that the values would have to be adjusted in order, and you can't move back to change anything or you'll have to adjust everything in between again... not a big improvement from the previous UI.

    Is there a way to move the sliders from inside the plugin? I would like the value that's stored in the array to be restored to the second slider when the first slider is moved. But can I do that, and if so, how?

  9. Ok, as for the 2 sliders thing, apparently I can't do that on codelab. I would need to declare the array where the kerning values will be stored outside the render loop, so that it is declared only once when the effect is started. Otherwise the effect keeps resetting the array everytime the render loop is called...

    So where should I declare the array?

    edit. never mind, figured that out ;)

    (I made a new public static class at the start of the effect and that seems to work.)

  10. Well... personally I feel if the users can't understand that a slider that controls which character you move doesn't move anything if you set it on letter #20 on a 10-letter word, then I would recommend some basic math lessons before they even try to use a computer.

    But yeah, if anyone can think of a better solution I'm all ears (or should I say eyes.)

  11. One downside with the approach I suggested is IIRC you can't change the slider boundaries dynamically, so you'll have to make Amount1 relatively large and show an error message if it exceeds the number of letters.

    Hm. couldn't I also just transfer the string into an array of char and pad it with spaces, so it will always be long enough?

  12. Have you considered just using a slider to select which character to adjust? If you wanted to have a dropdown box listing every letter you'd presumably have to OCR the image.

    Yeah, a slider would probably work. I can't believe I didn't think of that...

    So, I should make two sliders. Let's name them Amount1 and Amount2 for simplicity...

    Amount1 would control which character Amount2 moves.

    So, every time Amount2 is changed my code should check the value in Amount1 and then it adjusts the number in the kerning array[Amount1] according to the value of Amount2.

    So what I need to know, is there a method that can be used (in codelab if possible?) to check if the value of Amount2 changes?

  13. Create a new class library in VS, add the main PDN DLLs (Base, Core, Data and Effects) as references, run the save as DLL command in CodeLab and check view source, then paste it into your VS code file.

    Yep, I had gotten that far... I'm just not all too sure how to implement the drop-down + slider functionality on the plugin. Can I use the VS winforms designer to design the plugin interface?

    Sorry, I'm quite a noob at this still..

  14. oh, ok then. Igonoring the UI, the plugin is fantastic. Saves a lot of selecting and moving text letters individually to get the right look. thanks! :D

    Glad you like it.

    Hope you wont mind some more suggestions, but i'll suggest anyway. :P

    I won't mind.

    - add an open type font compatability.

    It already is. At least, opentype fonts work on it on my computer. If they don't on yours... I honestly have no idea why that would be.

    - perhaps a kerning in the y axis option?

    You do realize this would double the amount of sliders? Are you sure you want this? ;)

    - scale the text from the centre of the text, not the top left?

    Hm. The Graphics.DrawString method uses the top left corner for the text placement, so I don't know - I might be able to do this with the y axis, but doing it with the x axis would be kinda complicated ....

    anti-aliasing doesn't always work at larger font sizes if set to 2. it works pretty much all the time if set to 1.

    So just use 1. ;)

    Honestly, I'm not even sure what the 2 option is useful for, but decided to include it anyways...

    Thats.. about it. :P

    Great work though! Loving all of it, well, most of it. :D

    Thanks.

    Something I am going to add is an "overall" slider which adjusts the overall x-spacing of the letters... I noticed, with longer words and fonts that need lots of adjusting, the sliders may not go far enough... so this would fix this problem without making the sliders too big and hard to adjust (the UI is bad enough already...)

×
×
  • Create New...