From the course: Unity for Architectural Visualization

Building the core materials - Unity Tutorial

From the course: Unity for Architectural Visualization

Start my 1-month free trial

Building the core materials

- [Instructor] In this section of the course, we're going to be focusing on materials and lighting, and I'm going to start by looking at materials. These are the textures and the information we can apply to the surfaces of objects to make them look like they're made from real world materials. Off screen, I have gone ahead and created a materials folder. And inside that folder, I have created a material for each of the different areas of the environment that I know in advance we're going to need. You can see that list here. I've simply chosen, right click, create, select material, and then I've given the material a name. The other thing that I've also gone ahead and done, if I select for example, the floor object is here inside the floor in the mesh render a component you can see for adamant zero, one and two, that I've dragged and dropped the relevant materials into those slots. If you want a fast track method for generating these materials and assigning them to the meshes, you can move to the meshes folder, choose the lobby mesh. And from the materials tab, you can click the button extract materials. This will find all the materials that are embedded in the mesh here and save them to your computer. Be warned, depending on how your project is set up, the mesh may turn completely pink. If it does do that, please don't be alarmed because you can easily fix that problem. For example, all you need to do is to select the floor. And if that floor did appear pink for you, then it's probably because element zero, one and two were misaligned. It hasn't properly found the materials that were extracted. And you can easily fix that by moving to the materials folder and dragging and dropping the relevant materials into those slots. For example, by selecting the floor, you can see that I have the mat floor assigned to it. If I select mat floor, these are all the default properties of a material, but if I wanted to change the color of the floor, I simply move to the base map field, click in the color swatch, and I can change it to whatever I want. I'm going to leave it back at white. In this video, I want to focus on creating a material for the floor and for the windows of the environment. let's start with a floor, I'm going to select the mat floor material here. And then I'm going to move to the base map field. This allows us to control the primary color of the surface. I'm going to click in the swatch and I can select from a range of different textures that are available in our project. I'm going to choose the marble zero one texture here. You can see a preview of that inside the inspector, and you can also see that it's been mapped to the floor, but the different tiles of the marble here appear absolutely huge in our floor and we'll see how to fix that in just a second. Now, of course, the floor is composed, not just from a set of tiles, but these tiles have roughness and smoothness properties, and these are defined inside a normal map. So I'm going to move down to the normal map slot, click in that, and then select the marble zero one normal map here to load that into the slot. Now I can tweak the bumpiness of this normal map to kind of change the properties of bumpiness of this surface here. I'm not going to do that just yet. I'm going to wait until we began to add lighting to the scene to get the full effect of that normal map. But one thing you will notice that the tiles of the floor are enormous. They're too large for this floor. We can correct that by scrolling down inside the material and taking a look at the tiling field, you'll see for X and for Y we can change the tiling properties of the floor. So for X, I'm going to choose, well, let's just try 10. You can see the value that 10 has, could it be possibly? Let's go to the Y field and change that to ten too to see what we have. And then really we need to take a step back and see whether or not we think that is right. I think that might be a bit too many for the Y axis. So I'm going to change that to eight. And I think that's looking okay. I think perhaps too many on the X too, so I'm going to change that to eight. And I think maybe that's looking a bit better here. So for now, I'm going to settle on the values of eight and eight for X and Y tiling. Obviously you can use different values if you think they look better in your case. So here I've got set up the basics of the floor here. I can later tweak some additional parameters that will be important. For example, the smoothness slider allows us to control how smooth the floor should feel. You can already see in the preview here, which does add some basic lighting that as I move that slider to the left, the shiny highlights begin to dissipate. Whereas when I move it to the right, they become stronger and more concentrated. This will be important later when we add lighting to the scene. The other material that I want to create here is the glass for the windows. You can see, we have some windows here looking into the back office. We have some windows here, some windows here, and actually we have windows running throughout the entirety of the environment. Now I've already gone ahead and assigned those windows the material. For example, if I select the window here, you can see from the inspector that in element two, I have assigned window glass and I've gone ahead and assigned the glass materials to all the different areas of the mesh where the glass should appear. So with the glass over here, I can select the object and you can see it also has that window glass material. And you can assign that yourself, if you want to just by dragging and dropping the window glass material into that element to slot. I'm going to select the window glass material here. And from the inspector, I want to change some properties to introduce transparency for the glass. I'm going to move to the surface type at the top and change that from opaque to transparent. You can see here immediately that we do get transparency for the glass. Of course, we're not getting quite the shyness and the smoothness that we want but we can easily fix that. So I'm going to move down to the section here that says material type, in the dropdown by here, it says standard. I'm going to change that from standard. And for now, I'm going to select iridescence to add a kind of rainbow glow to capture the iridescence of glass like surfaces. In addition, I'm going to also increase the smoothness of this material here and then click in the base map. And I'm going to reduce the transparency in the alpha field to just kind of reduce that transparency here. Great, this is looking much better. And you'll notice that as I move around the level, you can begin to see and notice the iridescence of that material coming across here to simulate the glass panels. Now this will appear substantially different when we begin to add lighting to the scene and it will also include reflections. But right now, because we have lighting deactivated from our lighting slot, we don't see all of that data. I could try deactivate again and immediately you'll see what a difference that begins to make. And this is before we've even added lighting to the scene. So in this movie, we've gone ahead and we've set up the floor and the windows. We still have a lot of work to do, but the basic principles we've used here for the floor and the windows remain the same. So we're going to go through the rest of the environment to take a look at what other materials we can create and assign.

Contents