- Home /
multiple materials or one material with texture
Hey,
I as just modelling a car in Blender and as I finished the modelling part I was about to assign the color. So I got to the question if I should assign the colors by the UV/Image editor, which would be an additional texture in the game, or if I should just assign the different colors (as Sketchup does it). The second option makes the object have one material for each color.
So I guess my question is if unity handles gameobject with multiple materials better, then objects with only one material which has a texture assigned.
I hope someone understands my question ;)
Best regards,
Fred
Answer by max98 · Apr 06, 2013 at 12:05 AM
Both the things are possible either you go with multiple material per game object or multiple texture per material. But when it comes to performance i suggest to minimize the material as much you can and use multiple texture per material. http://docs.unity3d.com/Documentation/ScriptReference/Material-mainTexture.html Check this for changing material texture via script.
Answer by DryTear · Apr 05, 2013 at 10:39 PM
Models with Multiple materials cost performance, using only one material per model can save performance. No - unity3d doesnt handle multiple mats on one mesh better than one mat per mesh
ok. but how would a texture on a material affect the performance?
When you have multiple textures, the game needs to grab that texture from the image each frame. The more textures you have (images), the more files it has to grab the texture from. These are called draw calls. You want to get the smallest number you can. If you have all your textures in one file (like $$anonymous$$inecraft), the game can grab different textures from 1 file, but only has to grab 1 file (not 20, or however many textures you have).