Join Craig Barr for an in-depth discussion in this video Exporting assets for UE4, part of Unreal: Architectural & Industrial Visualization.
- [Instructor] In order to work with our assets in our visualization project within Unreal Engine we want to make sure that we properly export those assets out of the package that we built them in. Here we're going to take a look at export options for working with our assets for your visualization project. Now if you have access to the Exercise Files you'll have access to this scene here as well, which is simply the entire dataset that I built all these different little pieces and models for you, so that you can play within your visualization project.
First off what we're going to look at is the file format we're going to be using. Now once again I'm using Maya, whatever package you're using you'll want to adhere to these similar settings as well. We're going to using FBX. There are certain advantages to using the FBX format, we'll see that here shortly. I'm going to just turn off some of the display layers that I have on here. Maybe we'll keep the floor on. Actually no, we'll turn the floor off and so that we have access just to some of these simple little assets in here.
So when it comes to exporting assets out of Maya there are a couple of different options that we'll take a look at very quickly here, and a lot of other packages have similar options as well. Whether you're using CINEMA 4D or Max or Blender there maybe other components, like this, that you'll find helpful. In Maya there are simple exporters, like the Export Selection, or Export All, we're not going to take a look at Export All, 'cause we want to break these down into little pieces that we can work with individually within Unreal. So we'll be mostly working with Export Selection.
But in Maya there are things like this Game Exporter and a direct Send to Unreal. This is where you'll define your Unreal project and it's actually very handy to be able to send assets directly from Maya into your Unreal project. This is especially useful when you're working back and forth between Maya and your Unreal project. So let's dive in and take a look at how we can use the Export Selection with some of these assets. So here if I take this chair, for example, I'm just going to click it and press f, we can see that the chair is actually broken down into separate pieces.
This is important to note, because when it comes to exporting our assets out of our package that we're building in into Unreal we need to consider things more than just file format. We want to consider how the asset's going to go be used. Things to consider, some of the basics are materials that you're going to be applying. For example, these legs are all going to be using the same material, but I also have them all together on the same UV layout, which makes it easier for me to be able to access that and minimizes the number of textures I need within the scene.
So I have the chair broken down into its own separate piece, but you'll notice that each chair is sitting in its own little world as well. So that's something to note. Another thing to take a look at here with going along the lines of this idea of broken apart pieces or even merged or combined pieces is in our kitchen set here. I'm just going to turn on the wireframe visibility over top of the shaded, so we can see what we're looking at. Now we have this kitchen island and this would be nice to bring in as one entire piece, that is combining it maybe in my package here, but the problem with doing that is that I want to have access to all these different individual pieces, the cabinets here, the countertop, the taps, things that I have specific materials for.
So you can see that I've broken this down into something like the marble countertops, 'cause I'm going to use a marble material within Unreal for that. However, if I'd want to apply a collision on this countertop I'm going to be stuck with a massive collision that's going to actually envelope this entire area. That's something to note, because the automatic collisions are going to generate it that big. There are tricks that we can use though. So, for example, to build a collision around just this island I'll build a collision around just this piece here and not have to worry about the countertops.
Likewise, I'll do the same over here with this cabinet, that'll envelop the countertop as well. But we'll look at that a little later. But the important thing to note is think about how you want your pieces to exist, because breaking them down into every little piece isn't really that handy, but having them combined into one single object really limits you, especially when it comes to materials or things like collisions or other things you may want to do with the object, for example, animation. As an example here I've actually taken the hardware in the kitchen and I've combined all of that, so those little pieces, into one object.
And the reason why I've done that is they share the same UV space and I'm not going to be using collisions with them, but I want to be able to just apply and drag a simple material onto one of these and have it all utilize the same material, so that actually becomes something a little more efficient in the workflow there for me. But as I mentioned, I have this island broken apart and I have these stools broken apart as well, but I can combine those if I really wanted to, but I do want individual control within Unreal, so I'm going to leave these guys as individual elements in here. In fact, I could just export one and then simply duplicate them to produce that or reproduce that over in Unreal.
Now we talked about combining objects, we've talked about objects broken into pieces, here's something different that you can also do with FBX that's really handy. So rather than exporting out every single little piece as an object I can think of these things as grouping within FBX, so that helps me minimize the number of objects or pieces that I have. For example, I can go ahead and export each individual chair or I could export all of the chairs here like this as FBX, because what it's going to actually allow me to do is bring that in as one file, but it will still respect that these are individual objects if I tell Unreal to do that.
And we'll look at that in the import. But this is something that's actually really handy to do. So if I want to take, for example, this stool and export out that stool I can simply go up to my File, Export Selection, let's go to the Options, make sure that we select the File type to be an FBX export. I'm not going to worry about any of these options here right now, we can ignore all of these right now, but let's go to Export Selection. Now something that's important to note here is that we can export this directly into our content folder.
So here we are in the Exercise Files, UE4_VizContent. Now in the Geometry folder we've created this Meshes folder and I could export directly into there these objects into there, but we don't want to do that right now, because we want control over how these assets are going to be coming into Unreal, so for the sake of learning right now we just want to actually bring these into a different folder. So I have a folder built here called Exports and you'll have access to all of this as well.
And these are all of these pieces that are broken down into separate areas, but I'm taking advantage of FBX to actually work with things in a grouping sense of the way to work. And here's an example here. You can see that I have Bed_tables. We'll take a look at the bedroom here in a second here and we'll see that that actually represents the two side tables that are together, but of course I have this thing called bedset. Let's take a look at what that would be. So if we go over to the bedroom area in our visualization dataset we can see that we have this bed frame, just putting in wireframe there, and we have individual pillows, and we have this duvet cover, these are all different objects, but what I can do to make this easier rather than exporting these as one individual piece is that I can actually export all of these pieces here and call that bedset.
And that's what I've done. But Unreal, if I tell it to, will respect that, that those are individual pieces still, and we'll see that in the outliner there. So something to consider. Rather than exporting out this duvet, these pillows, that bed frame, or all of these pieces individually. Likewise, I actually did the same thing here with the kitchen. Rather than bringing out all of these different pieces I actually exported out something that I just referred to as kitchen set. And this has all the different pieces in here as one FBX file format.
And again, we'll see that when we jump into Unreal and import these assets and the options that it presents us with. But these are some things that we want to keep in mind, how we want to work with those assets for down the road within Unreal. Now let's take a look back at the basic components that we want to set to for our FBX settings in Export Selection. So we'll click Export Selection and export these assets to wherever you want to do this, or don't at all, simply because I have them already pre-exported for you, but if you want to learn along or move along with these settings that I'm using here, which is a great idea, especially to learn the different settings that we want to be able to work with when it comes to geometry exporting for Unreal, this is the tab that you're going to be most concerned with.
Underneath the FBX Export Selection Options is the Geometry flag. And if you don't see that you can simply scroll down, it's under File Type Specific Options here, hit that little down arrow, hit Geometry, and then you'll see it presents you with the different options. Now I'm going to tick the three main options that's we want for exporting from our content creation package, so that it comes in nice and friendly and clean into Unreal. We want Smoothing Groups turned on and we want our Triangulation turned on, and we also will leave on Smooth Mesh.
And what this is going to do is bring in our asset with respect to how the normals are, any smoothing groups that may be in there, it's also going to triangulate it for us at FBX, so that the assets are already pre-triangulated when they come into Unreal. So this is what we would simply click on here and then we would define a name for our asset in here. So for example, for the stool we could call that one Stool1 or just simply Stool if we're going to duplicate it and repeat it within Unreal, and then we'd hit Export Selection.
Now once again, I have all of these pieces exported out into different file formats for you, but those are the main settings that you want for FBX, and not just the settings, those are also the things you want to keep in mind, considerations that you need for how you're going to be working with your assets within Unreal. So that's just a quick overview of FBX export options from Maya to 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