Chapter 1. Importing 3D Models and Animations

In this chapter, we prepare the assets to build up our game prototype, starting with the process of exporting 3D models from Maya, our 3D editor of choice, into Unity. We also take care of correctly setting up the imported models and animations in Unity Inspector once they get imported.

In this chapter, we will cover the following recipes:

  • Setting up a scene in Maya
  • Using groups to rotate FBX files
  • Exporting FBX files from Maya
  • Configuring imported FBX files in Unity
  • Exporting animations
  • Configuring imported animations in Unity Inspector

Introduction

When building up a game, we usually start by importing the graphics assets to actually build up and prototype the gameplay.

In this specific case, we decided to begin with 3D models. Before importing the models, you should take care of bringing in the textures. Feel free to switch between Chapter 1 and Chapter 2, 2D Assets for Unity, which focuses on textures and materials. A cookbook is specifically designed to leave the readers free to access the contents in whichever order they prefer.

We assume that you have the assets to test the operations explained throughout this book; in case you don't, you can download the contents available on Packt Publishing website.

When importing models from a 3D software into Unity, there are several settings to be defined: scales, source materials and textures, rigging and animations, and many others. We will discuss the most important setting soon.

For the importing process to be fully successful, it is also important that the scene in the 3D editor is properly set. When modeling stuff with a 3D editor for a 3D engine, it is important that scales, lights (if available), and cameras match between the scenes, or your models won't fit the game levels properly.

For the recipes of this chapter, we decided to pick Maya as our reference 3D editor. We do not mean that Maya is the best software, but there are plenty of reasons for this choice. Native Maya files are supported by Unity, and the LT version of Maya allows you to perform "one-click-exporting" of Maya scenes directly into Unity (http://videos.autodesk.com/zencoder/content/dam/autodesk/www/products/autodesk-maya-lt/video/send-to-unity-fbx-export-video-1280x720.mp4).

Maya is also an industry standard for 3D artists, and it is supported by both Windows and OS X (while 3D Studio Max, for example, isn't). You can check out 3D forums to delve into the differences between 3D software. The following is a list of very popular forums to begin with:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.137.117