Mesh voxelization with two colours

Yes, that’s a good approach, too. For each material, extract cells using vtkThreshold filter, get outer surface using vtkGeometryFilter, and fill the image using vtkImageStencil.