Important Notice:

On July 31st, 2017 the Digital-Tutors library will be retired along with Digital-Tutors concurrent licensing. Effective August 1, 2017 any active group plans will be redirected to www.pluralsight.com. Each group plan will receive one individual user license on Pluralsight for each active Digital-Tutors license. Please contact your account representative for any additional questions.
Set dressing the level
See Details
Joshua Kinney

Pluralsight

Joshua Kinney
In this tutorial, we're going to set dress our level by adding props. All right. So up to this point, you should have an environment that you've created using the prefabs they we've created in this course so far. And you'll notice that in this level, I have a few prefabs that you've noticed have been broken, or we've lost that prefab. And the reason that I have a few of those in the hierarchy is because I've deleted a wall or something like that out of the hierarchy. And you can see an example of this if I select one of these really quickly. You could see this right here is selected. This is no longer a prefab. And the reason that is, is because I deleted out one of the walls in that straight section. So that way I could just butt it right up against to this straight section here, creating something like an intersection. OK? So now that we have our level built, it's not very interesting to look at. And in fact, it's not very fun to play in. Because it's just-- it's the same thing over and over again. And this is pretty simple and pretty basic. And we'll see this quite a bit in the development process of games and creating levels and things like that. There always has to be some sort of base environment. And at this point, it's where you start to add props and start set dressing the level to make it tell a story and to come to life, and in fact, just be a little bit more interesting. Now, before we get started into that process, let's clean up our hierarchy a little bit. As you can see here, we have lots and lots of different objects in here. So what I'm going to do is I'm going to create an empty game object. And I'm going to rename this and call this environment. And, as a matter of fact, I'm going to call this base_environment. And then I'm going to select the first prefab object in my list. And then I'm going to scroll down to the very bottom and hold Shift and then select the last, so that way it selects everything in between. And with all of those selected, I'm going to left click and hold and drag that onto my base environment game object. And that way, it's just going to clean up my hierarchy here. So I've just parent those together. And this is a great way for keeping your hierarchy organized. So now that I have that and we've got all of this set up, let's get into importing our meshes to start with set dressing here. So to get started, let's go to our imported assets and meshes. And the inside of here, I'm going to right click and Import New Asset. And I'm going to go to our Referenced Files in our project files folder. And you'll see meshes. And you'll see that I have several different props here that we can use. I have a beam, boulder, and boulder_01 and then the shrine. Now, the shrine, we're going to come in contact with that here in a little while. So we're just going to import these three for right now. So we're going to import the beam. We'll right click, and we will import the boulder and then boulder_01. OK. So now with all three of these, let's make sure that we have our settings or import setting set up in our Inspector. So I'm going to set my scale factor to all of these to be 0.1. OK? And then I'm also going to turn off that Import Materials and Apply. I don't necessarily need those. So I want to make sure that I have that set up right from the start. So everything is 0.1. We will apply that. And this one needs to be 0.1 as well. And then Import Materials. We will turn that off. OK. So once that has been applied, we are ready to go. And now what we want to do, is we want to import the materials that are going to be used for these three props. So I'm going to go to my Materials folder here. And you'll see that it's imported those three materials that were on them inside of 3ds Max where I created those three objects. I'm just simply going to delete those and then import three new materials here. Now, again, these are going to be materials that I've created inside of Substance Designer. And I'm going to bring in the beam.sbsar. And those are going to be in your project files, so you could do the same thing. I'm going to continue to do that. Let's go to our boulder. And here, you could see that I have boulder and then boulder_01. And let's bring both of those in. All right. So those have been brought in. We could see the material itself get a little bit of a preview of that. And now what we want to do is we want to come in and start working on those objects and start bringing those in. So starting right here about where the player is, I'm going to come in and just start to add a few props in to just kind of give you an idea of how we are going to manipulate objects and different ways that we can manipulate objects for set dressing. So let's go to meshes, and let's bring in this first boulder. And this doesn't have a bottom to it. So it kind of looks like a rock pile at first. But then let's go ahead and go to our materials and grab that boulder material and drag and drop that right onto that object there. So now I can move this and put it into any position that I want. I could rotate it and scale it any way that I want. OK? You don't have to worry about breaking anything. OK? It's totally fine that you scale these objects and move those around. So I can hit Control and D on that object there. And I'm going to move this out. I'm going to hit R to go to my Scale tool. And I'm going to use the scale tool right here in the middle. And this is going to be a uniform scale. So that just ensures that I'm not going to skew the object in one direction. And that could pose some problems there. Now, before we get going too far, we need to remember that imported assets don't always have all of the components that they need. So right now, this boulder here has no collider. And that means that the player can go through that at any point. So we want to make sure that we are taking care of that. So let's select one of these. And what I'm going to do is I'm just going to go to Component and Physics. And we could use a box collider if we would like. That might not be the best thing. I could use a capsule collider. But I think in this case, because it's such an odd shape, I might want to use the mesh collider. So I'm going to add that. And you'll see that that has been added to our components in our Inspector. So now that I have done that, what I want to do is I want to go ahead and apply that. So here, you can see that that has not been added here as well. So we want to make sure that we add that too. Now, what I could do is just simply delete this one. And let's grab this one. Let's hit Control D. We will move that into position. And then we'll scale that down. Now, you might be asking yourself, now, why did it not update from one to the other like it did with our prefabs before? Well we have to remember that these are the raw assets that we have brought in. These are not necessarily prefabs. So if we wanted to create something like a prefab, we would have to create that empty prefab and then set that up. So let's go ahead and do that now. I'm going to go ahead and just create kind of a rock formation that I would see here. So I'm going to hit Control D. And I'm going to rotate this object around just to kind of give it a little bit of a different shape and then scale that down some. OK? And what I'm going to do here is just kind of create just kind of a cluster of boulders. OK? And let's expand that or collapse that base environment. And let's create a prefab out of these. So they all have that mesh collider set up. And let's go to our prefab. So let's create a new one. So I'm going to call this boulder_cluster. And then remember we have to parent these objects into a game object. So let's Create Empty. And we're going to go ahead and call this pfb_boulder_cluster. OK? Let's select those three and drop those in. But you'll notice that this still is not a prefab yet. And that's because we haven't actually added it to this prefab. So let's go ahead and give it the same name, pfb_boulder_cluster. And then we'll drag and drop that onto there. And then you'll now notice that is a prefab. And now at this point, if we were to add anything to this prefab, it would go ahead and update that across all prefabs in the scene. All right. So with this, let's go ahead and hit Control D. And we can move this around. We can put these into different positions and start set dressing our level however we want to. And even with prefabs, you can still scale and move. You have freedom to manipulate any way that you see fit for your game. OK? So we'll start to bring these in. Let's go ahead and grab our boulder_01. And I want to bring that in as well. And let's go ahead and drag and drop that into the scene. And let's apply our material to that. So that's going to be bolder_01. I'll drag and drop that there. And I'm going to pull that up there. And this is kind of just a round type of boulder that we can have. And we'll put this into place. And this will be great at any size. Because we can make it really large in the scene. We can make it really small, can make it appear as if it's kind of like a smaller chunk that has broken off here. OK? And there we can pop that in there, just kind of place that and make that appear just a little bit different. Now, remember, whenever you add in a new mesh, you need to make sure that you have all of the components that you want for this object. So I'm going to go ahead and add this component for physics. And with this one, I'm going to go ahead and give it a mesh collider as well. Now, using a mesh collider, it does stay to the same shape as all of the objects. However, a mesh collider can be very heavy on your memory. So you want to make sure that you are kind of creating a little bit of a balance. So if you can get away with using a box collider or a spherical collider, you might want to go ahead and go with that. But because this object is so irregular, I might want to use something a little bit different. OK? And you know what? Actually let's, for this one here, let's go ahead to right click on that mesh collider. And let's remove that component. And let's just add in the box collider. OK? And that will fit the very best that it can. OK? So we can still place that anywhere that we want in our scene. We can rotate it any way that we want. OK? And just fit that as so. OK. So now the final object that we have is going to be our beam. And I want to go ahead and bring that in as well. And let's apply its material. So the material that we have for it is called beam. So we're going to drag and drop that there. And there you have this beam here. Now, I'm going to go ahead and hold down Control and rotate that 90 degrees to where that's sticking straight up and then hit W to move that into position. And these beams are going to be really great to cover up corners and things like that. So anywhere that we have hard corners and it can be difficult to look at sometimes, we want to go ahead and cover those up with things like beams and that sort of thing. And we could really line these beams anywhere that we want. We could duplicate them and we could put them in the middle of walls and we could rotate them to where they kind of stand horizontal and they kind of butt up against this object here, kind of go across the ceiling, or right across the middle, whatever you see fit. That's totally up to you. And remember that you can always scale these, and you could even scale this in one unified direction. OK? So that way it spans across that entire wall. You're not limited to the original size that you have for this. OK? So you can create something kind of along that line. So now that we've talked about some of the set dressing techniques and bringing objects in, placing them, and the different ways that we can manipulate them, go ahead and go in between lessons and start to set dress this entire level. And just have some fun with it. Try to tell a story. Maybe you have one area to where there's all kinds of rocks in it and it's maybe be a cave-in or something like that. Remember that these rocks don't have to belong on the floor. You could also put them on the ceiling as well, to kind break up the overall shape. And you could even cover an entire wall with some of these rocks. So it's totally up to you, whatever the possibilities you come up with, they're totally endless here. OK? So in our next lesson, what we're going to do is we're going to have this entire level set dressed. And then we're going to get into creating lights and creating the overall mood for our level.
In this series of Unity tutorials we are going to learn about the core features in Unity.

We will start out by learning the Unity Interface where we'll talk about the different panels and tools available in the Unity editor. From there we'll learn how to properly export and import assets into Unity. With those assets imported, we'll discuss how to create prefabs that will help us speed up the construction process of our level.

Then we'll learn how to create and apply materials to our level prefabs. Then we'll take our textured prefabs and build a simple game environment. Once the base level has been built, we will talk about adding props and set dressing our level. From there we'll continue full speed by learning how to add lights, particles, and physics objects.

Once we're happy with our level, we'll jump into scripting in Unity. We'll learn how to create a random player spawn, a HUD, item pickups, and so much more. Finally, we'll end the course with how to publish our game to the platform of our choosing.

For an additional learning resource, download your free copy of our Key Game Development Terms Reference Guide and PDF so you can get comfortable with important game dev terminology.
Introduction and Project Overview
1

Introduction and Project Overview

 
01:14
Breaking down the interface
2

Breaking down the interface

 
10:59
File management and project organization
3

File management and project organization

 
10:45
Creating prefabs
4

Creating prefabs

 
10:41
Creating materials
5

Creating materials

 
10:00
Assembling the level
6

Assembling the level

 
08:36
Set dressing the level
7

Set dressing the level

 
14:09
Adding lights
8

Adding lights

 
09:55
Baking lightmaps
9

Baking lightmaps

 
11:32
Creating particle systems
10

Creating particle systems

 
11:19
Working with physics
11

Working with physics

 
09:41
Getting started with scripting
12

Getting started with scripting

 
09:41
Creating the player spawn controller
13

Creating the player spawn controller

 
11:10
Finishing the player spawn controller
14

Finishing the player spawn controller

 
08:12
Creating the game state script
15

Creating the game state script

 
11:46
Scripting the HUD
16

Scripting the HUD

 
13:16
Creating items in Unity
17

Creating items in Unity

 
13:35
Creating the lantern functionality
18

Creating the lantern functionality

 
18:32
Loading levels
19

Loading levels

 
08:08
Publishing our game
20

Publishing our game

 
08:46