Add GenerateRandomMaterial functionality, and extend the parameters of GenerateSegmentedRectangle with segmentation numbers along x and y axis.