Jump to content
How to Install Plugins ×

Shadow Effect Plugin - Updated for 4.0+ on 2015-03-23


ryanr23

Recommended Posts

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 

Edited by toe_head2001
changed download links to https
Link to comment
Share on other sites

The shadow is applied to all opaque pixels on the layer

Are you just checking for pixels with an alpha value of 255? I would suggest, instead, rendering the drop shadow for all pixels and then blending that based on the source texel's alpha value. You can use UserPixelOps.Normal.ApplyStatic() to do this on a per-pixel basis.

Paint.NET 3.0 will have some blending utility functions that make this sort of stuff (taking the alpha channel in to account) easier.

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 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()"?

Link to comment
Share on other sites

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()"?

Yes

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

  • 7 months later...
:wink: Hello Harvey ! I'm going to try to do that ... i'm French so....

You must to duplicate the pic you have and "put" the effect in the duplicated pic ( i want to say the pic down ...) Hope you'll understand me :wink:

thanks man.. appreciate your help :D

gerrard21dd1.png
Link to comment
Share on other sites

  • 3 months later...
  • 3 weeks later...
  • 4 years later...
  • 1 year later...

That's the way it works. The object is converted to shadow and erased in the process.

Duplicate the layer containing the object and run the plugin on the lower of the two idential layers.

Note when I say 'object' I mean a group of pixels surrounded by transparency. If you run the effect on a single layer jpg the plugin will not pick out the elements in the image.

Link to comment
Share on other sites

  • 8 months later...

In paint net 4.0 i cannot find any option for this effect in the menu once installed, any idea.

 

In case you tell me this plugin is not compatible with 4.0, could you suggest best drop shadow effect alternative.

Edited by userwords
Link to comment
Share on other sites

You'll find there is an entry for ShadowEffect.dll under Plugin Errors in the Settings dialog (click the gear icon, top right next to the question mark).

 

The plugin is also listed here: http://forums.getpaint.net/index.php?/topic/27661-incompatible-plugins-an-incomplete-list/

 

As an alternative, you can create your own shadow like this:

 

1. Duplicate the layer that has the object you wish to add a shadow to :DuplicateLayer:

 

2. Select the lower of the two identical layers in the Layers Window.

 

3. Desaturate the lower layer with Adjustments > Black and Alpha+  (plugin found here: Black and Alpha+)

 

4. Effects > Blurs > Gaussian Blur @ around 20.  Larger or smaller values are OK depending on how large your object is.

 

5. Tilt & Pan the shadow layer to your liking with Ctrl + Shift + Z.

 

6. Adjust the opacity of the shadow layer by pressing F4 and adjusting the opacity value slider.

 

Approximate result:

 

yhsjjie-1654.png

 

  • Upvote 1
Link to comment
Share on other sites

Thanks Mike.  It's how we used to do it before the Shadow Effect plugin made it easy for us ;)

Link to comment
Share on other sites

  • 6 months later...

I'm not sure if this plugin can help me or not, but it's the only thing I see that might be able to. So, is there any chance someone could please fix this plugin or make a new one for paint.net 4.0?

I need a shadow like the kind you get when the sun shines on you, not a drop shadow. I know how to make my own drop shadows, and there is also the drop shadow plugin, but I can't seem to make a figure shadow, I can't get the angle right. I have tried using the rotate/zoom effect, but even with that I still can't get my angles right. So I was thinking this plugin might do what I want.

 
I'm trying to make shadows like these :

d8993393e93c2ca04678d4c53ffc8382.jpeg


3dshadow.jpg


text-shadow.jpg


photoshop-shadow-text.jpg

Edited by Cc4FuzzyHuggles
Link to comment
Share on other sites

I'm not sure if this plugin can help me or not, but it's the only thing I see that might be able to. So, is there any chance someone could please fix this plugin or make a new one for paint.net 4.0?

 

I'm pretty sure it will not but here is a version 1.2 compiled as PropertyBasedEffect and using GaussianBlur instead of Blur (which forced the crash). ShadowEffect.zip  I moved it to the 'Object' submenu.

 

I guess you are on the right way. Create a black version of yout text. Transform it. Fill it with a gradient and blur the result.

  • Upvote 2

midoras signature.gif

Link to comment
Share on other sites

Tried this http://forums.getpaint.net/index.php?showtopic=16197 ?

@Midora : Thanks for updating this plugin. I'll make a note to update the Plugin Index & put a link at the start of this thread.

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