[posila] [0.16.51] Graphics with 16bit color channels not displayed on OSX

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Boardy
Inserter
Inserter
Posts: 26
Joined: Wed Aug 17, 2016 6:18 am
Contact:

[posila] [0.16.51] Graphics with 16bit color channels not displayed on OSX

Post by Boardy »

In my latest playthrough with a friend of mine we use the NPUtils mod. Both of us didn't see some graphics from this mod. After reporting this in the mod's forum thread with a screenshot of the entities from his mod, the creator replied with a screenshot of his own, showing all items.

After doing some digging through the graphics inside the mod, it turned out that the .pngs we couldn't see all had 16b color channels. After converting them and trying out my custom version of the mod, the missing graphics were finally displayed (except in the tech tree, but those images were probably in a location I didn't convert).

Should factorio check this and convert the pngs -- each time the mods are loaded, sounds lengthy -- to images with 8bit color channels? Or is this intended and should the mod creators make sure they create correct pngs (making the mod smaller in the process)? I can imagine it would help modders if they would at least get a message that some images might not be displayed because of this.

The NPUtils mod is not the only mod showing this behaviour. E.g., also some Angel's mods appear to have missing buildings.

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.16.51] Graphics with 16bit color channels not displayed on OSX

Post by TruePikachu »

I'm of the belief that 32bpp (rgba8) is sufficient for a game like Factorio. And since mods need to be tailored to be compatible with the game anyway (by using the proper `.lua` files, for instance), I'd be perfectly happy for this to resolve towards mod authors needing to make sure things are set up correctly.

There's also the question of why the graphics aren't showing up at all, but nothing about that can be answered without a log file (which could include some PNG loading error messages, and would include stuff like the actual color depth in use on the system).

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [0.16.51] Graphics with 16bit color channels not displayed on OSX

Post by Arch666Angel »

I have run into this issue before as well. It apparently only affects MAC user, dont know why. I'm since then trying to avoid rendering stuff in anything more than 8 bit colors.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.16.51] Graphics with 16bit color channels not displayed on OSX

Post by posila »

Thanks for the report.
The problem is, we use OS-specific graphics libraries on Windows and macOS (GDI+ on Windows, NSImage from AppKit on macOS) to load image files, and while GDI always converts image to 32bit RGBA, NSImage loads it in whatever bitdepth the image was saved and we do conversion to RGBA ourselves. And we don't handle non 8bit-per-channel images properly there.
Frankly, even though sprites in 16bits-per-channel formats needlessly take up more space on disk, and load slower. It is just easier to fix the conversion.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [posila] [0.16.51] Graphics with 16bit color channels not displayed on OSX

Post by posila »

Fixed for 0.17
Thanks for the report.

Post Reply

Return to “Resolved Problems and Bugs”