In this tutorial we’ll show you how to assign multiple materials to one object in Blender and export them into Collada format for use in Vanda Engine. Using multiple materials often makes sense in Blender’s workflow, and it’s convenient to be able to export them as is. This can also be used to make different parts of an object have different levels of specularity. Sometimes you may want to select different parts of a single object based on their assigned material, which you can do by disabling Geometry Based Selection in Vanda Engine.
Blender default startup file
Select the cube and press Tab to enter edit mode.
Edit mode
Press Shift-A, select Cube, and use the Translate Manipulator to drag the newly created cube off of the first one.
Adding a cube
Moving the cube using the translate manipulator
In the properties window select the material tab. Click the Diffuse color box and set the color to a red.
Setting the material’s diffuse color to red
Click the plus next to the material list, click new, select only the second cube, and click assign. The second cube should now be a gray. Click the Diffuse color box again and set the color to a blue.
Creating a new material
Assigning the new material to the second cube
Setting the second material’s diffuse color to blue
Press tab to exit edit mode. You should now have a red and a blue cube. They are both one object, if you drag or rotate them they will rotate together.
One object with two materials
Export the model. Be sure to select Use Material Textures. See Tutorial 1 for more information.
Exporting with Use Material Textures selected
Add “_LOD1” post-fix to your dae file, run Vanda Engine, make sure that you are in Prefab mode (Mode | Prefab) and import the model into Vanda Engine.
Our model with two materials in Vanda Engine
When you select the model it will highlight both cubes as one object. Uncheck Modify -> Geometry -> Geometry Based Selection (All Instances).
With Geometry Based Selection on, both cubes are highlighted as one object
Now each object will be selected based on material.
One part of the mesh highlighted based on its material
The Author
Patrick Manhatton (macklehatton@gmail.com)
Patrick is an independent game designer interested in absolutely every aspect of making games. He does a little of everything involved in game development and a lot of conceptual design and 3d modelling. He is currently studying computer science and psychology and hopes work in research using games.
(c) copyright Zehne Ziba Co., Ltd. For more information, please refer to copyright notice.