3D Models - UO-DFM/SimCityOttawa-Documentation GitHub Wiki

Overview

All 3D models for Sim City Ottawa were developed using Blender.

Exporting

Exporting Models + Animations: https://www.youtube.com/watch?v=Bl2xBW-L7uU&ab_channel=Imphenzia

All 3D models should be exported as a .FBX file from Blender into the Unity project under a Assets/Art/Models/<model_name>/ folder.

Using the Models in Unity

Each 3D model should have an associated prefab in the Assets/Prefabs folder and the prefab should be used to add the model to the different scenes.

The model should not be loaded directly into a scene.

Model Behaviour

Some models may require some behaviour which requires a script to control their behavior. The script will be considered a model controller script and should be found under Assets/Scripts/Controllers/<name_of_model>Controller.cs. The controller script can then be applied as a component on the top-level model game object in the prefab that represents the model.

Animations

Exporting Models + Animations: https://www.youtube.com/watch?v=Bl2xBW-L7uU&ab_channel=Imphenzia

Some models may have some animations associated with them. To use the animations, the model within the prefab requires an Animator component which requires a controller and avatar. The Animator controller for the model should be created as Assets/Art/Models/<name_of_model>/<name_of_model>.controller. The avatar gets generated from the .fbx file and is stored within the .fbx file. See the resource above for details on how to set this up.

File Structure

Assets/
  -- Art/
     -- Models/
        -- <name_of_model>/
           -- name_of_model.fbx
           -- name_of_model.controller (for animated models)
  -- Prefabs/
        -- <name_of_model>.prefab
  -- Scripts/
     -- Controllers/
        -- <name_of_model>Controller.cs (for models with behaviour)

Example

Assets/
  -- Art/
     -- Models/
        -- Character/
           -- Character.fbx
           -- Character.controller
  -- Prefabs/
        -- Character.prefab
  -- Scripts/
     -- Controllers/
        -- CharacterController.cs
⚠️ **GitHub.com Fallback** ⚠️