Ishi Posted October 1, 2014 Share Posted October 1, 2014 I have always wondered if there was a way or a plugin that can control where the light source on a image or layer comes from. The Curves and Levels tools are not always reliable. I like to render a light source that comes from one direction such as from the left side, right side, from above or even below. The light source can be vertical, horizontal or in a tilted diagonal angle. And there should also be an option if it expands and fades as it comes closer to the center of the image. Imagine the rays of the sun of the light beam of a flashlight? I want to render that kind of lighting. It would be very useful in creating an artificial light source. If there isn't a plugin written for this yet, let me be the first to make a call towards making one. Thank you. Quote Link to comment Share on other sites More sharing options...
MikeRobe Posted October 1, 2014 Share Posted October 1, 2014 Interesting, there may be a way to do this with just transparent gradients, or there may be a plugin. I'll have a look around and see what I can find. Quote I baked another one... Link to comment Share on other sites More sharing options...
TechnoRobbo Posted October 1, 2014 Share Posted October 1, 2014 You can mimic a light source by creating an empty layer on the top of the stack, with a multiply blend mode and a white to black gradient Use Curve to adjust lighting. 1 Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
Goonfella Posted October 1, 2014 Share Posted October 1, 2014 (edited) What about Madjik's Light Rays plugin? http://forums.getpaint.net/index.php?showtopic=4495 Or you could try a Lens Flare? (TR you beat me to it!) Edited October 1, 2014 by Goonfella Quote Please feel free to visit my Gallery on PDNFans And my Alternatives to PDN Link to comment Share on other sites More sharing options...
Ishi Posted October 1, 2014 Author Share Posted October 1, 2014 I am aware of making another layer and using a transparent gradient to mimic a light source. I have tried that multiple times but it has limitations. I think I might have used something like that on the shadow side of the planet of my profile picture. However, it would have been better if it can be applied without needing another layer. Such a plugin would greatly affect and enhance an image that needs directional lighting to be added. I recently used the Sharpen Landscape plugin for enhancing a dull landscape image I found and it has good effects, thanks to its multiple adjustment controls. Maybe a new plugin for rendering a light source with comparable mechanics can be made. And thanks Goonfella for linking that Light Rays Plugin. I was looking for that plugin but that's another story. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted October 1, 2014 Share Posted October 1, 2014 Isn't lighting the primary function of a Normal Map? http://en.wikipedia.org/wiki/Normal_mapping There are a few plugins. This one Normal Tools has excellent supporting documentation. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
TechnoRobbo Posted October 2, 2014 Share Posted October 2, 2014 do you mean something like this? Plugin Retracted It's under the Color menu CodeLab Source Code Hidden Content: // Submenu: Color // Name: TR's SimpleLight // Title: TR's SimpleLight- v1.0 // Author: TechnoRobbo // URL: http://www.technorobbo.com #region UICode Pair<double, double> Amount1 = Pair.Create( 0.0 , 0.0 ); // Hot Spot double Amount2 = 0.5; // [0,4] Coverage byte Amount3 = 0; // [1] Type|Normal|Flood|Spot double Amount4 = 1; // [0.5,2] Gain #endregion void Render(Surface dst, Surface src, Rectangle rect) { // Delete any of these lines you don't need Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); int CenterX = ((selection.Right - selection.Left) / 2)+selection.Left; int CenterY = ((selection.Bottom - selection.Top) / 2)+selection.Top; ColorBgra PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor; ColorBgra SecondaryColor = (ColorBgra)EnvironmentParameters.SecondaryColor; int BrushWidth = (int)EnvironmentParameters.BrushWidth; System.Drawing.PointF org =new System.Drawing.PointF( (float)Amount1.First, (float)Amount1.Second); float range = (float)Amount2; ColorBgra CP; for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { float relx = (float)(x - CenterX) / (float)CenterX; float rely = (float)(y - CenterY) / (float)CenterY; float dist =(float) Math.Sqrt((org.X - relx )*(org.X - relx ) + (org.Y - rely)*(org.Y - rely)); float coeff = (dist > range)? 0: (1f - dist/range); coeff *= (float)Amount4; if (Amount3==1) { coeff = (float)Math.Sqrt(coeff); }else if (Amount3==2) { coeff *= coeff; } CP = src[x,y]; float tmp = (float)CP.R * coeff; tmp = (tmp > 255) ? 255: tmp; CP .R = (byte)tmp; tmp = (float)CP.G * coeff; tmp = (tmp>255) ? 255: tmp; CP .G = (byte)tmp; tmp = (float)CP.B * coeff; tmp = (tmp>255) ? 255: tmp; CP .B = (byte)tmp; CP.A = (byte)CP.A; dst[x,y] = CP; } } } not published yet - need to make it 3.5 and Plugin browser compatible. Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
Ishi Posted October 2, 2014 Author Share Posted October 2, 2014 Not 3.5 compatible? That's why it didn't appear on mine... Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted October 2, 2014 Share Posted October 2, 2014 It won't take me too long to port it to 3.5 Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
TechnoRobbo Posted October 3, 2014 Share Posted October 3, 2014 PDN 3.5 compatible version available. http://forums.getpaint.net/index.php?/topic/30146-trs-simple-light/?p=417409 1 Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
Ishi Posted October 3, 2014 Author Share Posted October 3, 2014 That's for that TechnoRobbo. I'm testing it now. Gotta find more images to test this with. Thanks again.. It deserves to be popularized.... Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted October 3, 2014 Share Posted October 3, 2014 Sorry,it turns out that Boltbait had written a similar plugin with more options http://forums.getpaint.net/index.php?/topic/28500- Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
Ishi Posted October 3, 2014 Author Share Posted October 3, 2014 That's OK. There are differences to between their functions. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.