david.atwell Posted October 14, 2007 Share Posted October 14, 2007 This tutorial is available as a PDF. Click here to view or download it This tutorial is all about the marvelous Gradient Mapping plugin, by Pyrochild (available here). Download it first. So, there's been some confusion as to how this plugin works, as expressed on the PdN chat on dA. Now, I don't claim to be an expert, but I do have a couple days' experience on all of you, so... 🙂 Here we go, an explanation of Gradient Mapping. Now, you all know (if you've downloaded this plugin) that the dialog consists of a gradient bar, a drop-down box, and a little bit more that I won't go into here. Let's start with the drop-down marked "Source." As you may have gleaned from the title, it selects which bits in the color code from each pixel are used as the "source." Got it? No? Well, let's go more in-depth, then. How about a pretty picture? We might call this "Before." We might. But we won't. 😉 As you can see, it's a rather understated little .PNG with a white-to-black gradient stretching from left to right. Now, the default in the "Source" box says "Luminosity," no? So maybe we can understand Gradient Mapping better if we examine the luminosity of the gradient. Well, obviously, the Luminosity of the pixels at the far left is very high. In fact, it's 255. White has the most luminosity possible. On the other hand, Black has very little Luminosity. None, in fact. In numeric form, white's luminosity is 255, while black's is zero. Somewhere in the middle, assuming you have a gradient that spans 256 pixels or more, each value of luminosity is shown at least once. And that means that in the very middle, there's one that equals 126. Are we clear? (Actually, we'll get to transparency in a second. 🙂 Okay, bad pun...) All right, if you follow, let's open Gradient Mapping. It's in the Adjustments menu, which I can't remind you of quite enough. Beautiful defaults, no? Okay, enough sightseeing. Take a look at that gradient across the top of the dialog. At the far left is a black color, in the center is a red color, and on the right is a white color. Conveniently, that's the same pattern (in reverse) on the live preview behind it! Now, what do we know about the original gradient? And why is it in reverse? That's right. The luminosity decreases successively from 255 on the left to zero on the right. Somewhere in the middle, it's about 126. Hmm. Coincidence! The new gradient has a completely white color on the left, a red color in the middle, and a completely black color on the right! Are the wheels chugging? That's right! The value of luminosity is "mapped" across that gradient in the dialog box. And wherever in that photo that particular value of luminosity appears, it is replaced with the color that is on the gradient in the dialog! So the far left of the gradient in the dialog is mapped to the lowest value of luminosity in the picture; that means that the pixels with the lowest luminosity in the image (the black ones) will be changed to the color at the far left of the gradient in the dialog, and the pixels with the highest luminosity in the image (the white ones) will be changed to the color at the far right of the gradient in the dialog. See what I mean? It takes the values of the selected channel (Luminosity), and "maps" it across the dialog's gradient (0 on the left, 255 on the right). Then it finds each value of that selected channel in the image, and recolors it to the color that's mapped to that number. Let's look at a couple of other Sources to see more. How about Alpha? See, the Alpha value of the entire image is 255; it's perfectly opaque. So it recolors every single pixel to the color on the far right, which just happens to be white. Let's try Key / Black as the source now. Notice that, in the original image, black was on the far right; but, since we're measuring the amount of Black as the source now, and black is on the left of the dialog gradient, the pixels in the original image that had the least black (Black = 0) get recolored to the color on the far left of the dialog gradient, which happens to be black. (If you still don't understand, try the image with just white and see what color it turns; then with just black, and then with a shade of gray. You'll see that the white [lowest amount of black] comes out black, the black [highest amount of black] comes out white, and the gray [middle amount of black] comes out red.) Head still spinning? Try some other Source channels. You'll see that the pixels with the highest value of whatever channel you've selected in the drop-down box will be recolored to whichever color is on the far right of the dialog gradient, and vice versa. Clear? Let's see a photograph! Stunning, no? But we're not here to lollygag. Let's mess it up! 🙂 Gradient Mapping, with defaults: Notice that the part with the highest luminosity (the part where the light hits the floor) is recolored to the color on the far right of the dialog gradient. White! Alpha is completely blank. Nothing to see there. Again, it's entirely opaque, so it turns it completely black. How about "Key / Black"? This one's fun! 🙂 Oooh! See, where the light hits the floor had the lowest amount of black in it (zero), so it recolored it with the color from the Zero end of the dialog gradient! Ah, we're working up to something here! Let's try different colors. Right click on the left and right sliders and click "Change Color." Here's what I changed them to, and the result: See, the parts of the image with the lowest luminosity became the color at the left of the dialog gradient (blue), while the parts of the image with the highest luminosity became the color at the right of the dialog gradient (radioactive green)! So, how can this work for you (besides cheap parlor tricks with images)? Multicolor gradients! Let's say you wanted a seven-color gradient; Red, Orange, Yellow, Green, Blue, Indigo, and Violet. Sure, you could use BB and Ilnab's plugin, but why? Just create a black-to-white gradient, like in the first image, and: (right-click and hit "Spread Colors" to evenly space them) And theirs can't do this: (Though that might be a point of pride) Eastertime, anyone? Anyway, play around with your Gradient Mapping plugin. And share what you do below! (If you like, you can right click and save the .XML file, and post it below with the code tag) Hope this helped! For more gradient mapping fun, check out Natjo's tut: viewtopic.php?f=15&t=20738 (And BarkBark's comment is a good one) 1 Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
The_Lionhearted Posted October 14, 2007 Share Posted October 14, 2007 Thanks for the tut david...enjoyed the knowledge and humor. Quote My Gallery Link to comment Share on other sites More sharing options...
verndewd Posted October 14, 2007 Share Posted October 14, 2007 pyro has made some killer plug ins; good chance to appreciate the people that make the plug ins and have made this awesome program. All of you deserve praise and compensation. IMHO. Quote retired from PDN forums. Later dewds Link to comment Share on other sites More sharing options...
Myrddin Posted October 14, 2007 Share Posted October 14, 2007 A most helpful tutorial, david. Now I can truly appreciate gradient mapping. Thanks to both you and, of course, pyrochild for the plugin. Quote How to Save Your Images under Different File Types My dA Gallery Link to comment Share on other sites More sharing options...
Rostigalen Posted October 14, 2007 Share Posted October 14, 2007 Wow, now this is a great tutorial! I really learned a lot Thanks! Quote Link to comment Share on other sites More sharing options...
pyrochild Posted October 16, 2007 Share Posted October 16, 2007 excellent Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
david.atwell Posted October 16, 2007 Author Share Posted October 16, 2007 Thank you, everyone! Especially nice to hear from the creator himself... Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
leprickon Posted October 16, 2007 Share Posted October 16, 2007 Great tut!! Thanks!! Quote Link to comment Share on other sites More sharing options...
Deborah Posted October 16, 2007 Share Posted October 16, 2007 This is great. I love the light tone of your words - it's nice to see some personality in a tutorial. I even liked the pun (and I usually abhor all punnery ). (If you still don't understand, try the image with just white and see what color it turns; then with just black, and then with a shade of gray. You'll see that the white [lowest amount of black] comes out black, the black [highest amount of white] comes out black, and the gray [middle amount of black] comes out red.) Shouldn't that be switched to "the black [highest amount of black] comes out white"? Quote Link to comment Share on other sites More sharing options...
david.atwell Posted October 16, 2007 Author Share Posted October 16, 2007 This is great. I love the light tone of your words - it's nice to see some personality in a tutorial. I even liked the pun (and I usually abhor all punnery ). I'm glad you enjoyed it! That's exactly what I was going for: knowledge with fun, just like Bill Nye. :-) Shouldn't that be switched to "the black [highest amount of black] comes out white"? You're absolutely right! That's an artifact of an earlier draft, when I was still on Luminosity (before I decided to switch to Key/Black in that example). Thanks for pointing it out! Good catch,...and it's fixed! Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
Blooper Posted November 20, 2007 Share Posted November 20, 2007 Thanks a bunch. I kind of had an idea of what Luminosity did, but the rest left me wondering Quote http://synthastic.deviantart.com http://soundcloud.com/siderealenterprise Lockerz invites are available, PM me Link to comment Share on other sites More sharing options...
RyuinfinityPDN Posted November 23, 2007 Share Posted November 23, 2007 Wow! finally! BTW: Someone should make a rainbow gradient plugin! It would be easy! (I think) Quote -- Make an Explosion in Space-- Link to comment Share on other sites More sharing options...
david.atwell Posted November 24, 2007 Author Share Posted November 24, 2007 Have you read this tutorial? I tell you how to do it above. :-) Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
pokemonalexander2 Posted January 9, 2008 Share Posted January 9, 2008 this look oddly familiar to Gimp's gradient maker Quote Link to comment Share on other sites More sharing options...
pyrochild Posted January 9, 2008 Share Posted January 9, 2008 this look oddly familiar to Gimp's gradient maker ohmaigawdrly? eat this post. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
david.atwell Posted January 9, 2008 Author Share Posted January 9, 2008 *eats that post* Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
pyrochild Posted January 9, 2008 Share Posted January 9, 2008 eat, this post -> ingest, this post -> in jest, this post. yay for really bad puns... Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
david.atwell Posted January 9, 2008 Author Share Posted January 9, 2008 *eats the bad puns* Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
The_Lionhearted Posted January 9, 2008 Share Posted January 9, 2008 *dies a little bit inside* :? Quote My Gallery Link to comment Share on other sites More sharing options...
cj289 Posted February 6, 2010 Share Posted February 6, 2010 Hey great job thanks. Quote Link to comment Share on other sites More sharing options...
qweg33 Posted March 14, 2010 Share Posted March 14, 2010 Awesome job. I love it Quote Link to comment Share on other sites More sharing options...
nitenurse79 Posted December 2, 2011 Share Posted December 2, 2011 This is great. I did not know I could save my own gradients, we live, we learn Quote Link to comment Share on other sites More sharing options...
Shadow97 Posted January 18, 2012 Share Posted January 18, 2012 Wow, I didn't know you could do this. 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.