Importing a mesh with multiple textures from Blender

From C4 Engine Wiki

Jump to: navigation, search

This tutorial assumes you know how to unwrap meshes in Blender and assign different textures to different parts of the mesh. It also assumes that the textures you want to use are already imported into C4. You may want to read the Blender wiki page on Multiple Materials, but it shouldn't be necessary for this tutorial.


Here you can see I have a basic cube. I unwrapped it and applied a brick texture to each side and grass to the top. If you export the DAE from Blender at this point, when you hit "Clean" in the material manager C4 will create a material for each texture. However, you won't be able to apply different textures to the same mesh. To do this, we need to assign Materials (in Blender) to each face.

Image:Blender multi 01.jpg

Go in to edit mode, and select the first group of faces (for me, this is just the top of the cube)

Image:blender multi 02.jpg

Then, in the "Link and Materials" tab, create a new material by clicking the "New" button under where it says 0 Mat 0. This will create a new material. The material index should now say "1 Mat 1". Click "Assign" to assign new material to the selected face.

If you want, you can assign your texture to the new material in Blender. This will allow you to render your models in Blender with their textures you assigned in the UV map. However, this isn't strictly necessary to get the mesh to work in C4.

Image:blender multi 03.jpg

Continue this face select/material assign process for all the different face groups you have. For my mesh, I only have one more face group. I select that group, click the "New" button to make a new material, and "Assign" the material to the new faces. Make sure that you don't have any unwanted faces selected.

Image:blender multi 04.jpg

Once you have assigned unique material for each face group, you can export your model to C4. Note that if you use Blender's Collada exporter, you need to edit the DAE file and change the unit tag to

<unit meter="1" name="meter"/>

Now you can import your model into C4. When you hit the "Clean" button in the material manager, it should create a material for each texture you applied in the UV editor. Make sure to select the correct texture for each material if it is not already. Your textures should now show up correctly on your mesh.

Image:blender multi 05.jpg

You can also use the "Mesh Tool" in C4 to select the group faces, so you can easily change the materials later on if you want.

Personal tools