Join Aaron F. Ross for an in-depth discussion in this video Understanding XREFs and materials, part of 3ds Max: Advanced Materials.
- [Instructor] An XRef or external reference is a 3ds Max scene file that is loaded into another 3ds Max Scene File so you can have nested files that reference one another. In this course we'll use XRefs in order to save disc space because we're just working with Materials and not versioning our models we can load the same model into many 3dx Max Scene Files and not incur any disk storage penalty for that using XRefs. I've got a very simple Scene here with nothing in it, all I've done is set the Units in Customize, Unit Setup, I've set it to Centimeters and I've set up the grid spacing as well.
I can right click on any one of the magnets, and go to the home Grid tab, and I've set the Grid Spacing to 10 centimeters. To see how XRefs and materials interact, let's load in a couple of XRef objects. Go to the 3ds Max application menu and choose References. You have two options here, XRef Scene and XRef Objects. We want XRef Objects. The Scene option here will not allow you to change the Materials. Let's choose XRef Objects, when the dialog launches we can go up to the tool bar at the top and click to Create an Xref Record From a File.
And I've got the Max Files here in Exercise Files scenes. First, let's select a 01_06_xref_pedestal_capital.max and click open. And it looks like it's highlighted here but it's actually not if you click off of it and click back on it once again then you'll see all of the entities that are loaded in from that Max File. We have an Object which is a model. We've got a Material and a Controller. Let's investigate how the Material works. I can close XRef Objects dialog and here's the object here in the Scene.
Let's open up the Material Editor and currently there's nothing here in the View but I can go to my Scene Materials and it says ideal diffuse (XRef), drag that over and choose Instance. And this is how Xref Materials work in 3ds Max. We've got a Node here which is an XRef Material type, double-click on that and all it is is a link to a particular Max File. We get some information here about what Object and what Material are being linked.
You'll also see that there's another Material feeding into that one and here it's called just Material#2. And if I double-click on that I can make changes, for example, click on the Base Color and just increase the Saturation, click OK, and now that's a red Physical Material. And if we back over to our Ideal diffuse XRef, double-click on that, and if we have the Object visible in the View, when we Enable Override Material then that red Material that is feeding into the XRef Node will be enabled.
So this is a way for you to experiment and maybe even replace Materials from incoming XRefs. If you just assigned a new Material to this Object then you would break the link to the Xref. Now, let's talk about some of the issues that might come up with XRefs. If you load in another Object that has the same named Material then you might encounter some issues. I'll disable this and let's load in another XRef Object, References, XRef Objects, click to Create an XRef Record from a File, load in the other Object 01_06_xref_pedestal_column.max click Open, and we get a dialog, Duplicate Material Name.
So we have loaded in another XRef that has an object that has a Material with the same name. What should we do? Use Merged means use whatever version is incoming. Use Scene means use whatever version already exists in the Scene. I don't recommend Auto-Rename because that's going to trash the names of your Materials and just give them default names. So what should we do here? My recommendation is to enable Apply to all Duplicates. Here we've only got one but if this were enabled then it would apply the same rules to all incoming clashing names, and click Use Merged Material.
What this is going to actually do is load in another copy of that Material and it's going to have an identical name, click on that, and now we can select these, and this one says ideal diffuse is the Material. But if we go back to the other one, now for some reason, we don't see the Material listed here anymore and it's as if the same Material were applied to both Objects. Now there's another weird thing about this which is as you see there is an Enabled switch down here and normally you could just turn this on and off at will and it would load or unload the Object but we're in kind of a weird state right now in 3ds Max where the program's kind of confused and if you do this now, if you disable one of these then you will permanently break the link to your Material, even though the Object is still linked.
So I don't recommend you do this until you actually save the Scene and then reopen it and that will solve a lot of problems. Let's also look at the Material Editor. We've got is minimized here, open that up. And we can see that in Scene Materials only one ideal diffuse is listed here but that's a bit of a fake out, in fact, each one of the incoming XRefs will bring its own Materials with it. It's just that we're in a bit of a weird state right now where, again, 3ds Max is a bit confused so to solve all these issues let's just save the Scene, Save As, and I'll call it 01_06_finished, and then reset or close 3ds Max, and reopen the File.
We'll choose application menu, Reset, and then load that File in again. And now, if we go into our slate Material Editor now we'll see something different. There are now two ideal diffuses and this is the actual true state of the program now, that is, what we saw a minute ago before we reloaded the File was just one ideal diffuse listed here but that was actually spurious, it was inaccurate. What really happened is each one of those Objects brought it's own Material with it and we can verify that they are, indeed, two different Materials.
I'll just dolly back here with the wheel, and select these Nodes, and delete them, and bring these Scene Materials over one at a time, choosing Instance. And what we'll see is that one of them is different to the other. Here's the ideal diffuse where we changed the incoming Override Material and here's the one where we didn't change the incoming Override Material. Okay, so the moral of the story here is when working with XRefs you should load all the XRefs in and then immediately save the program, reset, and reopen, and that's the way you can avoid some problems with broken links to your Materials or just confusion about how many versions of a Material exist in your Scene.
And that wraps up our chapter on "Material Tips and Tricks."
- Streamlining material editor workflow
- Managing XREFs and materials
- Laying out a scene for material testing
- Using the Physical Material
- Controlling highlights with Roughness
- Directing reflections and refractions
- Simulating translucency and scattering
- Building a shading network
- Combining and color correcting maps
- Baking maps such as ambient occlusion
- Procedural mapping with Substance
- Using relief maps: bump, normal, and displacement