8bit sprite import colour issue

Started by arj0n, Thu 06/10/2022 15:37:25

Previous topic - Next topic

arj0n

I'm not sure if this is related to me having switched to v3.5.1.21, but I'm sure it did work correct before:
When I import a sprite into my 8bit project, the result is wrong if the first left pixel isn't black (0,0,0).

My question: Am I doing something wrong and if so how to do this the correct way, or is this somehow a bug?

Project specs:
colour depth: 8-bit colour
resolution: 320 x 240
preferences > remap palette of room bgs into all. bg palette slots: no
Repro:
import 8-bit sprite with:
- ImportAlphaChannel: no

and any combination of RemapToGamePalette & RemapToRoomPalette:
- RemapToGamePalette yes, RemapToRoomPalette: yes
- RemapToGamePalette yes, RemapToRoomPalette: no
- RemapToGamePalette no, RemapToRoomPalette: yes
- RemapToGamePalette no, RemapToRoomPalette: no

result: left and top border section of the sprite is imported as black in stead of white


1 Colour settings:
0-4 is the exact same set colors as 32-35
0-4 = Background, 32-35 = Gamewide
any other slots are black (0,0,0) and Background


2 Import:
the to be imported sprite has a white (252,252,252) left and top edge and a blue lower left- and right area as to be imported as transparent


3 After importing:
the white left and top edge are imported as black


4 Imported sprite is imported wrong:
the left-hand sprite is the wrongly imported sprite
if a sprite does have a black pixel at the topleft it imports correctly, see the right-hand sprite, which is different as it has a 1-pixel wide black left edge.


Crimson Wizard

Quote from: arj0n on Thu 06/10/2022 15:37:25I'm not sure if this is related to me having switched to v3.5.1.21, but I'm sure it did work correct before

Please also clarify, what did you switch from?

arj0n

#2
not 100% sure but iirc i switched from v3.5.1.11

EDIT
loaded a backup of the project into v3.5.1.21 and it said it was made in v3.5.0.27.

arj0n

#3
Installed v3.5.0.27 and loaded a backup of the project, but having the same importing colour issue...

Crimson Wizard

So, this basically stops working correctly when moving from 3.5.0 to 3.5.1?

Note that I haven't yet looked into the issue, only want to gather more details about possible regression.

arj0n

My project had many sprites imported correctly around 2020, it looks like that was done in v3.5.0.27.
But now, using indeed v3.5.1 it doesn't.

But after reloading a backup of the project into v3.0.5.27 i tried to import the same sprite and now it doesn't import correctly in v3.5.0.27 too...

arj0n

#6
Here's a zip of a 8-bit project with the same settings and colours-setup as my 8bit project: 8bit-test_(ags_v3.5.1.21).zip

The project folder (8bit-test) has an extra  subfolder called Sprite which contain 2 sprites:
1_no_black_left_imports_wrong.png
+
2_black_left_imports_correct.png

The 1st sprite should import correctly, but I can't seem to get it to import correctly
The 2nd sprite does import correctly, because there's a black border at the left-hand side of the sprite. (But I don't want all sprites in my project to have a black pixel at their leftside)

Maybe someone knows a way to import sprite nr1 correctly into the given project?

eri0o

The left arrow sprite, looking only at screenshots....

It has correctly mapped the transparent color as bottom left. The arrow itself looks like the shadow and white inside have reversed. As is the whole white and black of that sprite.

Is the palette of the game and the sprite in the same indexes? (Note: I never used the 8bit mode of AGS, so just guessing)

arj0n

#8
The sprite colours (except for the blue colour which marks transparency for ags) are the exact same as the ags colour slots, so no mismatch there...

You can check the zip which contains the sprite in the subfolder named Sprite. It's the first of the 2 sprites: 8bit-test_(ags_v3.5.1.21).zip

SMF spam blocked by CleanTalk