Jump to content

Red ochre

Members
  • Posts

    3,025
  • Joined

  • Last visited

  • Days Won

    125

Posts posted by Red ochre

  1. UtIk09i.png

    Many thanks for the encouragement EER and Drew.
    I had some problems getting the anti-aliasing right - well actually I think I was right but possibly exceeded the limits of one of the variables. Anyway fixed now and getting exciting results.
    Am attaching the 'beta' .dll if you would like to preview/test (can be a little slow if reps set large on large objects/selections - but useful to have the choice for smaller areas).
    Also attaching the code - if anything looks wrong please report back. I hope to publish properly soon.

     

    Hidden Content:
     


    Again thanks Null54 - this could be another addictive one.

    I leave this image of my furry balls - don't have nightmares! :lol:

    mc6AiNc.png

    • Upvote 3
  2. Hurray - it works!

    Brilliant - many many thanks Null54 (to the rescue again!).

    So far I have only compiled and a quick test - I can now work on fine tuning the effect and seeing where I went wrong. Really pleased the principle is possible as it could lead to many other effects. I'm thinking artistic sketch effects like the Jimi Hendrix 'Cry of love' album cover:
    http://checkthisart.com/wp-content/uploads/2011/12/100_1695.jpg


    I had all but given up on this one - so really appreciate this. Thank you.

  3. I have successfully used Null54's method of using another surface to get around ROI banding in other plugins.
    However, I am stumped with this one!

    There are 2 main differences between this and the successful ones:
    1. I am trying to copy the src to the dst, then randomly trail/blur lines across the ROIs.
    2. I am trying to use random numbers in the same way they are generated by codelab.

    I'm not sure which (or both) is causing the problems, or even if this way of doing things is possible. I would prefer to attack the canvas in a random way as if I used the normal y/x loops I think it would give a diagonal woven appearance.

    I am attaching the .dll for the version still only using src and dst surfaces (only slightly adapted from the codelab version), to give an idea of what the plugin could potentially do (try it on an object). I am also attaching the corresponding VS code.
    I think it could useful for watercolour/paper effects and  grass/fur textures as well as bearded ladies and bald patches! :)
     



    Here is the code with my 'attempt' at using another surface called 'dest'. It builds without errors in VS2010 but when used in Pdn it crashes the program with null reference and threading errors?




    Any help would be greatly appreciated. I will, of course, give credit for co-authorship if anyone can get this working. I will probably need to fine tune the controls a bit before publishing too.

    Successful or not - many thanks.
     

    • Upvote 1
  4. Hi Nuno,

    I am still amazed if Epson can effectively print white on black - my reasoning is that even using the highest quality opaque white paint, it takes a thick layer to fully 'cover' over a black background (painting not printing). Still I know printing technology is getting very clever these days - perhaps it works like 3D printing building up layers?

    I would think the printer drivers and software for such a machine would automatically work out the correct values for you?

    If not, then try to find out exactly what conversions are required and post back. Then hopefully we can work out a method or create a plugin to help. Have you looked up the printer on the Epson site? - perhaps they provide the software or some details there?

    Cheers - Red ochre

  5. omgpOjb.png
    DukOQck.png
    Scintillate: Alternately inverts the colours of an image in a tiltable pattern. At small sizes gives a strange moving effect that will probably give you migraine!

    Good results on spectrum gradients and interesting patterns when run repeatedly (with different settings) on the same image.
    Note: Image resoloution affects the 'scintillation' and jpeg compression generally wipes it out. Also resizing down is problematic. These images will probably change if you resize your browser.

    Have fun!

    Found under Effects/Stylize. Dll name = scintillate.



    Nearly forgot the code:

    Hidden Content:
    /* =================================================== */
    /*     */
    /* Scintillate    */
    /* (c) 2013 Red Ochre     */
    /*     */
    /* Description: inverts alternating pixels      */
    /*     */
    /* ========================================== ======== */
    
    // Name: Scintillate
    // Author: Red ochre (John Robbins)
    // Submenu: Stylize
    // URL: http://www.getpaint.net/redirect/plugins.html
    // Title: Scintillate                     Aug 2013        Red Ochre
    
    
    #region UICode
    byte Amount1 = 0; // [1] Pattern|alternate squares|micro-lattice
    double Amount2 = 0; // [0,90] Angle
    int Amount3 = 20; // [1,100] Size
    bool Amount4 = false; // [0,1] Offset pattern
    bool Amount5 = false; // [0,1] Invert alpha
    #endregion
    
    void Render(Surface dst, Surface src, Rectangle rect)
    {  
        Rectangle sel = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt();
        int H = sel.Bottom - sel.Top;
        int W = sel.Right - sel.Left;
        ColorBgra cp;    // current pixel
        int B,G,R,A;
        double angle = Math.PI * Amount2/180;
        int K = Amount3;
        double deg90 = Math.PI /2;
        double sina = Math.Sin(angle);
        double sinb = Math.Sin(deg90 - angle);
        double cosa = Math.Cos(angle);
        double cosb = Math.Cos(deg90 - angle);
        int Ox = (int)(sel.Left + (W/2));
        int Oy = (int)(sel.Top + (H/2));
    
        for (int y = rect.Top; y < rect.Bottom; y++)
        {
            for (int x = rect.Left; x < rect.Right; x++)
            { 
                cp = src[x,y];B = cp.B;G = cp.G;R = cp.R;A = cp.A;
                
              
                int cX =   x  - Ox;   
                int cY =   y  - Oy; 
                double X = ((cX * cosa) + (-cY * cosb));//will be +ve and -ve
                double Y = ((cX * sina) + (cY * sinb)) ;
                
                if(angle == 0){X = cX;Y = cY;}//to get around odd pattern caused by inaccuarcy in trig funcs?
    
                X = X/K;Y = Y/K;//grid size 
             
                bool Inv = false;
               
                if(Y < 0){Y = -Y + 1;}
                if(X < 0){X = -X + 1;}
              switch(Amount1)
                {case 0:
                 if(Y%2 < 1){X = X + 1;}
                 if(X%2 < 1){Inv = true;}
                 break;
                 case 1:
                 if(X%2 < 1||Y%2 < 1){Inv = true;} 
                 break;
                }
               
                if(!Amount4 && Inv){B = 255 - B;G = 255 - G;R = 255 - R;if(Amount5){A = A - 255;}} 
                if(Amount4 && !Inv){B = 255 - B;G = 255 - G;R = 255 - R;if(Amount5){A = A - 255;}} 
    
                // re assemble
                cp = ColorBgra.FromBgra( Int32Util.ClampToByte(, Int32Util.ClampToByte(G), Int32Util.ClampToByte(R), Int32Util.ClampToByte(A));
                dst[x,y] = cp;
            }
        }
    }
    
    
    

    • Upvote 2
  6. Hello nunogarcia - welcome to the forum!

    I like your idea, however I don't think printers work like that - I could always be wrong though!

    I believe printer inks are dyes not pigments, that is they rely on the papers' whiteness to give a colour. Think of stained glass windows - they look great against the bright sky but dark at night. I think you will just end up with a very dark image.

    I doubt if it is possible to get an opaque white ink to work with a printer without clogging it. If it has been done then all the coloured inks would also need to contain white too, if printing on black paper.

    That said if you still want to invert the HSV 'value' of an image it can be done - not sure if there is a plugin for this already (look in the plugin index) - if not I have a half finished plugin that can invert Value.
    It can probably be done using the built-in tools 'curves' and 'invert colors' too.

  7. Updated v1.8, many thanks!

    The zoom feature makes it very easy and accurate to use. For my purposes this a very useful alternative to the Lasso select tool but easier to undo mistakes.

    Midora' path tools beta plugin creates a menu heading Effects/ "Path Tools", perhaps this belongs there too?
    Just a thought and probably best to pm him first though.

    I downloaded the zip this time - I think you over-estimate my coding skills - still I am a whole year younger! :lol:

    (Just noticed this version 1.8 "TRs AlphaCutter" has a gap in the .dll name which I believe is not recommended and also means it won't replace the previous version "TRsAlphaCutter" - intended or typo? - manually deleting older version)

    Thanks again.

  8. Good results YM. Thanks for posting.

    (I liked the idea of using trail in your liquid splashes tutorial to get the raindrops trailing down the window pane.)

    Re clipwarp smoothness:

     I think Skullbonz uses Median after running clipwarp - this can work well with a small radius and a large canvas size, however it increases the alpha from 0 to 1 which can mess up subsequent object type plugins.
    Running my Alphathreshold plugin(Lo = 2, Hi = 255) should cure this.

    Also, I tried incorporating various types of smoothing into the plugin but with little success (made it very slow to render).
    But I am still thinking of ways around these problems.
    So the current work arounds are the best I can come up with at present. Please keep experimenting!

  9. Many thanks for posting EER - looks great! :star:

    Yellowman - I will try to write a proper tut at some time but I'm awful at explaining things.

    Essentially you need a nice smooth tone gradient over the object and copy a very blurred version of the background to the clipboard then use a smaller amount of overall displacement.


     I wrote this for Helen a while back in this thread:-
    "---------------------------------------------
    Helen - staggering! - really impressed - great idea and well executed.
    Unfortunately adding some form of anti-aliasing or smoothing will be tricky but it is something I would like to add.
    The best work-arounds that I have found are:
    1. Duplicate the background, Blur it, copy it, uncheck the visibility in the layers pane. Run clipwarp on the object layer.
    2. As you have done - apply a blur to the object layer after clipwarp. I tend to use 'overblur' for this as it can retain the objects' transparency values - (so the blur is only on the object). I have also had some success using  my old 'tweak transparency' plugin, as this allow you to set 'source' for the middle and 'blur' for the edge - which is where it is normally  least smooth.
    3. It also helps if the tone gradient on the object is smooth (small blur) and the overall distortion is not too large.
    However it looks like you've done a fine job on that aspect already.
    --------------------------------------------------"

    And this in my gallery thread.

    "---------------------------------------------------
    Helen - Hints:
    Bevel selection is not ideal for this, (Great for other things though and may even be useful after running clipwarp).
     
    Ideally you need a smooth tone gradient on the object going from black to white (or vice versa). Now the plugin simply adds the values for Blue,Green and Red to get the tone, so if you are making a grey gradient there are only 255 shades of grey, (205 more than the book!   :lol: ). However this means you should be able to get a smooth gradient over an object 510 pixels wide - black to white and back to black again. Now the 'trick' is to get a smooth transition over objects with a varying width - eg. fonts with thick letters and thin serifs. The best method I have found is to use my 'object edge' plugin, two or three times.
    1.- run object edge with a large blur radius with edge set to mid-grey and middle to white, both mix sliders fully right.
    Ideally you want the very middle of the object to be white, all the rest mid-grey.
    2.- run it again. This time with a smaller radius, the middle-mix slider fully left and the edge colour set to black and edge-mix fully right. - this should leave the white middle and just darken down the edges.
    3. use 'Overblur' plugin - default settings (overblur slider = 0, retain transparency ticked) reduce the blur radius to about 2.
    4. if neccassary use Adjustments/ brightness contrast to adjust.
    5. feel free to adjust the object - I sometimes draw/smudge/blur the inside corners of text to sharpen them up a touch (look closely at the corners on the 'clipwarptonemap' example in the clipwarp thread).


    On the dragonroom picture the head was made using the free 'sculptris' program, which produced a grey tone image on a black background - I removed this as clipwarp runs quicker on objects (it doesn't process anything if the transparency = 0).
    Other than that I did very little to the object layer prior to clipwarp.

    http://www.pixologic.com/sculptris/

    I have also found I get better results working with a large canvas size (1600 by 1200 is plenty).
    Also good to copy a slightly blurred version of the background.
    Sometimes useful to slightly blur the object after running clipwarp (small radius 'Overblur').
    Sometimes useful to slightly increase the contrast on the object after clipwarp too.

    The dragon hatching and in the fire used a scan of a drawing I did a while back. I 'prepared' this by making it an object and first blurring then 'overblurring' to get the gradient over each scale. I must also experiment with making 'plastacine/plastalline/clay' models and photographing them - (with one light source) - then using that as the oject layer.

    I have also found backgrounds with a reasonably large amount of contrast are most effective.

    Hope that helps.
    Forgive the 'wall of text'.
    "---------------------------------------------------------------------------

  10. pdnnoob,

    It really wasn't meant as 'nasty' critisism. If I didn't like the image I wouldn't have commented!
    I just think the very lowest parts of the 'toes' would reflect a little of the table colour - this would help join it to the background scene. I only noticed this because the other reflections and shadows are so well done! ;)
     

  11. Glad you found it useful EER. The original purpose was for making glass-like objects. I'm very grateful to Null54 for getting around the ROI problem.

    Coincidently, I'm in the same situation with the latest plugin I'm working on, so will probably be asking for help in Developers central soon. (It doesn't use the standard y,x loops - so I can't simply copy Null54's example - I've tried various things but keep getting threading errors. I'm also using lots of random numbers (from codelab code) so that could be causing problems too.)

    Please post your CD cover image here if it does'nt infringe anyone's copyrights (and is family friendly! :lol:).

  12. Yes, the backgound  - the image you will copy to the clipboard. I usually use a photo with a lot of blur but you can also get interesting results using a coloured gradient or texture that you have previously created. If using a photo I normally resize it to the dimensions of the Pdn file I'm working in, to make things more manageable and faster. Photos straight from the camera can be far larger than is practical for this purpose. I rarely work on Pdn files larger than 1600 by 1200 pix - my computer is not state of the art!

    Experiment with different 'backgrounds' copied to the clipboard to get the effect you want.

    Good luck!

  13. Hello again Kelly,

    I am rather confused by your question - if I've got it all wrong please forgive me.

    1. You say the object you want to use is in Custom Brushes mini?
    If you want to use an existing 'brush' as the object for clipwarping you would do best to 'import layer from file' and navigate to the 'brush' object (for me that is Documents/Paint.Net User Files/Custom Brushes).
    You would then copy a texture/gradient/photo to the clip board and apply clipwarp on the layer with the newly imported brush object. The color can subsequently be altered in manyways - try Adjustments/Hue & Saturation.

    2. Or do you mean you are using Custom Brushes to create an object you wish to use clipwarp on?
    If so, click 'ok' on Custom Brushes and use clipwarp as described in post 1 of this thread.
    Clipwarp uses the 'tone gradient' of an object to distort the clipboard image - no color from the object is preserved - all comes from the clipboard. So change the color of what you are copying to the clipboard or possibly duplicate the object layer before running clipwarp and use the layers/transparency slider to re-introduce some of object's original colors.

    I have probably completely confused us both now!

    If you can describe exactly what you are trying to achieve I will do my best to give you a less confusing answer! ;)

    If you haven't used Clipwarp before I would advise closely following the instructions in post 1, just to get the idea of how it works.
     

  14. Looks good! - shadow and slight reflection on desk work well.
    The desk will reflect some of the green of the blob - perhaps the green blob should reflect a little of the desk color too?
    Just a thought - meant positively.

    And the liquify plugin is brilliant.

  15. 1. Click 'more' on the colors window and reduce the primary color transparency to say 50.
    Then try the eraser. - softer? - If not what you want, perhaps try Boltbait's feather plugin after erasing.

    2.Select the gradient tool.Then in the top tool bar you should see a round colors icon :Colors:- click the little arrow next to it and select 'transparency mode'

     

    Hope that helps.

    • Upvote 1
  16. 3.5.11 BETA installed successfully. Two things to note.

    1. I run Pdn as administrator (for codelab) - the installer shows an error when trying to start from the final installer screen as it doesn't have the privilege level. However it starts fine from the desktop shortcut and appears to have installed correctly.
    (Simply uncheck the start Pdn checkbox if you're running Pdn as administrator.)

    2. Median still increases zero alpha by one each time it is run - no biggy, I just assume objects have an alpha greater than 10 in plugins of mine that it affects. (Or use 'Alpha-threshhold' plugin after using Median).

    Finally, many many thanks for all your hard work, maintaining 3.5 and developing 4.
    Pdn is a pleasure to use and remarkably stable, (especially considering all the half-finished plugins I have installed!   :D  ).
     

×
×
  • Create New...