Bug 1220 - Incorrect auto-mixing of multi-material maps
Summary: Incorrect auto-mixing of multi-material maps
Alias: None
Product: DIRSIG4
Classification: Unclassified
Component: Materials/Radiometry (show other bugs)
Version: 4.7.0-release
Hardware: Other Other
: P5 normal
Assignee: Adam Goodenough
Depends on:
Reported: 2016-05-17 10:46 EDT by Adam Goodenough
Modified: 2016-09-29 10:53 EDT (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Adam Goodenough 2016-05-17 10:46:47 EDT
The auto-mixing option to the material map (mixing="true") is intended to do a (quantized) mixing of the two closest materials in the map based on the relative digital count spacing if a given DC is not included in the LUT. This works for two materials, but multiple materials are ignored.

This bug can be demonstrated with the MaterialMap1 demo by swapping the two middle entries on the LUT -- the gradient should change to linearly decrease from the left, increase from the right and meet up in the middle -- it does not.
Comment 1 Adam Goodenough 2016-05-17 10:48:03 EDT
This was tracked to a typo in the mechanism used to track the DC distance to the nearest defined material. Instead of using the index tracking the next material, the previous index was being used instead.