The tyMaterial modifier can be used to assign material IDs to mesh faces in ways that aren’t possible using native modifiers.
Element ID to mat ID: when selected, assigns a face’s element ID (the ID of the mesh element the face belongs to) as its material ID.
Spline ID to mat ID: when selected, assigns a subspline’s index (the index of the subspline in the overall spline shape) as its material ID.