Maya to UE5: Static Mesh Export & Import FBX Study Part 1/3 - EXPORT SELECTION

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video you're going to learn one of the options for how to export your own custom static meshes your own environment assets and props from Maya and then import them into u5 and I'm going to cover all the options that you need to be aware of how to use them how to set up your objects properly in Maya so they translate to u5 correctly and all the options you need to enable and disable as you do this and this option is going to be export selection and it's the most commonly used option for exporting your own assets so let's get into it so very first thing is make sure that you have your grid set up correctly as I covered in another video and this will ensure that you have one to one scale and dimensions so everything you create in Maya will match to the size that is supposed to be in uv5 and you're not creating new meshes to small or too large we have to scale them up or down very important you do that very first thing before you create an exp ort anything out of Mya next is I'm going to create a cube and that's going to be the first object a very simple primitive shape that we're going to export and cover the options and then I'll show you a few variations so I'm going to create a cube and the size of this is going to be 100 in units in centimet in height width and depth so it will be also 100 units or 100 cm when we bring it over into under 5 and I'm just going to go ahead and take this Cube and snap it on top of the grid so next let's go through the options for exporting s ofb for the for this selection for this selected mesh so to export a selection just simply make sure you have the object selected and you would go to file export selection when you have this uh menu open make sure that you have files of type set to fbx export so you just use the drop down menu and choose fpx export you could also do here if you go to file export selection options box you can set this up ahead of time but then in order to get those uh options for the fbx export you actually need to go file export selection not the options box so I usually just go in here and you can change the files of type to fbx if you don't see this in a drop down menu make sure you have under Windows settings and preferences plugin manager did you have fpx maya. MLL is loaded and autoloaded to ensure that you have the fbx exporter plugin enabled now prior to exporting there are very few important things you need to consider when you export a static mesh number one is the Pivot Point on an object so this Pivot Point needs to be controlled and placed exactly where you would want it to be on the mesh when you import it into u5 so right now it's in the center of the cube so if that's where you want your pivot point to be you can leave it however if let's say you want this Pivot Point to be at a corner on a vertex of a corner of an object or somewhere else you need to reposition this pivot point so there are multiple ways to modify pivot Points in Maya you can hit the insert key and this this will toggle Pivot Point modification and then you can move your pivot point and hit insert again to go back to the object mode or you can hold down D and you can modify this Pivot Point anywhere you would want this to be on an object so I'm actually going to place this Pivot Point right here on the bottom of the mesh right in center so I'm going to hold on D and because it's already on top of the grid just going to hold on D and X so I can snap it to the grid to the bottom of this Cube again if you use Maya and you know how to snap your pivot Points or snap objects to other objects or verses to edges this will become very important for snapping pivot Points to edges verses or to the grid now once you modify the Pivot Point you have to place this object at its Pivot Point at the world origin right here in the 0000 World space this is extremely important if you don't then this means that this object this this asset will be right here where it's at and the pivot point will automatically be placed in the world origin so you just need to Simply control by placing this object at its pivot point in the world origin prior to export and I'll show you what this means when you don't first modify the pivot point and then place that subject at its Pivot Point to the world origin at the 0000 World space and now you're ready to export it's also a good idea to delete history and possibly freeze Transformations on this so make sure you delete history to avoid any problems with the export you would go to edit delete by all type and history and then freeze transformations so this way you can always bring this object back at its Pivot Point to the world origin you don't need to freeze Transformations but it just helps for any reexport and you have to do later so you can go to modify and freeze Transformations so this means that if you move this object somewhere else you can always bring it back to the world origin by just typing in translate on X Y and Z to Z it'll be brought back just helps a lot and now let's go to file export selection choose the folder where you would want to export this into so actually have a folder here export meshes and I'm going to give it a name don't give it any spaces either use a dash or an underscore so I'll do Cube selection again make sure you have files of type set to fpx export and let's define some settings make sure you have smoothing groups enabled this will retain the soft and hard edges on the mesh and it will display those edges correctly when you import it into u5 so always have this on smooth mesh also have this enabled and smooth mesh on will always export the low poly version of the mesh if you have smooth mesh preview enabled so what this means is having this on will always export this version of the mesh the polygon version the low poly and in Maya if you press three this will give you smooth mesh preview so with smooth mesh on it will always export the low poly like when you go back to hotkey one and it will ignore any smooth mesh preview you have enabled in Maya so let's go back up to uh export selection so again this uh I keep this on because I never need to export the smooth mesh preview version however if you ever do and you want to export whatever you see inside the viewport so if you have smooth mesh enabled just make sure you have this disabled and will export whatever version you are seeing inside the viewport either low power version or the smooth mesh preview version so I'm going to go ahead and make a keep this on and that's it you can enable triangulate in previous versions of Maya this actually gave you an error I let u5 triangulate meshes for me so I don't triangulate them in Maya but you could either unable in this if it gives you an error you can triangulate it by going to mesh triangulate however I let ue5 triangulate things for me on import and there's nothing else you need to change uh another one important option but this is an advanced option is enable tang and binormals this is only for advanced users who have modified tangents and binormals on the mesh so if you edited any normals and changed anything on the normals within the mesh itself then you may want to export that data by enabling this most of the time for most objects you're not going to be dealing with this so uh have this disabled unless you know what you're doing and you've actually modified those normals and tangents all right so with everything said actually let me go back to uh exported meses and rename this again because it erased the name Cube selection and hit expert selection this mesh has now been exported as fbx in uifi let's go ahead and import that mesh so you will be importing it into content browser and into any folder so make sure you select the folder where you would want to import your mesh into uh you can create your own custom folders in here to do that you just select the folder or you can be inside the content folder and you just simply right click inside the empty space here and go to new folder and then rename it and then when you inside that folder you can import your St MH into so I already have uh this test static meshes folder this helps to organize your content better and to import that static mesh you can click add and I go all the way up to import and just navigate where you exported your fpx file into you can select it and then click open another way is just navigate into the folder and then just simply left click hold and drag right into content browser this probably the method that I use the most just left click and drag and when you import a menu will pop up fbx import options so let's go through some of the important ones I'm going to reset everything to default and one little icon you want to enable if it doesn't show up is make sure you have uh open up Advanced options right here so the first thing is build nanites Do you want to build nanites or not this will enable nanites for that static mesh if you're using Lumin lighting which most likely you are go ahead and enable this Nite meshes even if they are low P work better with lumid lighting as opposed to if there you have them disabled so I'm going to go ahead and enable this you can actually change this option inside the static mesh editor later next option is that do you want to generate missing collisions so if your mesh does not have collisions created in Maya UI will generate them for you so I usually have this on unless I need to reort and and bring in my own custom collisions so I usually just enable this so u5 creates them for me next everything is pretty much kept at default uh for Generate light map UVS if you are using Lumin lighting you do not need light map UVS light map UVS is a separate Channel where it will hold information for lighting and Shadow when you build your lights for static lighting now Lumen lighting is dynamic lighting so you don't need light map EVS if you're using Dynamic lights however if you need light map EVS you can tell u5 to generate them for you or you can create your own custom light map Channel inside Maya that's a whole separate topic as far as the right now if you're using Lumin lighting and dynamic lighting which is what Lumin is and there are no static lights inside your level inside your environment then you do not need to generate light map EVS so I'm going to disable it cuz I don't need them next is combined meshes uh we don't have separate pieces for our mesh it's just a simple Cube so and I'm not going to combine anything because it's just a simple Cube but I'll go through this option in a bit because this is an important option especially when we deal with if you export the entire scene out of Maya which will be in a separate video that I'll cover so I'll just keep that at default but I wanted to mention it next I'm going to scroll down uh import normal that everything is going to be kept the same we did not modify or uh mess with our normals inside Maya so everything's default uh the only thing I want to change a little further on is under material material import method so you can either create a new material let you5 do this for you or you can choose to do not create material and then you create one yourself and then apply it to the object so I will create a new material to show you what that means but if you choose to not create material which is most of the time you will because you usually create your own materials you define them and then you assign them to an object when you enable this you would usually disable import textures unless you set up your own material inside Maya with textures that you want to be imported with your fpx file again most of the time you will be doing this all yourself importing textures manually and then creating a material manually so you would uh do not create material and you would disable import texture so you can do this yourself with more manual method and more control however I'll just keep this on but I'm going to switch it back to create new material which actually disables import textures so what this will do is we'll create a simple basic material and apply it to our Cube automatically so once all these properties have been set up I'm going to click import all which is actually doesn't import anything more than just that one single mesh if we had multiple things selected it would apply all these settings to multiple meshes at the same time so we can either click import or import all for us is just one single Cube so here we have our Cube static mesh that's been imported and here is the Lambert one material which is actually the default name for the material from Maya and that really briefly if I open this up all u5 did is create a simple basic material gave us a constant three vector and connected it to base color that's it that's all it did and then it took this material and then applied it to our mesh so if I double click on a static mesh static mesh editor will open up and here is our Cube static mesh and and here's our assign material so it kind of saves you a few steps also for collisions if you wanted to check collisions what kind of collisions are generated for this Cube you will go to show simple collisions and will show you the hole the Collision hole that it generated which is actually very good and uh the collisions that u5 generates tend to be very accurate unless you have an object that's a little more complex with cut out holes and just has a lot more intricate detail then you would run through a multiple options or you you can create one yourself inside Maya but that's again that's also another for another tutorial video and then let's go ahead and close static mesh editor and you just simply take your Cube your static mesh and drag it into the level and now you have imported your first mesh so let's go ahead I can spawn inside the level it has collisions and it's to the proper size to the player which the height of this character the u5 character inside the game is 180 cm and our box is 100 cm so again everything is 1 to one in ratio for the size and dimensions so this is the basic step by step of exporting and importing into u5 however let me show you a few more additional things you may need to know as you deal with export selection let me show you a few problems with if you don't export from the Pivot Point placed in the world origin so here's what happens a lot of times people would export their mesh and with the pivot point exactly what they would want it on an object but the object is not in the world origin on export so let's say I want to export this Cube as is from Maya so I'm going to go ahead select make a selection and again if you don't have a selection that you go to file export selection nothing will be exported you can still export but there's no information so make sure you select go to file export selection I'm going to keep all the same settings as before and I'm just going to overwrite our existing Cube selection to do this you simply selected export selection and just confirm that you do want to replace it and now let's go into U 5 if you already imported your static mesh once and it's already has a connection from Maya to u5 to reort really quickly without having to rrag you simply rightclick on the mesh inside the content browser and go to repport and this will repport your mesh with the new file that you updated you can also repport with a new file which will simply open up to ask you select the new fbx file that you want to associate with the current import so we don't need to do that but you can just uh choose a new file and it will update it in this case we're just simply reimporting so once you repport you can see that the Pivot Point continues to stay in the world origin however the cube is where it was in Maya so the geometry itself stays in the same location but then it forces and moves the pivot point to the world origin so this is why it is important that when you are exporting using the selection you need to move the pivot point and an object to the world origin and make sure it's right in the world origin at its Pivot Point that's how it's going to be exported and then import it into u5 so this is why we had to freeze Transformations at its pivot point so we can always bring it back for reexport and then reimport very quickly next is let's deal with combined and not combin meshes so a lot of times of course you're not going to be having a single Cube that you export you're going to have a more complex object that contains other primitive shapes so other objects that are attached to it so in this case I'm going to duplicate this Cube let's make it smaller so let's say I exported something like this and it's made up of multiple meshes so you can actually select both of these cubes or you know as many meshes as you need and Export as they are away from Maya into u5 and then you would have an option do you want to combine these separate objects into one so u5 sees it as one or do you want to keep them separate and import them as separate so for example uh let's just go ahead and Export them as they are separate objects but we're going to select them both go to file and we're going to bring in uh we're going to export as selection all the same options we're not going to be changing anything here other than we're going to change the name so let's name it Cube and let's uh name separate and Export selection so now it exported two of these meshes inside one fpx file and again you can have as many of these separate meshes as you want and they will all be exported into one single x file back in u5 I'm going to go ahead and delete this Cube and I'm going to bring up the same window right here and I'm going to import the new Cube so this is a whole new separate mesh so we're just going to drag and import this new mesh and uh the new menu pops up our import options so here uh again I'm going to generate Ming collisions yes build nites everything is the same in this case I'm not going to create a material so I'm going to show you what that looks like I'm do not create material for this one and I'm going to not import textures and everything else will be kept at default now one option that I want to show you is right here combine meshes so if you hit combine meshes those two separate meshes or more will be combined into one single object if you enable this if you do not enable this then those two separate meshes that you exported will be brought in as their own separate meses so let me show you I'm going to keep this at default and I'm going to hit import all so now we have two of these cubes one two let me go ahead and uh select them and delete them so it brought in two of these as their separate meses just like we had inside Maya like so and you can see the pivot point for the second one has been moved down to the world origin because we didn't modify it we didn't touch it now I'm going to go ahead and select these two the the the current ones we brought in oh and the separ a small little note the names for the files are going to be the name of the mesh and then the name that was assigned in Maya so we exported this as cube separate and then the P1 that you see right here and then the P2 the P Cube 2 and P Cube 1 those are the names in Maya that were assigned by default right here so it assigns the name of the exported file and then the name of the mesh in Maya so I'm going to select these that we're not using inside the level anymore I'm going to hit delete and it's going to ask do you want to delete yes I want to delete them and I want to rebr them again Cube separate let let me take a look at the menu and now I'm going to enable combine meshes and then I'm going to hit import and let me take a look do not create material that's correct import all it still assigns the material in here yeah it still assigns the material for some reason let me go ahead I'm going to clear it so it goes back to the default this is what you should see when you say Do not create material it's going to sign a world grid material onto a mesh which is the default so you can see now this mesh took those separate meshes and combine them into one so it's a very important option depending on how you've exported and what do you want to do on import you want to combine those meshes into one single mesh or do you want to keep them separate and keep them as their own separate meshes let's go ahead and delete this from the level and also delete this from the content browser and I'm also going to delete these two as well I'm going to select them both hit delete and remove them now back in Maya what you usually do when you are creating new objects you usually combine them into one so this is the recommended method so if you are working on a mesh and it's a single asset prop but it contains multiple meshes multiple things that you are trying to work together with you know a more complex prop or environment asset what you want to do towards the end is just combine them all simply combine the mesh inside Maya by going to modify or actually it's under mesh combine and combine that into a single mesh you can either do this in u5 but I prefer to do it in Maya because if it's going to be a single mesh then I need to combine it into a single mesh it also helps with UVS because now UVS are all one single UV map rather than multiple objects having their own UV map it's it's a little more combersome to use if you don't combine them so if it's a single prop a single environment asset that's made up of multiple measures just go ahead and combine them in Maya then once you've done so modify the Pivot Point make sure you know exactly where you would want that Pivot Point to be so in this case let's go ahead and snap it to the corner vertex right here and then then I'm going to move this object add its Pivot Point to the world origin and snap it right there in the corner very important that you do this modify the pivot point and then place that object at its pivot point in world origin prior to export and then go to file and let's do export selection I'm going to keep the same settings here and in that case I've already deleted everything from u5 so I'm just going to overwrite the cube selection so I don't have to create a whole new fbx file and let's uh export this and overwrite and back in u5 I'm just simply going to drag this Cube selection into our folder then let's take a look at the settings everything will be kept the same uh I want to make sure that number one I don't create the material this time and I do not import textures and I want to make sure I disable combined meses it doesn't matter right now because this is a single mesh so it will be brought in as a single object so I'm going to hit import and here we have our new mesh and it assigns the name Cube selection exactly of the fbx file and then you just drag it into the level our private point is exactly where we need it to be right on that corner and here's your object now if you decide to delete a mesh inside the content browser but you also have it inside the level when you press delete on this mesh it's going to ask you do you want to force delete it because you have a reference being placed inside the level already if you force delete you will have an empty container that's still inside your level called Cube selection it will have no mesh associated with it so this is very important that you're going to lose the mesh inside your level while keeping this empty kind of container asset inside the level so first thing you would want to do um you wouldn't want to force delete you just want to make sure that you would delete any instances from your level and then you can go ahead and delete it from the content browser uh because we have no more references being associated with it inside the level and now it's a clean delete clean removal of the static mesh so this was the first video on the study of exporting and importing static meshes which was export selection as fbx and this is probably the most common way you will export your environment assets and environment props by creating a mesh and then exporting that specific mesh as a selection and now you know how to do it now if you want to learn how to use Maya how to model your own static meshes with more detail and covering the entire beginner series of using Maya the industry standard software to create your own custom assets I have a very extensive course that covers everything you need to know on how to begin using Maya how to model with it and how to use VI objects so you can texture them then take a look at Maya Foundation the home study course and then also if you need to learn Union 5 completely from scratch as a complete beginner how to create environments how to light them and how to even use the model in mode inside u5 to create static meshes completely inside u5 then take a look at u5 fundamentals volume 1 course
Info
Channel: WorldofLevelDesign
Views: 1,260
Rating: undefined out of 5
Keywords:
Id: aoaxcV_rXTY
Channel Id: undefined
Length: 24min 20sec (1460 seconds)
Published: Thu Oct 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.