Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Now let's take our couch one step further. In addition to size, a lot of times you want to add different fabrics and colors to a couch. So let's go ahead and add those in as attributes as well. So just go ahead and select our couch and basically, we have the same couch that we have before. Let's take a look at our options here. We have the ability to select size and it calculates the price, but let's go ahead and add in one for color. So let's take a look at how this couch is built. I'm going to go into Dynamic Components> Component Attributes and notice how we have the Sofa, but also we have two objects here; we have Sofa_Cushions and Sofa_Base.
So if I were to double-click on this, you would see I have the cushions and I have the base. Now if we were going to reupholster this couch and give it a different color, we would just work with the cushions; the base is going to stay the same color. So we don't want to add color to the base; just to the cushions. So I'm going to go ahead and select these cushions and let's go ahead and add an attribute. So the attribute that we're going to add is Material; pretty obvious. If you want, you can type in a color. Let's say, we type in the color blue and the couch will turn blue, and we can also type in another color, say, red, or If you want, you can type in a hex color value.
So you can type in six digits and we have another type of color. Let's go ahead and go into our Materials window here and we can actually create very specific materials for our couch. So if we go into our Materials window and we go into our home, which is what we have in the model, notice how we've already added in three colors and those were the colors that I typed in. You can see here, there is the hex value, here is blue and red. Now if we want, we can also add in any number of other types of color.
So, for example, if I wanted to go into, say, Carpet and Textiles, something like that, I can take one of these and just flood fill that couch, or I can take this one here and flood fill that couch. Every time I flood fill it, you'll see how it shows up in my window. So even though this only has one color on it at any given time, every time I change the color, SketchUp remembers that, which is actually kind of a nice thing to have, because what we want is we want to be able to remember those colors.
So if we want we actually have these names here. So, for example, this one here is called Carpet_Plush_Charcoal. So if I were to select that, right-click over it and copy, I could actually just type that in here. So I'm just going to go ahead and paste and I hit Return, and then I'm going to hit Return and it goes to charcoal. So now we have the basics that we need in order to change the color. So let's go ahead and reveal this attribute to users. So I'm going to go into my Details menu here and I'm going to, say, users can see this attribute; so I want people to be able to see what color I have.
If I hit Apply, let's go ahead go back out and select our couch and go into Dynamic Components. So if we go into our Component Options window, you'll see well, it's not there. That's because I applied the material to a subcomponent; we have sofa and then underneath that if I double-click on this, I have my Sofa_Base and my Sofa_Cushions and when I have my Sofa Cushions selected, you can see there is my material. Well, this really isn't working; what I need to do is move that up so that when I click on the couch itself, I see the color.
So we need to do a little bit more work here. So let's go ahead and fix that. So I'm going to go ahead and Right-click over this and go into Dynamic Components>Component Attributes and if you notice here, under Sofa_Cushions, this is where I have my material, but I want it here under the main node under Sofa. So what I want to do here is add an attribute under Sofa that points to this material. So I want this material to reference something that's in that main node. So I'm going to go ahead and add an attribute. Now your first instinct will say, well, let's just add material, but that will change material for everything, including the base and we don't want to do that.
What we want to do is just enter our own custom name. So let's enter a name and let's just call it Color, hit Return, and now we have an attribute for color. But I want this material here under Sofa_Cushions to get its value from here. So we can do that in a number of ways. First thing that we'll do is just select that material, copy it and paste it in here so I've something to work with. Now what I want to do is let's go ahead and set up the pointer. So I want this material to equal whatever is in this field here called Color.
So all I have to do is just erase that, hit the equal sign and then just click on this value and notice what happened. It says go to Sofa and find the attribute called Color and use that. So all I have to do is hit Return and notice how it comes in as Carpet_Plush_Charcoal which is great and now this is determined by whatever we have here. So, for example, if I were to type in blue, this will come up blue. So notice how those two are now linked.
So now that we have this setup, it's very easy to set up a pulldown list where we can actually have colors. So in order to set up a pulldown list, I'm going to go into Details and then just say, users can select from a list, and then I just need to add my options. Well, we can put it blue. So let's go ahead and put it blue and now we will enter that value. We can also type in red and let's go ahead and add in the rest of those. I'm going to go into my Materials window so I get these spelled properly. So I'm going to say Carpet_Plush_ Charcoal, put that in and also enter in this one here which is Carpet_ Berber_Pattern_Gray, and Apply.
So once I have that, I can Right-click over this, go into my Component options and notice I have now my colors. So I've color blue, red and now I've to hit Apply for this to work and you can kind of see this here; there we go and then Carpet_ Plush_Charcoal, and so on. Now these names are a little bit too descriptive for me. So let's go ahead and fix that. So for color, let's go back into our details here, and instead of these full names, let's just go ahead and give abbreviation. So Charcoal and Gray and just hit Apply and so now I should have those values.
So now when I right-click over this, Dynamic Components>Component Options, I have Charcoal, I've Gray and I can also select the sizes. So as you can see, this is a great way to change colors and provide your customers with more options for the products that you create.
Get unlimited access to all courses for just $25/month.Become a member
100 Video lessons · 12291 Viewers
83 Video lessons · 9794 Viewers
56 Video lessons · 11839 Viewers
109 Video lessons · 5833 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.