[posila] [0.17.72] Low quality texture compression issue

This subforum contains all the issues which we already resolved.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

[posila] [0.17.72] Low quality texture compression issue

Post by Deadlock989 »

Wondered about reporting this as a bug but not 100% certain the issue isn't at my end.

Have fielded multiple reports of a single sprite being garbled. The glitches only occur when "Texture compression: Low quality" is enabled in Factorio graphics settings. High quality compression or zero compression do not produce the artifacts. The entity uses a non-animated base sprite and an animated working visualisation in additive render mode, I'm assuming it's the working visualisation that's garbled because the garbling changes per frame. There is nothing different as far as I know about the method used to produce these sprites, I used exactly the same methods on at least 10 other entities which all work well in low quality compression mode, although none of them are this size (320x384 per frame). The resulting sprite sheet is therefore large (3200x2304), 60 frames in 32-bit colour, although a fair amount of the sheet is transparent space which is trimmed away by Factorio - however there is one other entity in the mod which is even larger and uses the same additive render method with no artifacts produced, although in that case it's not a working visualisation, it's a lab with on_animation and off_animation. The file is compressed to maximum lossless compression with PNGOpt, same as every other sprite in the mod.

If anyone has any insight, please let me know.
Attachments
low-quality-compression.png
low-quality-compression.png (341.1 KiB) Viewed 4481 times
high-quality-compression.png
high-quality-compression.png (511.63 KiB) Viewed 4481 times
posila
Factorio Staff
Factorio Staff
Posts: 5349
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.17.72] Low quality texture compression issue

Post by posila »

It's a bug (probably too large numerical error somewhere) in GPU-accelerated texture compression code path for low-quality compression. It seems to show up in regions that have extreme color values ({255,0,0}, {255,0,255}, ...) but are not white (I guess white doesn't compress corectly either).

I noticed it recently while working on something else and planned to look into it. Since now I know it has been observed also in the wild, I'll try to fix it ASAP.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: [0.17.72] Low quality texture compression issue

Post by Deadlock989 »

Have just discovered the same issue with the other large entity, a lab, which does not use an additive mode render layer, but a single-layer normal render mode on_animation and off_animation.

Again, the garbling is at the very brightest part of the sprite (in the centre of the orb).
Attachments
low-quality-compression.png
low-quality-compression.png (735.71 KiB) Viewed 4472 times
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: [0.17.72] Low quality texture compression issue

Post by Deadlock989 »

posila wrote: Wed Oct 23, 2019 11:53 am It's a bug (probably too large numerical error somewhere) in GPU-accelerated texture compression code path for low-quality compression. It seems to show up in regions that have extreme color values ({255,0,0}, {255,0,255}, ...) but are not white.

I noticed it recently while working on something else and planned to look into it. Since now I know it has been observed also in the wild, I'll try to fix it ASAP.
Oh great, thanks. I wasn't certain I hadn't exceeded some limit that shouldn't have been exceeded. It's odd that it doesn't seem to happen with a number of other entities which are smaller than 5x5.
User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 3091
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: [posila] [0.17.72] Low quality texture compression issue

Post by BlueTemplar »

Congratz, you broke physics with your mad science projects :
https://www.youtube.com/watch?v=vB46XpnwhrA
BobDiggity (mod-scenario-pack)
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [posila] [0.17.72] Low quality texture compression issue

Post by eradicator »

That looks like the same thing that happens to my biter spawns after the biter changes broke find_non_colliding_position.

Code: Select all

/sudo god() spawn('small-biter',100)
100-small-biters.png
100-small-biters.png (44.79 KiB) Viewed 4446 times
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
posila
Factorio Staff
Factorio Staff
Posts: 5349
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [posila] [0.17.72] Low quality texture compression issue

Post by posila »

It's fixed for 0.17.73. Thanks for the report.

@eradicator: that's something else :)
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: [posila] [0.17.72] Low quality texture compression issue

Post by Deadlock989 »

posila wrote: Wed Oct 23, 2019 1:11 pm It's fixed for 0.17.73. Thanks for the report.
Nice one, thank you.
User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 3091
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: [posila] [0.17.72] Low quality texture compression issue

Post by BlueTemplar »

They're evolving and trying to break free from the simulation ! :o
BobDiggity (mod-scenario-pack)
User avatar
Dev-iL
Filter Inserter
Filter Inserter
Posts: 304
Joined: Thu Jul 02, 2015 2:48 pm
Contact:

Re: [posila] [0.17.72] Low quality texture compression issue

Post by Dev-iL »

Deadlock989 wrote: Wed Oct 23, 2019 1:40 pm
posila wrote: Wed Oct 23, 2019 1:11 pm It's fixed for 0.17.73. Thanks for the report.
Nice one, thank you.
Thanks for the report and the fix!
Leading Hebrew translator of Factorio.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [posila] [0.17.72] Low quality texture compression issue

Post by eradicator »

posila wrote: Wed Oct 23, 2019 1:11 pm It's fixed for 0.17.73. Thanks for the report.

@eradicator: that's something else :)
Well then, i made a new thread for it: viewtopic.php?f=7&t=77134
Feel free to bash my igpu as usual :p.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Post Reply

Return to “Resolved Problems and Bugs”