Too many materials?

Mapping support for the Source engine.
User avatar
Posts: 3

Too many materials?

Post by Addbue » 18 Jun 2017, 15:15

Hello all! Long time no see,
I am struggling with a 3D model, and when I attempt to compile it, it has said there are too many materials used. Does anybody know of a fast way to fix this error? Would removing parts of the model and adding them as body groups work? Or is there someway I can merge materials? There are not many textures, the model is just broken up a bit into materials. I don't know how many there are. I use both Blender and 3ds Max 2018. (Using Wallworm smd import/export script)

Help would be much appreciated! :)

User avatar
Posts: 163

Re: Too many materials?

Post by greenhood » 19 Jun 2017, 08:17

model is just broken up a bit into materials

Maybe thats the problem.

User avatar
Posts: 98

Re: Too many materials?

Post by Rectus » 10 Jul 2017, 10:41

Generally you want to have as few materials and textures as possible, preferably a single one unless you need special effects like transparency.

You can combine materials by baking them to a single set of textures. The way to do this if you have a mesh with multiple materials and textures is to:
1. Make a copy of the mesh
2. U/V map the copy to a single texture space.
3. Bake the textures from the original model to the copy.
4. Export the baked textures, and the mesh copy.

You can also bake things like specular intensity and exponent maps, transparency, and glow from the materials and export those too.

If you have made a high poly model you can use that to bake from instead, with the added bonus of being able to bake normal maps and ambient occlusion as well.

Return to Source SDK