Processing-Engine - Gloss > Rough conversion

This commit is contained in:
2025-05-06 20:58:01 +02:00
parent 9a27d23a4c
commit ddb5a43a21
2 changed files with 85 additions and 40 deletions

View File

@@ -33,7 +33,11 @@ The pipeline steps are:
6. **Map Processing (`_process_maps`)**:
* Iterates through files classified as maps in the `SourceRule`.
* Loads images (`cv2.imread`).
* Handles Glossiness-to-Roughness inversion.
* **Glossiness-to-Roughness Inversion**:
* The system identifies a map as a gloss map if its input filename contains "MAP_GLOSS" (case-insensitive).
* If such a map is intended to become a roughness map (e.g., its `item_type` or `item_type_override` in the `SourceRule` effectively designates it as roughness), its colors are inverted.
* After inversion, the map is treated as a "MAP_ROUGH" type for subsequent processing steps.
* This filename-driven approach is the primary mechanism for triggering gloss-to-roughness inversion, replacing reliance on older contextual flags (like `file_rule.is_gloss_source`) or general `gloss_map_identifiers` from the configuration for this specific transformation within the processing engine.
* Resizes images based on `Configuration`.
* Determines output bit depth and format based on `Configuration` and `SourceRule`.
* Converts data types and saves images (`cv2.imwrite`).