COMPLETE REFERENCE LIBRARY + AUTO BACKGROUND REMOVAL - Added 4 Nomad Raider types (Desert Frost Jungle Tech) - Added 3 Magic Helpers (Troll Fairy Elf) - Created automated background removal system - Processed 24 images with transparent backgrounds - Updated ROADMAP with Visual Cleanup complete - Total 24 master references ready for production

This commit is contained in:
2026-01-05 12:01:53 +01:00
parent d93ba6fd6e
commit 1221e78492
33 changed files with 85 additions and 1 deletions

View File

@@ -154,7 +154,9 @@
| Kategorija | Naloga | Prioriteta | Status |
|------------|--------|------------|--------|
| **Asset Browser** | Visual gallery for all assets | ⭐⭐⭐⭐⭐ | ✅ Complete |
| **Reference Folder** | Master references (/references/) | ⭐⭐⭐⭐⭐ | 🟡 Partial (Ivan done) |
| **Reference Folder** | Master references (/references/) | ⭐⭐⭐⭐⭐ | ✅ Complete (24 references) |
| **Background Removal** | Auto-remove green backgrounds (transparent) | ⭐⭐⭐⭐⭐ | ✅ Complete (24 images processed) |
| **Auto-Clean System** | Automated background removal script | ⭐⭐⭐⭐ | ✅ Complete (scripts/remove_backgrounds.py) |
| **Map Cleanup** | Remove all status dots from maps | ⭐⭐⭐ | 🔴 Not started |
| **Force Render** | Ensure all new buildings/NPCs visible | ⭐⭐⭐⭐ | 🔴 Not started |

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 962 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 994 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1007 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@@ -0,0 +1,82 @@
#!/usr/bin/env python3
"""
AUTOMATIC BACKGROUND REMOVAL SYSTEM
Removes green backgrounds from all reference images and makes them transparent.
Uses color-based removal (green #00FF00 background).
"""
import os
from PIL import Image
import numpy as np
def remove_green_background(input_path, output_path):
"""
Remove green (#00FF00) background and make transparent.
"""
print(f"Processing: {input_path}")
# Open image
img = Image.open(input_path).convert("RGBA")
data = np.array(img)
# Get RGB channels
r, g, b, a = data.T
# Define green background color range (accounting for compression artifacts)
# Pure green is #00FF00 (0, 255, 0)
green_threshold = 200 # Flexibility for compression
# Find green pixels
green_areas = (g > green_threshold) & (r < 100) & (b < 100)
# Make green pixels transparent
data[..., 3][green_areas.T] = 0
# Save with transparency
result = Image.fromarray(data)
result.save(output_path, 'PNG')
print(f"✅ Saved: {output_path}")
def process_references_folder(references_path):
"""
Process all PNG/JPG images in references folder recursively.
"""
processed_count = 0
for root, dirs, files in os.walk(references_path):
for file in files:
# Only process image files
if file.lower().endswith(('.png', '.jpg', '.jpeg')):
input_path = os.path.join(root, file)
# Skip if already processed (has '_nobg' in name)
if '_nobg' in file:
continue
# Create output path (same location, add _nobg suffix)
base_name = os.path.splitext(file)[0]
output_path = os.path.join(root, f"{base_name}_nobg.png")
try:
remove_green_background(input_path, output_path)
processed_count += 1
except Exception as e:
print(f"❌ Error processing {input_path}: {e}")
return processed_count
if __name__ == "__main__":
references_path = os.path.join(os.path.dirname(__file__), '..', 'references')
print("=" * 60)
print("🎨 AUTOMATIC BACKGROUND REMOVAL")
print("=" * 60)
print(f"Processing folder: {references_path}")
print()
count = process_references_folder(references_path)
print()
print("=" * 60)
print(f"✅ COMPLETE! Processed {count} images")
print("=" * 60)