Importing FBX Model
This is the very first introductory article for giving you a quick look on the basics of working with UNIGINE 2. After going through this guide, you will know how to:
- Create a project
- Place an animated 3D object to the world
- Play the imported animation
- Assign materials to the 3D object
Step 1. Create a Project
After downloading and installing the Unigine SDK, launch the SDK browser.
Before starting please ensure that you have the SDK installed. Once you have the required version of the SDK, you can create a new project as follows:
- Open the Projects tab in the SDK browser.
- Click Create New. The new project creation window will be opened.
- Define the name of the project, choose a path to store project files and specify the SDK to be used.
- Click Create New Project. The project will appear in the projects list.
Step 2. Download Assets
To get access to all assets required for accomplishing this tutorial (a 3D model and required textures), in the SDK Browser, go to the Add-Ons tab, find the Tutorials Content add-on and click Install. The folder with assets will be added into the addons folder of the SDK Browser.
Step 3. Import 3D Model
- On the Projects tab of the SDK Browser, click Edit Content under the project name.
- On the Menu bar, choose Import -> FBX File.
- In the file dialog window, go to the <SDK Browser>/addons/tutorials_addon_xx/getting_started folder, select the marine.fbx file and click Ok.
- In the Autodesk FBX Import window that opens, uncheck Import joints and click Ok.
- In the file dialog window that opens, go to the unigine_project/materials folder, choose unigine_project.mat file and click Ok. All the materials required for the imported model will be added to this library.
- Place the imported model in the world. The model will appear in gray.
- Open the Nodes window by pressing N to play the animation: in the nodes hierarchy list, select Marine1, pistol, rifle nodes (by holding Shift) and go to the MeshSkinned tab.
- Here, check Loop and press Play. The model will move according its animation.
Step 4. Assign Materials
- Press Stop to stop the animation.
- Click the body of the model. Its wireframe will be highlighted.
- Press M to open the Materials window. As you can see, the marine_body material is already assigned to the model's body.
- Go to the Textures tab and click Load to specify the required textures:
You will need to return to this folder several times, so in the dialog window add it to the bookmarks (drag the folder left to the Bookmarks section). Next time you will need just to click this folder.
- Albedo: marine_body_alb.png
- Normal: marine_body_n.png
- Metalness: marine_body_met.png
- Fibers: marine_body_f.png
The .meta files will be created in the uncompressed folder for each loaded texture. - Go to the Parameters tab and change the following parameters of the material:
- Albedo set to white
- Metalness set to 1
- Fibers set to 0.75
- Select the bag. Its wireframe will be highlighted.
- Go to the Textures tab and click Load to specify the required textures. All the required textures are available in the <SDK Browser>/addons/tutorials_addon_x.x/getting_started/uncompressed folder (just click the uncompressed bookmark):
- Albedo: marine_bags_alb.png
- Normal: marine_bags_n.png
- Metalness: marine_bags_met.png
- Fibers: marine_bags_f.png
- Go to the Parameters tab and change the following parameters of the material:
- Albedo set to white
- Metalness set to 1
- Fibers set to 0.75
- Select eyes of the model and go to the States tab of the Materials window.
- Here, enable the Emission option to activate the additional emission texture used for eyes.
- Go to the Textures tab and click Load to specify the required textures. All the required textures are available in the <SDK Browser>/addons/tutorials_addon_x.x/getting_started/uncompressed folder (just click the uncompressed bookmark):
- Albedo: marine_eyes_alb.png
- Emission: marine_eyes_e.png
- Go to the Parameters tab and change the following parameters of the material:
- Albedo set to white
- Emission Color set to 090909
- Select the face of the model.
- Go to the Textures tab of the Materials window and click Load to specify the required textures. All the required textures are available in the <SDK Browser>/addons/tutorials_addon_x.x/getting_started/uncompressed folder (just click the uncompressed bookmark):
- Albedo: marine_head_alb.png
- Normal: marine_head_n.png
- Go to the Parameters tab and change the following parameters of the material:
- Albedo set to white
- Select the rifle, go to the Textures tab of the Materials window and click Load to specify the required textures. All the required textures are available in the <SDK Browser>/addons/tutorials_addon_x.x/getting_started/uncompressed folder (just click the uncompressed bookmark):
- Albedo: rifle_alb.png
- Normal: rifle_n.png
- Metalness: rifle_met.png
- Go to the Parameters tab and change the following parameters of the material:
- Albedo set to white
- Metalness set to 1
- Rotate around the model and find pistol attached on the right leg. Select it and perform the same steps as for the rifle: assign textures and change the Albedo parameter to white.
All the required textures are available in the <SDK Browser>/addons/tutorials_addon_x.x/getting_started/uncompressed folder (just click the uncompressed bookmark):
- Albedo: pistol_alb.png
- Normal: pistol_n.png
Done! Your first animated 3D model has been added to Unigine! Now you can play the animation.