(c) copyright Zehne Ziba Co., Ltd. For more information, please refer to copyright notice.
This tutorial will help you assign multiple, distinct materials to a single geometry in 3ds Max, export the geometry to COLLADA format, and select the geometry based on its materials in editor of Vanda Engine.
1. Run 3ds Max and create 2 small box and sphere primitives from the Create > Geometry tab.
2. Select the box, right click the box and convert it to an Editable Poly.
3. Select the sphere, right click the sphere and convert it to an Editable Poly.
4. Select Cube geometry, click the Modify tab, click the Polygon icon and select all faces of cube.
5. Scroll Down to the Polygon: Material IDs tab, set the number to 1 and press Enter. This number will identify the cube geometry.
6. Select the Create tab to exit from the Modify state. Repeat steps 4 and 5 for the sphere, but this time set the ID to 2.
7. Now we merge the cube and sphere geometries so they become one geometry. With all polygons of sphere still selected, click the Attach button, then select the cube geometry. Click the Create tab to exit from the Modify State.
8. Now we will create a Multi/Sub-Object material and apply it to our geometry which has already been assigned material ID’s. First of all, make sure that our geometry is selected, then open the Slate Material Editor by pressing M on the keyboard. Right click anywhere in View1, and choose Standard from Materials.
9. Double click on standard material. First of all, change name to Cube-Material. Then click the Diffuse box and select a solid green color.
10. Repeat steps 8 and 9 to create another standard material called Sphere-Material beneath the previous standard material and choose a solid red color for its diffuse channel.
11. Right click somewhere one the right side of standard materials and choose Standard – Multi/Sub-Object from Materials.
12. Double click on the Multi/Sub-Object material to open the Basic Parameters. As you can see there are 10 sub materials, we only need 2 for our geometry (one for sphere, one for cube), so go to Set Number, press, and set the number of materials to 2.
13. Connect the output of Cube standard material to the first entry of Multi/Sub-Object node.
14. Connect the output of Sphere standard material to the second entry of Multi/Sub-Object node.
15. Select Multi/Sub-Object node and from the main menu of Slate Material Editor, choose Material | Assign Material to Selection. This will assign the material to our selected geometry. Close the Slate Material Editor.
16. Export the scene to COLLADA format as describe in tutorial 1.
17. Run Vanda Engine Editor. Make sure that you are in Prefab mode (Mode | Prefab). Moreover, add a “_LOD1” post-fix to your dae file name (for example multi_mat_LOD1.dae). From the main menu, choose File | Import | External Scenes…. Locate your exported DAE file and choose Open. Left click on cube or sphere to select them. As you see, both of them are selected, meaning that they are one geometry.
18. Now we will switch to material based selection. From the main menu, go to Modify | Geometry | Geometry Based Selection. This will uncheck the geometry based selection and activates material based selection. Now select the cube object. As you see, only the cube geometry is selected and in lower left corner of Editor, you see the name of Cube material. If you select the sphere, only the sphere is selected. From there, you can edit the properties of sphere or cube including their textures.
Let’s stay in touch!
Never miss a single tutorial, sign up for our monthly newsletter. You can unsubscribe at any time if you wish to stop receiving email newsletters from vandaengine.org