Importing Models from Maya to Unreal Engine 4
Importing objects from Maya to UE4
Now that the gun is finished it is time to import it into the engine for the final game, To do this it's pretty simple really since Maya has an option to import into Unreal already in the engine. To find this option it is simply located in the "File Tab" that is found at the top of the screen, There is also 3 options to choose from but for this case choosing the "Selection" option would be the better choice since it only imports what is selected.
Image with highlights of options to choose when imported selected objects from Maya.
Once the option has been selected then it's as simple as finding the Unreal project that the file will be sent too and then it will be sent to the imported section of the game meaning, just find the gun in the imported section and it should show the model with the imported materials, it is as simple as that but it goes more in detail with how the model will be shown in game.
Image of where to send the file to when importing the model.
With also importing a model from Maya some models might have animations attached to it and they also do import over as well as one massive animation cycle that would have to be separated inside of the engine that the model will be imported over to.
Putting the Model in game
This part will be more set to putting the gun within the FPS template which is pretty simple but some parts can be easily over looked and can cause an error when compiling the gun properly. The first thing would be to open up the "First Person Character" blueprint within the template and just delete the template gun and then drag the gun into the viewport to add it into there. It would be simple to just go from there and compile but that would cause an error because of some blueprints are missing "Targets" and don't know what to attach to.
Image of attaching the gun to component to allow it to be edited in the viewport.
In this case it would be as simple as going to the "Construction Script" for the FPS character what is usually next to the viewport tab and attach the new gun to the targets and also setting the 3 values what define the location, rotation and scale of the gun to "Keep Relative" this also will allow the gun to be edited so it doesn't stay the original 1-1 scale since the gun when imported will be pretty tiny and would be hidden inside the hand. From there position the gun so it looks good when playing the game and that is it, the gun is now apart of the game.
Image of the gun in the viewport
Comparison with unity
With unity is similar but in this case it would be much easier since the gun would be it's own game object and won't resize when attached to another object making it much more easier to resize and won't cause as much errors. It is the same process though to send it to the engine the only difference being attaching the model to another object.
Comments
Post a Comment