Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Another attribute that we can change using the Component Attributes window is the material applied to an object. Now this is important for all sorts of things where you can provide them in different types of colors, cabinets or for example, this couch. You can provide this in several different colors in fabric options. So we want to be able to provide a list of the various options and give them to the customer. So we can do that again through the Component Attributes window.
So if I select this object and select this object and go into Component Attributes, we can actually add in an attribute for material. Now before I do that, let's take a look at this sofa. It's composed of two subcomponents: one for the cushions and then one for the metal base or the legs of the couch. So if I go into my window here, you can see I have just the cushions and the base. Now when I apply a different color to the couch, I really just want to apply a different color fabric to the cushions.
So that's where I want to make my change. So I am going to go ahead and select the whole couch and go into Sofa_Cushions and hit this little plus sign and then add an attribute. Now the attribute we want to add is called, obviously enough, Material. So now once I have a Material here I can do a number of different things. I can type in a color, such as Red or Blue. Now these are just standard colors that are within SketchUp or if I want a more custom color, I can type in any sort of hex value, or if I want I can actually type in the name of a material that's within the scene.
So if I go into my Materials window, you'll see that in my model I only have those materials that I typed in, because I really don't have anything else. So if I want to actually have a standard material such as a bitmap fabric or something a little bit more custom, I have to put it into the model. Now typically the way to do that is just create a very small object such as a rectangle and then just put the material on to that object. So I am going to go ahead and select that rectangle and then just go into my Materials window and scroll down to something that would represent fabrics, such as maybe Carpet and Textiles, and maybe just go ahead and pick say for example, this plush charcoal and put it on there.
So once it's in the scene, if I go here over to Home, which gives me my In Model, you'll see that now instead of three, I have four. So let's go ahead and do that one more time. I am going to go to Carpet and Textiles and let's just pick another one. How about Berber Carpet? And go ahead and select that and just go ahead and apply it to that rectangle and if we hit our In Model or our little home icon, you'll see now I have five of those. In fact, once they are in the model, they are there forever.
So I can just go ahead and select this rectangle and delete it and these materials will still be here. So now we can use this to actually apply those materials to our couch. So let's go ahead and go back to our Component Attributes window and find our Material value. So instead of typing in the hex value, I can actually type in the name of the material. So let's go ahead and select Berber_Pattern_Gray. So I am just going to go ahead and select all of that. I don't need to type it. All I need to do is select it here in Materials window, highlight the name and copy it and then go here and paste that name.
So once I hit Enter, you'll see that pattern is on my couch. Now what I really want though is I want this to actually be able to be seen by the user and be able to be changed interactively by a drop-down list. So the first thing I'd probably want to do is just go over to my Details window for this Sofa_Cushion, and I can just change my Display rule. So I can for example select it from a list, but for right now let's just see if we can even see it. So I am just going to go say Users can see this attribute.
So hit Apply. So I am going to go ahead and close out all these windows and let's take a look. So I'm going to select my couch, right-click, go to Dynamic Components > Components Options. And as you can see, there really isn't an option here. I really was hoping to find the Material name, but I don't have it. That's because it's buried. So if I double-click on this, it opens up that main component and then I select and I go down into my Sofa_ Cushions and you can see now there's the name of my material.
Well, that's not really what I want at all. I want to be able to just get to this from the main level. Just select the couch, pick the size, pick the color and be done with it. So we're going to have to do this a little bit differently. So let's go back into our Component Attributes. So instead of putting the material here, let's go ahead over to Details and say Users cannot see this attribute, and we're actually going to go ahead and we need to move this attribute up here to the main level of Sofa.
So what we've to do here is we have to add in a custom name. So I'm just going to go ahead and add in a custom name. Call it Color. So now we have Price, Color and Size. But the color in this field here actually has to show up here. So I need this here to point to this value here. First thing I'm going to do is go ahead and just select this color and paste it here. So now I have a value that I can play with and here I am actually going to put in a formula.
But it's not a mathematical formula. It's just a formula that pulls the text from here into this value. So I am just going to hit equals and then all I have to do is just click on this Color value and notice what happens. We get the variable, Color, plus the name of the component that contains it. So we have Sofa:Color. So basically of the Color attribute in the Sofa component. If I hit Enter, you'll see how now whatever I type in here, say for example if I typed in Blue, Blue shows up here.
So now that we have this working, all we have to do now is create the list. So I am just going to go over here to my Details, scroll down, say Users can select from a list, and then just go ahead add some options. So let's go ahead and put Blue in, let's put Red in and let's put in some other ones. I am actually going to go into my Materials window here and I am just going to select my Carpet_Berber_Pattern_Gray, very long name, and just paste that in and then go head over to Carpet_Plush _Charcoal and add an option here.
It looks kind of weird, because we're actually going to have Blue, Red and then all these weird names. So let's call it Blue, Red. Let's just call it Gray and Charcoal. Hit Apply. So now we should have it all wired up and ready to go. So I am going to close all these out. Let's go into our Component Options and so now we've got Blue, Red.
Now I have to hit Apply here. Charcoal and so on. So now I can pick whatever size couch I want, and whatever color I want and then the price will factor accordingly. So as you can see, we've actually applied a material. Now in order to get materials into an object, we either need to name the material, type in the hex value or type the name of a material that's already in the scene.
And once we do that, we can use all the power of the Component Attributes window to create list boxes as well as formulas to create whatever materials we want.
Get unlimited access to all courses for just $25/month.Become a member
109 Video lessons · 9710 Viewers
102 Video lessons · 7328 Viewers
56 Video lessons · 14318 Viewers
83 Video lessons · 11909 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.