https://www.itoosoft.com/tutorials/automatically-use-segment-materials