add: preliminary work for bandages shown on amputations

This commit is contained in:
ZioPao
2025-10-12 17:47:45 +02:00
parent be4588fc43
commit 52de7e8b06
50 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<clothingItem>
<m_MaleModel></m_MaleModel>
<m_FemaleModel></m_FemaleModel>
<m_GUID>c99332ec-18fa-4d37-9049-9e6f6f7468e5</m_GUID>
<m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint>
<m_AttachBone></m_AttachBone>
<m_BaseTextures>bodydmg\malebody01_bandages_lower_left_arm</m_BaseTextures>
<m_BaseTextures>Amputations\Bandages\MaleBody01_bandages_lower_left_arm</m_BaseTextures>
<m_BaseTextures>Amputations\Bandages\test</m_BaseTextures>
</clothingItem>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,35 @@
from pathlib import Path
from PIL import Image
import os
input_bodies_path = Path('input/body')
input_bandages_path = Path('input/bandages')
for body_filepath in input_bodies_path.glob('*.png'): # Only PNG files
for bandage_filepath in input_bandages_path.glob('*.png'): # Only PNG files
print(f'Processing {body_filepath.name} with {bandage_filepath.name}...')
base = Image.open(body_filepath)
overlay = Image.open(bandage_filepath)
body_name = body_filepath.stem.replace('MaleBody', 'skin')
if body_name.endswith('a'):
body_name = body_name[:-1] + '_hairy_b'
else:
body_name = body_name + '_b'
result = base.copy()
result.paste(overlay, (0, 0), mask=overlay) # Use overlay as its own mask
if bandage_filepath.stem == 'MaleBody01_bandages_lower_arm':
output_path = 'output/Bandaged/Forearm/'
elif bandage_filepath.stem == 'MaleBody01_bandages_upper_arm':
output_path = 'output/Bandaged/UpperArm/'
elif bandage_filepath.stem == 'MaleBody01_bandages_lower_arm_blood':
output_path = 'output/Bandaged_Bloody/Forearm/'
elif bandage_filepath.stem == 'MaleBody01_bandages_upper_arm_blood':
output_path = 'output/Bandaged_Bloody/UpperArm/'
os.makedirs(output_path, exist_ok=True)
result.save(f'{output_path}/{body_name}.png')