Bug 1301 - Material ID truth is off by 1 compared to material_report.txt
Summary: Material ID truth is off by 1 compared to material_report.txt
Status: RESOLVED FIXED
Alias: None
Product: DIRSIG5
Classification: Unclassified
Component: BasicPlatform (show other bugs)
Version: 5.0.10
Hardware: Other Other
: P3 normal
Assignee: Adam Goodenough
URL:
Depends on:
Blocks:
 
Reported: 2020-10-07 10:07 EDT by Michael Gartley
Modified: 2020-10-26 10:21 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Gartley 2020-10-07 10:07:29 EDT
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.
Comment 1 Adam Goodenough 2020-10-19 17:21:55 EDT
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.