- Home /
Materials or UV texture?
Hi! I'm currently make a project involving Rubiks Cube. My Cube ( Like all traditional Rubiks Cube ) have 26 pieces. I'm using 80 materials in totally in the cube. I will gain much more performance if I change all of this to UV textures?
I'm using separate materials for all colors because I need to control transparency in each piece....Thanks!!
Answer by robertbu · Dec 05, 2013 at 04:39 PM
Each material results in a drawcall. Moving to a UV model with drastically increase the number of drawcalls batched together. How much impact this will have depends on your platform and on your shader. It likely will have a noticeable impact on older phones but you likely will see little difference in a desktop app. But that is just a guess.
To get an idea of the performance improvement, create two versions of your project, one the current version, and one where you replace your use of many materials for the sides of the cubes with a single material. It won't look right, but it will give you a good idea of the performance difference.
If the sides of the cubes use color only like the traditional Rubiks Cube, there is an alternate solution. You can use vertex colors and a shader that supperts vertex colors. You can then manipulate the 'colors' array in the mesh to change colors without incurring drawcalls. This will allow you to use the same material for all the different colors.
Your answer
![](https://koobas.hobune.stream/wayback/20220613123509im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Texturing blender models in Unity 2 Answers
Blender UV Material? 1 Answer
A node in a childnode? 1 Answer
Problem applying textures 1 Answer
importing a blender model amd making it look the same 0 Answers