The DIRSIG5 Material Index truth collector reports a Material Index which has a value of 1 less than the expected value compared to (1) material_report.txt and (2) truth output when running DIRSIG4.
For example, when running my version of Megascene1 the file material_report.txt and DIRSIG4 Material Index truth collector assigns a material index of 82 for glass. However, DIRSIG5 Material Index truth collector shows a Material Index of 81 for glass, even though the DIRSIG5 generated material_report.txt still shows it having an index of 82. All materials in the DIRSIG5 generated Material Index truth collector are offset by a value of 1 from the generated material_report.txt output and DIRSIG4 truth material index truth output.
This was (probably) a conscious choice to have the indexes match up with those in the scene hdf (in the OpticalPropertiesTable, which is zero-based) rather than the one-based indexing in d4 (zero is a reserved index that is used or null materials).
Since users are more likely to care about the material report right now, we have gone ahead and shifted the output indexes to match up to the material report. However, we've also made sure that all the mapped materials are in the d5 truth, both the parent (in the top id) and the actual curves being used (in the variant id). Materials not found in the material report can be looked up in the HDF (after subtracting one from the index).
This may change again in the future if we decide to stick to the hdf indexing.