Template Variables


Everyday Adobe® Photoshop®: From Workflow to Smartflow


Lesson Info

Template Variables

So let's see, I want to go, we're here for second or do I have this over here? So since we're talking about templates, I want to show you a slight variation on the template idea this is could involve smart objects, but since I have a little bit of time, I'm going to show you this because I think this is an interesting possibility and every time I show this I kind of think twice about should I show this or not? Because at first glance it seems a little bit specific to certain situations, but then every time I do show people in very people say, oh gosh, I've been trying to do that forever I can use that for something else, and the concept is I want to create a series of images where some information stays the same and something changes and it could be as simple as a series of photos were going to put the month at the top of everyone, but I want to do that automatically or in this case I want to make like, you know, I d cards for people and each one I need to replace their photograph and ...

their name and what they do for at this restaurant, whatever it might be in this is just a generic example just to have something that, you know, kind of make sense so I could have you smart objects into some degree in here, but I don't need to in this case because of the way this function work, so we're still kind of talking template? We're just taking a little bit of a side waist up using something these recalled consider variables and this is probably one of the I was like, this is the poor cousin of photo shop because been around for a long time and people like what variables what's that I don't know why it doesn't get any love because I think this is amazing. I think it saved my bacon in portland one time where I had this project I thought is going take me forever toe manly, go in and type everyone's name and replace that photo with this vote I thought, wait a minute, this is where this works so what's, I think, is what I'm saying about this is that when you're first build it, you'd use typical photoshopped techniques, nothing different. So when you look at this document it's just a bunch of layers, the graphic on top happens to be a smart object because it comes from illustrator from pre existing logo, so I needed to edit that I could, and then everything else is just regular I had options for or do I want this back on? Clearly not so let's see where that I have a photo layer that's got like a mass to say, this is kind of like the way I want the photo to go and everything else is just type players. Now, the only thing I would say about this is you build it like you would any typical photoshopped document, but if there's anything that needs to be replaced as part of this function, make sure those layers have names because in the next step we're going to open this dialogue box, you're going to see a list of names, so if you just saw there one layer, two layer, three layer foreign like which one is, which would be a little challenging in this case, there's a couple of layers, which don't they're just graphic elements that never change like this white bar, so I didn't bother naming those because they don't serve any purpose other than I'm not. I should say that they're not going to change from one image to the next. So the first part of this it's nice because you don't do anything any differently. You just build it up saying these are the elements that I want. Now, having said that for this particular project, I'm going to automatically have photoshopped replace the person's first name and last name and what their position is in this fictitious restaurant and the first time I ever tried this you have to build some kind of like placeholder to help you with your design. And the first time I was doing was actually little sports thing. And I just put like john smith, but ever go. That looks pretty good. Never thinking that not everyone's name is a short is john smith. So the first time I tried it, half of the names went off the edge of the page because they had big, long, fancy last names, like, ok, good point. So over exaggerate and pick put something in there. That's. Bigger, though, like text wise than you think you'll need. Ok, so, here's what? I how this is gonna work? I have in a folder a photograph of each of these people that has been last name dot j peg, they're all in this folder and I ultimately, for each one of these people want to put her photo win with her name first name, last name, and changed her position. So assistant manager, bartender, whatever it might be now, I could do that manually, you know, drag the next one in and type the name. If I do smart objects, I could have choose replace contents for the photograph, but I still have to manually adjust all the other ones and if I had four I'd be ok with that, but if I have forty r four hundred, I definitely don't want to do that, so I've got I don't know this is eight or something one to six whatever still enough that it take would take me too much effort. So the way this has built up a zay have images which are the same size are very close to the same size that were just happened to being named with their last name dot j p ok, we'll come back to that part of second here I have a typical photoshopped document, like I said, just made up of layers, but what I need to do is going to tell photoshopped some of these layers will be replaced with other information. This is some people refer to this as data driven graphics because I'm saying take data and automatically slot in for me so it's driven by the information I don't have to type it in myself, which I'm all about that time you could be more efficient by letting photoshopped do the work for you that's a good thing, it appears in a very odd place, I think I don't know where else they'd put it, frankly, I guess, but it's under the image menu, it says variables, and then the first step is defined. So I have to somehow go through this and tell photo shop which of these layers do I want to be? The variable information will be replaced with other information so here is the list of all my layer this is why I mentioned naming them is a good ideas I look down the listen see layer three layer one if I saw a whole bunch of those I would be hard pressed to figure out wait a minute which one is which so as I go through position that's where it's going to say their name what they do in the restaurant like their job that needs to be a variable that will change, so I go to that layer and it's very smart it sees it's a type player, so it says, would you like to do text replacement? Yes I would and I have to call this something to say this is a variable that I will call position and usually for the sake of make it easy I usually call it pretty much the same thing as what it is it doesn't convey anything to call this forty seven it doesn't really matter what you call it just in the next step it has to match up so this part as you see it takes a second or two to ghana through go through and say ok so first name I'm sorry last name that's going to be the place with last I just l name and then oops I click enter by mistake I need to do the other ones now as in a little aside. Any time you have taken a layer and made it a variable a little asterix appears beside the name of that layer to tell you that's a variable and that's a variable. This one also needs to change to first name. And then finally the photo is smart enough to know it's a photo so therefore to pixel and I want to and I knew this point is naming the variables and you'll see why I have do that in one second, because in the next step I have to now kind of match it up by giving it some instructions. So I click ok visually, nothing changes yet because all I've done has said this layer is now this thing called a variable, which means it has the potential of being changed on the fly very quickly using this method. So the final piece of the puzzle that's the kind of odd part of first is you have to have a text file that basically is going to combine this information together, so if we look more closely at it, the first line of this text file has the same names as my variables, so I named my variables f name for first name l named for last name position photo so those are the names of the various why just entered in photo shop so that part has to match up that doesn't you'll get an error message and its case sensitive. So I want to say I did lower case f not upper case because that would otherwise cause a problem, so the first line is whatever you type in whatever you entered in photo shop has to be the same then each subsequent line is per each person so the first won her first name is janet comma. Her last name is bryant comma, her position is manager and her photo is called bryant dot j peg again, I think it's probably lower case just to be sure and then for each one I do the same thing and it's just a character term between each one. Now, if you were doing like in this case five or six, you could enter this information into a text follows ided manually. If you had a whole bunch of people and they had to this once every two months, you might have an excel spreadsheet and in excel there's an option to say export as calm a delimited text which create that for you automatically ok, so this plain text file has to be in the same location as the photos so as you can see there's a fair bit of set up here, but the beauty of it is once it's set up, you'll see how fast it is. And you compare to the alternative of me having to go. Okay, now plays this person's photo win. Now place that person photo in type in their name that's so much faster. So we go back to photo shop. I've already defined the variables now in that folder I have the text file that was very carefully put the same way. And I made sure that all the photos that have the correct name, et cetera and I'm saying all that as a precursor to hopefully this I did all right on the fly. But we'll see momentarily. So I go now go back to variables and choose data sets and that's its name for import. What? You just set up over there sonar for this to work. I go to the import button and I go and find that text file which I put over here. Here. This is usually the hardest part is fighting where you put everything, um here, there it is. And you click ok now to make sure it worked you hit the preview button. And you can see now the first one was the same person, so the photo didn't change, but now it says janet bryant manager by come over here and say, well, let me see the next one that one seemed to work working they will let you know right up front if the first one works they'll all work otherwise you get an error message going something didn't match up I still because I'm curious look through just to make absolutely sure and here's a weird that's never happened before. This is like a new feature apparently no side when I click it kind of flashes the previous the virtual person I don't know why that happens that's not a feature that's supposed to happen, but so now they're all working now here's something that I will share with you that made me panic at first because I thought I'd done something completely wrong I was looking through and I said, oh yeah there's melissa smith bartender looks great and I clicked okay? And I went right back to first name last time on what happened that's because that was just a preview to make sure they match up. Now the final step I have to actually combine them and say now export actual files and what I particularly love about this each use file export data sets as files couldn't be much more confusing name than that put my variables into actual documents, but it's called export data sets as files because these started life is psd files I'm going to keep them that way because ultimately if I'm going to generate six or eight or forty graphics, I want to make sure just in case if I need to edit that one person's name, I still can so I'm going to keep them as psd files, so all I have to do is pick a folder and we'll say after so that's where they're going to go I don't really too much about naming conventions, but you could if you really had a particular set up but other that you just go ok looks good it's going to be psd click ok thank those flash flash flash flash flash flash appears to be finished can could not have happened that fast surely it couldn't always it did so in that few seconds. I now have generated six psd files that have all the information and automatically, but if I need to, I go to that psd file and tweak something because now he's thie head bartender or whatever it is ok, so the original file stays untouched as a psd with those kind of place holders that happens to have that data sets imported and then an export sees a separate files and I'll get to your question one second it generates psd files automatically now, assuming that I look at them even in this view and bridge and go, they all look good to me. I don't need to tweak them. The final step would be I would select all of these and use the function we mentioned before called image processor and try that again image processor. Sometimes this program I don't know why it does that sometimes that thinks it's busy, and it really isn't. I don't know why that's, a new feature actually know why it's happening what we can't talk about that at the moment as to why that's happening, so I need to go on actually find this normally wouldn't take this long because I'd be able to do it that much more quickly, right from within bridge. But trying to get to is the final step would be take all of these psd files in this folder and save them a jpeg so I would end up with the editable psd fell automatically and then very quickly get the final j peg. I could print a question come in so I was watching you go through this, and I'm thinking to myself, wait a minute where you're doing your prints set up. You could also make the same process you could just put in a list of those files and then and let it merged to the smart object and set up your files and you'd be ready to go you wouldn't have to kind of the on ly challenge would be I I'd have to try to be one hundred percent sure, but I'm not sure that if you have like that in this case that photo with the photos just a regular photo layer if you made it smart I don't know the variable would necessarily replace the contents and reapply the smart filter so that's the only part I'm not sure if that would happen this is just a regular so if part of the process was I had a smart filter applied to it that I'm not sure if variables would work because it wants to just be a pixel based placeholder not a smart object placeholder so we have to try and my thinking is it might almost worked but not quite because the nature of variables is just pixel based and technically a smart object the pictures aren't really there they're embedded inside so it's a good theory it might work I just have a feeling that it might not work quite the same way we're just because of the way very ellsworth yeah just photoshopped variables like I said that with the key difference and the part that makes me all definitely test six it's. An interesting concept is the fact that when you're defining the variables, the one that's photo says pixel replacement. So if I had that's just really quickly, well, let's, just see a quick little test here and see let's. Take that one, turn that off for a second, go back and convert to smart object. Now go back to ups variables, see if that picks a replacement is gone, so the only thing is doing is saying, I don't know what that is anymore because I don't see pixels so that's, where I think the problem would in counter, is that it's not seeing it so you could do it for print, just with a photo that everything was ready. But for me, the advantage using smart was that ability have it automatically do the sharpening. In this case, you wouldn't be able do that. Enforcement doctor, people that say well known thing please allow us to do this using smart objects that would make I'd like to cart wheels over that one.

Class Description

Ready to spend less time editing your photos and more time taking them? Join Adobe expert Dave cross for a course that will transform your image editing workflow into an efficient smartflow system.

During this course, you’ll discover how a non-destructive editing process can help you to be more accurate, creative, and efficient. You’ll learn why presets are an essential part of a smartflow and learn how to efficiently create and leverage them. You’ll work with the full range of Adobe® Photoshop® features, including adjustment layers, smart objects and filters, templates, camera raw smart objects, and much more. You’ll also learn about reusing effects, looks, and templates to make your work more consistent.

By the end of this course, you’ll have proven techniques and strategies for saving time, working smarter, and reaching new creative heights.

Software Used: Adobe Photoshop CC 14.2


a Creativelive Student

Dave Cross is a wonderful instructor! He has a fantastic teaching style and has great mastery of his subjects!