This function sets the material for the mesh.
Each mesh can have up to four materials applied. Materials are blended with vertex material weights.