ryanr23 2 Report post Posted September 30, 2006 (edited) 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 RequirementsPaint.NET v4.0+ Installation As usual, copy the dll to the Effects folder and restart Paint.NET. Download ShadowEffect_1_3.zip (3/30/2015)Added Diffusion Factor Added Plugin Browser compatability ShadowEffect_1_2.zip Plugin example See GitHub page for latest example. Previous VersionsIf you can't see the screenshot above, click for full size: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 March 30, 2015 by ryanr23 Since the author is long gone, I added a new screenshot and the DLL to this post. Quote Share this post Link to post Share on other sites
Illnab1024 11 Report post Posted September 30, 2006 That's pretty sweet! Nice one! Quote Share this post Link to post Share on other sites
Maia Knuckles 0 Report post Posted September 30, 2006 This plugin is very nice!!! Quote Share this post Link to post Share on other sites
Rick Brewster 1,459 Report post Posted September 30, 2006 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. Quote Share this post Link to post Share on other sites
ryanr23 2 Report post Posted September 30, 2006 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()"? Quote Share this post Link to post Share on other sites
BoltBait 2,600 Report post Posted October 2, 2006 Wow! Nice job. However, I think you should avoid using the word "Google" in the project. Potential copyright issues. Quote Share this post Link to post Share on other sites
Rick Brewster 1,459 Report post Posted October 2, 2006 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 Quote Share this post Link to post Share on other sites
Hellfire010 0 Report post Posted October 3, 2006 Wow thats a really cool plugin! Thanks! I'm gonna use it all the time now. Quote Share this post Link to post Share on other sites
Picc84 0 Report post Posted October 3, 2006 YEs, i love that pluginn, now as soon as i get out of school, i will have to download it... Quote Share this post Link to post Share on other sites
dbiggs 0 Report post Posted January 19, 2007 HEY! The download links are DEAD. I really want this Plug-in. Can somebody email it to me?? Pretty please with sugar on it.... TIA! Dave Quote Share this post Link to post Share on other sites
El Sid 0 Report post Posted January 19, 2007 They Are? Here's A Temporary Solution, http://www.benlodder.com/ShadowEffect.dll I'll Delete It If I'm Not Supposed To Host It On My Site. Quote Share this post Link to post Share on other sites
starostinalex 0 Report post Posted April 6, 2007 Link on source is bad. Quote Share this post Link to post Share on other sites
Yata 0 Report post Posted April 21, 2007 The link to the .Dll is broken. "PAGE UNAVAILABLE This URL you typed is unavailable at this time. " Quote Share this post Link to post Share on other sites
Crazy Man Dan 17 Report post Posted April 21, 2007 They Are? Here's A Temporary Solution, http://www.benlodder.com/ShadowEffect.dll That link works. :wink: Quote Share this post Link to post Share on other sites
Yata 0 Report post Posted April 21, 2007 Thanks Dan Quote Share this post Link to post Share on other sites
starostinalex 0 Report post Posted April 24, 2007 I cannot get source ("PAGE UNAVAILABLE This URL you typed is unavailable at this time"). Give, please, the new reference. Quote Share this post Link to post Share on other sites
pyrochild 344 Report post Posted April 24, 2007 I cannot get source ("PAGE UNAVAILABLEThis URL you typed is unavailable at this time"). Give, please, the new reference. you can download the binary from his temporary link and decompile it with the Salamander .NET Decompiler Quote Share this post Link to post Share on other sites
jtornado 0 Report post Posted April 24, 2007 Could you please fix the link? That really mislead me. Thank you for the temporary link El Sid. Quote Share this post Link to post Share on other sites
harvey28 0 Report post Posted May 5, 2007 can someone help me.. how do i use this plug in.. can anyone teach me how? Quote Share this post Link to post Share on other sites
Tubular Tos 0 Report post Posted May 5, 2007 :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: Quote Share this post Link to post Share on other sites
harvey28 0 Report post Posted May 5, 2007 :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 Quote Share this post Link to post Share on other sites
lloydo 0 Report post Posted May 29, 2007 BROKEN LINK BROKEN LINK BROKEN LINK TO BINARY DLL :evil: :evil: :evil: :evil: :evil: Quote Share this post Link to post Share on other sites
Crazy Man Dan 17 Report post Posted May 29, 2007 They Are? Here's A Temporary Solution, http://www.benlodder.com/ShadowEffect.dllI'll Delete It If I'm Not Supposed To Host It On My Site. Quote Share this post Link to post Share on other sites
Spazza 0 Report post Posted August 15, 2007 Great Plug-In Quote Share this post Link to post Share on other sites
darkmummy9 0 Report post Posted September 4, 2007 im pretty sure this doesn't count as necroposting but your links are dead now and i would like that plugin Quote Share this post Link to post Share on other sites