Join Craig Barr for an in-depth discussion in this video Importing assets into UE4, part of Unreal: Architectural & Industrial Visualization.
- [Instructor] Once you have your assets exported from your content creation package and ready for your visualization project within Unreal Engine, there are a couple things to consider when importing those assets into Unreal. Let's take a look at how we can work with assets in Unreal, or how we can get them into Unreal to begin with. So there are a couple ways to import assets directly into Unreal Engine. If you're following along with the exercise files, you'll see that I'm using Chapter 04, 01, and this is just our bare-bones settings where we left off when we created our first-person character and removed some components that we didn't need, and we left some real basic things within the scene to work with.
So right now, that character is just floating in space. There's no floor, there's nothing else going on in here. We're going to add those assets to help our character out here, our first-person perspective, in a moment. So working with the Content Browser, if you don't see this Source area in here, you can just simply hit that little icon in the top-left corner to show the different folders in here. Now the reason why I want to open that up is that we're going to be importing everything into this Geoometry folder, more specifically into our Meshes folder.
So we can actually dive right into the Meshes folder by double-clicking that, and this will show us our path up on top here as well. Now, we can simply click Import, and that's going to bring us to a file menu here, or we can right-click, and go to Import to Game/Geometry/Meshes so that we can import our assets from wherever they live into that Meshes folder within our project directory. So let's do that, let's click Import. Now as mentioned previously, I've actually gone ahead and created all these different assets for our project here for you, and I've exported them in a variety of different ways to show how you can export objects with FBX file format so that it can be helpful or useful for you when you bring it into your project.
And this is what we're going to see with FBX and how Unreal works with FBX files with multiple objects within an FBX file. So, the first thing that we want to do is import in our floors. And the reason why we want to do that, is because the floor itself, is going to provide something we can walk around on, but also we're going to use Auto-Generate Collision on that. So I'm going to go ahead and click open, and it's going to bring up the FBX Import Options. Now typically by default, Auto Generate Collision will be on, in this case it's not, so we're going to make sure that that is turned on, and we also want to make sure that, sometimes this arrow will be pressed down or you won't be able to see all these options, so underneath Mesh, Auto Generate Collision, make sure that's checked for the floor only, and then click that little arrow, and let's take a look at what we have.
On everything that we import, we want to make sure we have Generate Lightmap Uvs as that box is checked. What that's going to do is generate separate UVs for our lightmaps here so that we have nice clean lightmaps when it comes to pre-computed lighting. Another thing that we want to make sure that we're not doing is Combine Meshes. If you followed along with the export portion here, we talked about the importance of figuring out exactly what we want to do with those assets. So if we've put a bunch of different components or pieces or models or assets into one FBX file, and we click Combine Meshes, they'll all be combined into one and they'll only work as one object within Unreal.
That's very useful for certain scenarios. It's not for our visualization project here, so we're not going to click Combine Meshes. Those are mainly the most important ones to take a look at here with regards to importing into Unreal. So for now, we're going to leave Combine Meshes unticked and the rest we don't need to worry about touching here. We're going to go ahead and just click Import. So we'll bring that in here. We may get some errors. I should point out that as we're importing things, you're going to see many errors come in here.
A lot of them might have to do with the shading, and because we don't have any materials or textures going on there yet, we're going to just ignore that anyways. You can hit Clear, or just close out that error on there as well. Now, as I imported that into the scene, we can see that it actually brought two different objects, and this is what I was talking about with FBX, you can actually combine several different pieces into the FBX file, and it will respect that, as long you don't have Combine Meshes clicked, they will come in as different pieces. If we had Combine Meshes clicked or selected on there, it would combine them into one object, so, important to note.
So let's go back now. We've brought just the floor in. And the reason why I want to do that is I wanted to generate collisions automatically on there. Now for the rest of this. We don't need to go one by one by one and go through all these different assets in here. I'm just going to select the top one, select the bottom one, and then just make sure Floors are not selected on there, and we'll hit Open. This is actually going to ask us here, as we go for all these different files here, what we want to do.
I don't want to Auto Generate Collision on this specific asset here, which is the Art one. I don't want to combine the meshes on that as well, and we can leave the rest of it as is. Now, this is what we're going to be going through as I hit Import, we're going to be doing this with all the different files here. So you can simply follow along if you'd like, or you can jump ahead and be able to do this, but essentially what I have is set here I'm going to do for every single file as I bring it in, and we can see that the Bath_chrome, it's going to list out what the current file as I go along.
So, let's close this part up, make this a little bit easier here because it's just going to bring it in as long as we have Auto Generate Collision off, and, whoops, our Combine Mesh is off, that's all I'm concerned with here. So I'm going to hit Import All. That's just going to go ahead and bring them all in all at once, so we don't have to worry about going through all of that, and as I mentioned, you may get a couple of errors in here, may have to do with the shading space right now, we can ignore that, because we're not dealing with that quite yet. And now we can see in our Geometry directory here, specifically that Meshes folder that we're working with, all of our different assets, and they all exist now within that Meshes folder.
So that's how we can import assets directly into Unreal Engine. Consider, if you want, Unreal to Auto Generate Collisions for you. In this case, for pretty much everything that we're doing, we don't want it to. The floor, it's fine, but the rest, I want to customize how those collisions work. The reason why I want to customize that is that it can be lighter on the load of the game. We'll come to that a little bit later. And then, also, how quickly we can just group select a bunch and simply hit Import All.
So there's an overview of how to import your assets for your visualization project into Unreal Engine.
- Defining project goals
- Creating an Unreal Engine 4 (UE4) project
- Adjusting first-person project settings
- Creating effective assets
- Exporting assets for UE4
- Importing assets into UE4
- Placing assets in a scene
- Adding and editing collisions
- Working with textures
- Creating a basic material
- Adding a post-process volume