01-03-2019, 09:32 PM
(This post was last modified: 01-03-2019, 09:35 PM by trainboy2019.)
(01-03-2019, 01:17 PM)ninetalescommander Wrote:(01-03-2019, 12:50 PM)trainboy2019 Wrote: I'm working on corrin atm
I'm not asking this to deter you from working on Corrin but is it worth doing characters that already have a model elsewhere?
Corrin (Both Genders) are in Fire Emblem Warriors and since those models were ripped by Kuro and, in my opinion, look a lot better, wouldn't it be better to do characters that either don't have a model or have an out-of-date model?
Already got all the models and textures converted.
I also made a python script to split the textures and create the proper normal map.
Code:
from PIL import Image
import sys
import os
def splitImg(file):
img = Image.open(file)
data = img.getdata()
try:
r = [(d[0], d[0], d[0], 255) for d in data]
g = [(d[1], d[1], d[1], 255) for d in data]
b = [(d[2], d[2], d[2], 255) for d in data]
rgb = [(d[0], d[1], d[2], 255) for d in data]
alpha = img.split()[-1]
bg = Image.new("RGBA", img.size, (0,0,0,255))
bg.paste(alpha, mask=alpha)
bg.convert('L').convert('P', palette=Image.ADAPTIVE, colors=8).save(file+'a.png',optimize=True)
img.putdata(r)
img.save(file+'r.png')
img.putdata(g)
img.save(file+'g.png')
img.putdata(b)
img.save(file+'b.png')
img.putdata(rgb)
img.save(file+'rgb.png')
except:
print(file)
def splitImgNorm(file):
img = Image.open(file)
data = img.getdata()
# Suppress specific bands (e.g. (255, 120, 65) -> (0, 120, 0) for g)
try:
rgb = [(d[0], d[1], 255, 255) for d in data]
img.putdata(rgb)
img.save(file+'converted.png')
except:
print(file)
filepath="DIRECTORY\\GOES\\HERE"
for file in os.listdir(filepath):
if file.endswith(".png"):
splitImg(os.path.join(filepath, file))
for file in os.listdir(filepath):
if file.endswith("nor.pngrgb.png"):
splitImgNorm(os.path.join(filepath, file))