Game Development Reference
In-Depth Information
4. Once the model exports, copy this FBX file and the zombie's
texture files into the Models folder in the Assets directory of your
Unity project.
5. Open your Unity file. The zombie FBX file should be where you
copied it. Click it once in the project view to bring up the FBX
Importer in the Inspector view (Figure 10.3). This is your inter-
face for controlling how the model is brought into Unity.
6. Unity often imports these models by default at a scale factor of
.01. To adjust this, drag the zombie from the Project view into the
Scene view in a place near your First Person Controller. Run the
game and try different scales to determine what you should enter
as the Scale Factor value in the FBX importer. Click the Apply
button every time you change this value.
Other options in the FBX importer include ones for normals and tan-
gents, as well as options for generating colliders on your objects.
Unity may not have imported your materials correctly or prop-
erly linked its textures to your zombie. Here's how to adjust these
properties:
1. In the Hierarchy view, find the zombie object and open its hier-
archy. Select the actual mesh object, which will have a component
for the mesh's material in the Inspector window (Figure 10.4). This
will likely be a plain Diffuse material.
2. Use the drop-down at the top of the Material component to
select the Bumped Diffuse shader. Drag your zombie's color
map from its folder in the Project view to the Base (RGB) image
panel.
3. Do the same to the normal map, placing it in the Normalmap
panel.
4. Unity may tell you that the normal map has not been designated
as a normal map yet. Click the Fix button and the program will
take care of this automatically.
5. Select the head/eye mesh and make the eyes glow by add-
ing the Self-Illuminated b Specular shader and the EyeEmit
texture.
6. Once the zombie's material is right, go back to the FBX importer
by clicking on the FBX file in the Project view and scroll down to
the Animation List panel under the Split Animations option.
Figure 10.3
Unity's FBX importer
Figure 10.4
Editing the zombie material so it has a
color and normal map
 
Search WWH ::




Custom Search