If a brush used multiple materials, it is possible for the .obj file to switch back and forth between the materials multiple times. For optimization, it would be nice to sort the faces so that only one usemtl needs to be used per material per object.
For example:
usemtl tools/toolsnodraw
f 1/1 2/2 3/3 4/4
usemtl tools/toolstrigger
f 5/5 6/6 7/7 8/8
usemtl tools/toolsnodraw
f 9/9 10/10 11/11 12/12
could be optimized to:
usemtl tools/toolsnodraw
f 1/1 2/2 3/3 4/4
f 9/9 10/10 11/11 12/12
usemtl tools/toolstrigger
f 5/5 6/6 7/7 8/8
If a brush used multiple materials, it is possible for the .obj file to switch back and forth between the materials multiple times. For optimization, it would be nice to sort the faces so that only one
usemtl
needs to be used per material per object.For example:
could be optimized to: