From the course: 3ds Max 2019: Advanced Materials

Storing materials in sample slots - 3ds Max Tutorial

From the course: 3ds Max 2019: Advanced Materials

Start my 1-month free trial

Storing materials in sample slots

- [Instructor] Let's take a look how materials are stored in 3ds Max. Before we begin that, I'm just going to clean up the interface here a little bit. I've got all of these samples up here and I don't need these preview windows, so I can just close them all, except for the one that's labeled Follow Current Selection and drag that over and just park it up, sort of out of the way. Now, as I mentioned in a previous movie, if you delete things from a view here, then you will delete that from your 3ds Max file, unless these nodes are applied onto an object in the scene or your other option is to place them into a sample slot. And sample slots are very useful because that means that you don't need to worry about whether a node exists in the view or whether it exists in the scene. It will always get stored in your 3ds Max file, kind of like a material library. So let's see how it works. The first thing I'll do is just create an object in the scene. I'll just move the Slate Material Editor out of the way a bit. And in the Create panel, I'll click on Sphere and drag in the Perspective view to create that sphere. Then right-click to exit. We'll assign one of these materials here. Let's go over to View1 and navigate around. We can assign this Wood Physical material. And one way to do that is to click and drag from the output onto the object. Click here and hold for a second and then drag over and release. And the material's been assigned, but we don't see any texture on there. Let's maximize our view with the keyboard shortcut Alt-W. And we can't see our texture on here. But to do that, we can go back to our Slate Material Editor and with Wood Physical selected, we can click on Show Shaded Material in Viewport. Okay, now, we've got an actual texture on there. I can use middle-mouse to move around and of course, the wheel to get in closer. All right, so we've got something assigned to an object in the scene. And currently, what we have in the Slate Material Editor is an instance of the material on the object. If I start making changes to any of these nodes, we will see that change reflected in the object. This one's not relevant anymore actually, I can delete that. So I can make changes to bitmap coordinates or any of the physical material parameters and that would update in my scene because this network is currently instanced onto an object. And we can delete these if we want, but there are some special rules around that. If we delete one of these input nodes, something that's feeding into the base material or the hand of our shading network tree, if we delete one of these, then we will delete it from this view and we will also delete it from the material in the scene. So that's a little bit inconsistent because if we went and just deleted this top level node, we would get a totally different behavior. If I select the material and press the Delete key, what has now happened is we haven't changed our material in the scene. We can move the Material Editor over and see. This is still the same because it's on the object. And when we deleted that top level node from the view, we didn't delete it from the scene. And this stuff over here is all just leftovers. These are now copies of the actual material that's in the scene. So this is all garbage actually, so we can delete that too. Just drag a rectangle and press Delete. So in doing that in that particular order, by deleting the top level material first, we didn't break our material in the scene. This is still the same. Okay, so if we need to work on that material again, we want to go over to our Material Map Browser and drag that slider down and go into Scene Materials, open that up. And any and all materials that are applied onto objects will be listed here. And we can drag this over and when we release, we get a dialog asking, Do we want an instance or a copy? Well, if we want to work on the version that is actually in the scene, then we would choose instance. If we wanted to make some adjustments, but not affect what's in the scene, then we would choose copy. I'll do instance. And now, we're just basically back where we were when we started. Okay, so what if you don't have an object in the scene to receive the material, but you want to make sure that material is always stored in your file? Well, again, you can keep it in the view here, but if you had to do that, it would really clutter up the view pretty quickly. You could add a whole bunch of other view tabs if you needed to, but again, that's not really an optimal solution. So sample slots come to the rescue. If we go down to the very bottom of the Material Map Browser and open up Sample Slots, this is where the interface gets a little bit tricky because we've got nested levels of scroll bars and frames here, okay. So expand the Material Map Browser out. And you can change the size of the window in which the sample slots live as well. You can see as I hover my mouse around here, I'm getting a little arrow and I can drag that. I'm actually making the Sample Slot part of the Material Map Browser area smaller. Okay, or I can drag this up and make that one smaller. I can drag this down and make it larger. It's very, very tricky to get what you want here because it doesn't really make a lot of sense. So what you can do is just minimize everything except for Sample Slots and once you've done that, you have a fighting chance of being able to resize this the way you want it. Okay, so you've got a total of 24 sample slots in here. Let's go back to View2 here. And let's say we want to make sure that this Concrete Physical is saved with the file, but it's not actually on any object in the scene. What we do is click on its output, hold and drag over to a sample slot, and release. And we can choose instance or copy. It really doesn't matter in this case, but I chose an instance. So now, that's in the file. It's in 3ds Max. And everything that feeds into it, all of its input nodes here, those are all also going to be saved with our file. So in fact, now, I can delete this entire view if I want and everything in it. I can just right-click on that tab and choose Delete View. And we get a warning dialog that we're going to go ahead and click OK to confirm that deletion. And now, we've only got one view and that did not affect the sample slots. All right, cool, so that's a very useful thing. We can fill up 24 of these and those will always be stored with the 3ds Max file. I'll bring this back down to its normal width here. And that's how we work with sample slots.

Contents