Asset-Frameworker/Tickets/ISSUE-013-merged-map-roughness-stats.md
2025-04-29 18:26:13 +02:00

30 lines
1.9 KiB
Markdown

---
ID: ISSUE-013
Type: Issue
Status: Backlog
Priority: Medium
Labels: [core, bug, refactor, image processing]
Created: 2025-04-22
Updated: 2025-04-22
Related: #REFACTOR-001-merge-from-source
---
# [ISSUE-013]: Image statistics calculation missing for roughness maps after merged map refactor
## Description
Following the recent refactor of the merged map processing logic, the calculation of image statistics (Min/Max/Mean) for roughness maps appears to have been omitted or broken. This data is valuable for quality control and metadata, and needs to be reimplemented for roughness maps, particularly when they are part of a merged texture like NRMRGH.
## Current Behavior
Image statistics (Min/Max/Mean) are not being calculated or stored for roughness maps after the merged map refactor.
## Desired Behavior / Goals
Reimplement the image statistics calculation for roughness maps. Ensure that statistics are calculated correctly for standalone roughness maps and for roughness data when it is part of a merged map (e.g., the green channel in an NRMRGH map). The calculated statistics should be included in the `metadata.json` file for the asset.
## Implementation Notes (Optional)
Review the changes made during the merged map refactor (`REFACTOR-001-merge-from-source`). Identify where the image statistics calculation for roughness maps was previously handled and integrate it into the new merged map processing flow. Special consideration may be needed to extract the correct channel (green for NRMRGH) for calculation. The `_process_maps` and `_merge_maps` methods in `asset_processor.py` are likely relevant areas.
## Acceptance Criteria (Optional)
* [ ] Process an asset that includes a roughness map (standalone or as part of a merged map).
* [ ] Verify that Min/Max/Mean statistics for the roughness data are calculated.
* [ ] Confirm that the calculated roughness statistics are present and correct in the output `metadata.json` file.