Jump to content

ryanr23

Newbies
  • Posts

    8
  • Joined

  • Last visited

Posts posted by ryanr23

  1. Goonfella, you definitely have the original "slower" version of the v1.2 plugin.  Can you delete that and download again and see if that speed things up?  Your CPU should be plenty fast enough.

     

    Also, I just committed some code to add "Diffusion Factor" as another user configurable property for the effect.  This affects how "fuzzy" the shadow gets.  If you have any feedback on the concept, let me know and/or take a look at the updated code on GitHub before I build a new version for download.  Thanks!

     

     

  2. Thanks for the feedback!

    No, the operation isn't simply looking for alpha values of 255, but it isn't much more complex than that. Sorry for the simplistic explanation.

    It takes the source pixel, converts to black and scales the alpha based on the configured shadow alpha. So if your configured alpha is 115, a pixel with alpha of 255 will get scaled to 115, a pixel with an alpha of 128 will get scaled to 58. Obviously 0 goes to 0.

    I assume that you are implying that multiple src pixels get mapped to one destination pixel in the shadow in which case you would want to blend the source pixels to calculate the destination pixels value. In which case, I agree... I haven't gotten there yet. ;) However, I might be able to accomplish the same thing by blurring the image before calculating the shadow, rather than blurring the shadow after the fact. I'm not sure...

    Also, if it wasn't apparent from the original post, the current plugin translates the source layer into a shadow layer. The source layer is not preserved. The result of the operation is a mostly transparent layer that can be overlayed on other images to appear to give it depth. This is how the google maps API works.

    BTW, I'm not super familiar with the entire Paint.NET API at this point, but by "UserPixelOps.Normal.ApplyStatic()" did you mean "UserBlendOps.NormalBlendOp.ApplyStatic()"?

  3. This plugin creates a shadow as if from a direct light source in front of the object in question.  As with the other shadow plugins, you need to be working on a layer with transparencies. The shadow is applied to all opaque pixels on the layer. Also, the bottom of the image is assumed to be the "ground" and the shadow is relative to that point.

     

    View project on GitHub

     

    Requirements
    Paint.NET v4.0+

     

    Installation

    As usual, copy the dll to the Effects folder and restart Paint.NET.

     

    Download

     

    Plugin example

    See GitHub page for latest example.

     

     

    post-45788-0-68679600-1427154404_thumb.p

     

     

    Previous Versions

    Spoiler

     


    index.php?app=core&module=attach&section

    If you can't see the screenshot above, click for full size:
    post-44727-0-11134900-1335809184_thumb.p

    Download:

     

    Incompatible with paint.net 4.x (works with 3.5.11): ShadowEffect.zip

     

    Midora recompiled the effect for paint.net 4.x (see http://forums.getpaint.net/index.php?/topic/1900-shadow-effect-plugin-like-google-maps/?p=419633😞 ShadowEffectUpdated.zip 

     

    As usual, just dump the binary dll in the "Effects" folder.


    Change Log:
     

    v1.2; 3/21/2015 (8+ years later!)

    • Updated to build against VS2012 Express, use GaussianBlurEffect, and implement PropertyBasedEffect so it's compatible with newer versions
    • GitHub link to source code: https://github.com/ryanr23/PDN-Shadow-Effect-Plugin
    • Thanks to toe_head2001 for his contribution!

    v1.1; 10/11/2006

    • Removed references to "Google"
    • Improved rendering time
    • Smoother graduated shadow blurring

    v1.0; 09/30/2006

    • Initial release

     

     

    -- Ryan 

×
×
  • Create New...