Hi,
i try to create new palleted npc animation, the pallete is same as for character animations in BG2:EE.
I ran into several problems:
1. Resizing (resampling, downsampling, to make it smaller) animation gives very poor results, same with NearInfinity, Photoshop, or other tools if Nearest Neighbor algorithm is used.
2. When i used bicubic algorithm i got much better results but this method will change colors of pixels which are restricted by pallete, so when resized image is palleted again pixel colors are messed, eg, Hair color pixels appears somewhere at body skin (colors [15,A-H] on picture), or on Minor color clothes of npc (colors [15,I-P] on picture).
I render animation from 3DSmax with turned OFF Antialiasing and Filter Maps so i get exactly same colors as are in the pallete. Exported NPC is same size as the palleted texture, so high of npc and texture is 1:1, note: the texture is already palleted with same colors which are required for palleted characters.
NPC is resized from 106x224px to 38x80px.
3. Palleted animations in BG2:EE use some colors from pallete which are used for both colors eg. "Minor" and "Skin" colors, when we move color customization slider in the game. Color pixels will change if first or second slider is moved (1 color belongs to two sliders, or two sliders use same color...), these colors are used for smoothing, transitions between colors (256 colors, 8-bit images supports Nearest Neighbor algorithm only). I do not know how they got these transition colors to correct place (doing it manually with pencil.., 1000 slides that would take long time...fuh).
Following table shows other colors which are not connected to any slider, first row is color in the pallete an second row, how are colors displayed in the game.
Also IE animation are not perfect eg. CHMB1G17.bam, eyes lulz
//edit: Updated Color table for Armor, Leather, Metal
Edited by Gamemacik, 10 June 2020 - 02:42 AM.