Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

KickStarter BEAUTIFUL DESOLATION - isometric post-apocalyptic adventure from STASIS developer

Pyke

The Brotherhood
Developer
Joined
Nov 29, 2011
Messages
1,223
Location
South Africa
PNG's have a lot of extraneous data that - when you get rid of it - makes them as small as JPGs but with waaaaaaaaay less artifacts.
I call bullshit on that.

In non codex speak: That seems really implausible. Do you have some numbers to back that up?

For these 3 pictures for example:
cf594a6d51e0cfc095f3008b076f3d95_original.png


ac78b42c306ee525895956c82082800e_original.png


275f8790770013f958a5bbc61a547c4e_original.png

Probably easier to just let you use the software we use. https://www.fnordware.com/superpng/

Just stripping out an alpha channel and meta data can drastically downsize a PNG while keeping the same quality.

There are a few other (probably better) scripts out there, but superPNG plugs right into After Effects which makes my life a lot easier.
 

V_K

Arcane
Joined
Nov 3, 2013
Messages
7,714
Location
at a Nowhere near you
In non codex speak: That seems really implausible. Do you have some numbers to back that up?
Not all compression algorithms are equal, and mostly the older formats are crappier than newer ones. I don't have data for images, but for example for sound you can actually sometimes get smaller files with lossless flac compression than with 320 kbps mp3. Similarly, in video compression x265 codec gives you approximately the same file size at 720p as the x264 would give at 480p.
 

Pyke

The Brotherhood
Developer
Joined
Nov 29, 2011
Messages
1,223
Location
South Africa
WebP is one of my favorites - but its not widely supported, even tho its probably the most widely used format without people realizing it (Facebook photos are all WebP)
 

Syl

Cipher
Joined
Nov 3, 2011
Messages
750
PNG's have a lot of extraneous data that - when you get rid of it - makes them as small as JPGs but with waaaaaaaaay less artifacts.
I call bullshit on that.

In non codex speak: That seems really implausible. Do you have some numbers to back that up?

For these 3 pictures for example:
cf594a6d51e0cfc095f3008b076f3d95_original.png


ac78b42c306ee525895956c82082800e_original.png


275f8790770013f958a5bbc61a547c4e_original.png

Probably easier to just let you use the software we use. https://www.fnordware.com/superpng/

Just stripping out an alpha channel and meta data can drastically downsize a PNG while keeping the same quality.

There are a few other (probably better) scripts out there, but superPNG plugs right into After Effects which makes my life a lot easier.
Thanks for the link.

I mean no offense but I think you have no idea what you're doing here.

I explain: this plugin is not lossless at all, it converts a 24-bit picture into a 8-bit one (from 24 millions colors to 256). That's a massive loss of quality even with "bestest" algo (which it is not since default one in Irfanview is better).
For an original PNG of 500KB:
SuperPNG version is 200KB: wrong colors visible everywhere where there is high contrast.
JPG is 30KB: virtually identical to original for a still image, since it's a movie, 0 loss.

I never used After Effects, but it's either complete shit when it comes to encoding mp4 or you didn't select the correct options.
 

agris

Arcane
Patron
Joined
Apr 16, 2004
Messages
6,924
Syl what if he just stripped the alpha channel, ICC profile and metadata? What kind of space savings does that get you? I don't know enough to evaluate what "Smart Quantization" does, but it appears that it can save a lot of space without producing results as you describe. It looks like a histogram of the colors in the image are generated, and then re-indexed to the smallest bit register (8 bit for example) that can still express them as unique, saving you the space 24 bit -> 8 bit time Y pixels gets you.

Personally, I'm not worried if Pyke and his bro fully understand the CS concepts or not, more that they produce a good result in the end.
 

Pyke

The Brotherhood
Developer
Joined
Nov 29, 2011
Messages
1,223
Location
South Africa
Your probably right - Im just an artist, and honestly most technical talk tends to whoosh over me.
I can show you some numbers of a raw frame I just finished rendering from MAX.

EWVLKtk.png


KjZL2fT.png


The truth is that when rendering an animation the individual frame compression and artifacts aren't 'that' important because motion hides a LOT of errors. Most of the post work I do is to 'degrade' the frame. Motion blur, DOF, particles, 2D camera shake. There is always a trade off between compression quality and size, with motion hiding many of bad things that come with higher compression.
 

Syl

Cipher
Joined
Nov 3, 2011
Messages
750
Your probably right - Im just an artist, and honestly most technical talk tends to whoosh over me.
I can show you some numbers of a raw frame I just finished rendering from MAX.

EWVLKtk.png


KjZL2fT.png


The truth is that when rendering an animation the individual frame compression and artifacts aren't 'that' important because motion hides a LOT of errors. Most of the post work I do is to 'degrade' the frame. Motion blur, DOF, particles, 2D camera shake. There is always a trade off between compression quality and size, with motion hiding many of bad things that come with higher compression.
Thanks, I can work with that.

So the image above is the 2.5MB 24-bit PNG (2nd line). That tells us that there is ~8MB of metadata in the 1st file. What??? That's insane. The only explanation I can come up with is that Adobe stores all the layers there. I'm starting to understand why this plugin seems useful.

The JPG file is compressed with 100% quality. That's overkill. 80% is perfect value, no visible difference, huge size reduction. Result: 200KB.
fzxzB4r.jpg

As for the last PNG, the 256 colors version, Irfanview produced a 1MB file. There is also no visible difference but it's a trick as there isn't any high contrast part. That's still 5 times the size of the JPG above.

So what now? I don't know what your pipeline is, but I'm guessing you will make a mp4 with the individual frames. In that case, the only useful file is the STRIPPED PNG, you can ignore everything else. Final file size will be approx.: Number of frames * 200KB / 10 (30MB/mn, 2GB/h).

As for the SuperPNG plugin, just untick the Quantize box and never look back. This option has no use whatsoever. No modern movie format supports 8-bit color (the encoder will just convert back to 24-bit).

Is that a rendering error on the left above the tree?
 

Bohr

Arcane
Joined
Nov 20, 2012
Messages
1,878
As for the SuperPNG plugin, just untick the Quantize box and never look back. This option has no use whatsoever. No modern movie format supports 8-bit color (the encoder will just convert back to 24-bit).

I must be misunderstanding this part, because aren't SDR 1080p blu-rays 8 bit AVC encoded and HDR 4k discs/streams often 10 bit HEVC, eg if using "HDR10"?
 

Syl

Cipher
Joined
Nov 3, 2011
Messages
750
In non codex speak: That seems really implausible. Do you have some numbers to back that up?
Not all compression algorithms are equal, and mostly the older formats are crappier than newer ones. I don't have data for images, but for example for sound you can actually sometimes get smaller files with lossless flac compression than with 320 kbps mp3. Similarly, in video compression x265 codec gives you approximately the same file size at 720p as the x264 would give at 480p.
A proper sound file analogy would be claiming that a 4kHz raw WAV file in a zip is equivalent to a 44kHz 256kbps mp3. They may have the same size, but I think we can all agree they will not have the same quality.

Syl what if he just stripped the alpha channel, ICC profile and metadata? What kind of space savings does that get you? I don't know enough to evaluate what "Smart Quantization" does, but it appears that it can save a lot of space without producing results as you describe. It looks like a histogram of the colors in the image are generated, and then re-indexed to the smallest bit register (8 bit for example) that can still express them as unique, saving you the space 24 bit -> 8 bit time Y pixels gets you.

Personally, I'm not worried if Pyke and his bro fully understand the CS concepts or not, more that they produce a good result in the end.
Look at the example in your link. That's the kind of image a PNG is designed for. It only has 1000 colors, so reducing that to 256 will not be noticeable.

Here, the screenshots have photographic quality, 50 000 colors per image. Reducing that to 256 (=removing 99.5% of the colors) and expecting same quality than a JPG, a format designed for photos, is just wishful thinking.
 

Syl

Cipher
Joined
Nov 3, 2011
Messages
750
As for the SuperPNG plugin, just untick the Quantize box and never look back. This option has no use whatsoever. No modern movie format supports 8-bit color (the encoder will just convert back to 24-bit).

I must be misunderstanding this part, because aren't SDR 1080p blu-rays 8 bit AVC encoded and HDR 4k discs/streams often 10 bit HEVC, eg if using "HDR10"?
That's 8 bits per sample, that is 8 bits for red, 8 bits for green, 8 bits for blue, hence 24 bits. When I say 8-bit, that's 8 bits for all 3. So 24 16 millions possible values down to 256.

Movies actually don't use RGB values, but a special case of YUV called YV12 that uses 12 bits to encode 3 samples (luminosity, red and blue). Each one can have 256 values since they code for several pixels at a time. Yeah, that's complicated.

Edit: 16 millions, not 24.
 
Last edited:

V_K

Arcane
Joined
Nov 3, 2013
Messages
7,714
Location
at a Nowhere near you
A proper sound file analogy would be claiming that a 4kHz raw WAV file in a zip is equivalent to a 44kHz 256kbps mp3. They may have the same size, but I think we can all agree they will not have the same quality.
Actually, depending on the content - for some low bass sounds, roughly - a 4khz wav may in fact sound better than a 44khz mp3, since lower sample rate only messes up the higher frequencies while mp3 compression affects all of them.
 

agris

Arcane
Patron
Joined
Apr 16, 2004
Messages
6,924
Here, the screenshots have photographic quality, 50 000 colors per image. Reducing that to 256 (=removing 99.5% of the colors) and expecting same quality than a JPG, a format designed for photos, is just wishful thinking.
Why do you assume that the color space will always be down-shifted to 8 bit? I read the link as if the bit register selected was dynamic depending on the color histogram generated for each source image. So some may be 16 bit, etc.
 

Syl

Cipher
Joined
Nov 3, 2011
Messages
750
A proper sound file analogy would be claiming that a 4kHz raw WAV file in a zip is equivalent to a 44kHz 256kbps mp3. They may have the same size, but I think we can all agree they will not have the same quality.
Actually, depending on the content - for some low bass sounds, roughly - a 4khz wav may in fact sound better than a 44khz mp3, since lower sample rate only messes up the higher frequencies while mp3 compression affects all of them.
Yes, I know that. Again, photographic quality content can have any shape, any color, any gradient, etc... No special cases here. If the game was pixel-art or anime, I wouldn't be arguing. :)

Here, the screenshots have photographic quality, 50 000 colors per image. Reducing that to 256 (=removing 99.5% of the colors) and expecting same quality than a JPG, a format designed for photos, is just wishful thinking.
Why do you assume that the color space will always be down-shifted to 8 bit? I read the link as if the bit register selected was dynamic depending on the color histogram generated for each source image. So some may be 16 bit, etc.
Because that's just how it works. I didn't design the PNG format. :)

To be more precise: You're right, each image has its own palette, but 16-bits PNG doesn't exist.

There is: 48 bits, 24, 8, 4, 2 and 1.

Hmmm now that I look at the table, there is indeed 16 bits. Either 16 bits grayscale (65 000 shades of grey) or 8 bits grayscale (256 shades) + an alpha channel. Not really useful here. ;)
 

Pyke

The Brotherhood
Developer
Joined
Nov 29, 2011
Messages
1,223
Location
South Africa
Should be all done by Tuesday. Its a total of 14 minutes of cinematic work so far. If I can get to my B list (which I should get to by release, but they are things like establishing shots and minor 'wouldn't it be cool if' things) it will probably be about 20 - 25 minutes altogether.
 
Joined
Jan 14, 2018
Messages
50,754
Codex Year of the Donut
Your probably right - Im just an artist, and honestly most technical talk tends to whoosh over me.
I can show you some numbers of a raw frame I just finished rendering from MAX.

EWVLKtk.png


KjZL2fT.png


The truth is that when rendering an animation the individual frame compression and artifacts aren't 'that' important because motion hides a LOT of errors. Most of the post work I do is to 'degrade' the frame. Motion blur, DOF, particles, 2D camera shake. There is always a trade off between compression quality and size, with motion hiding many of bad things that come with higher compression.
Thanks, I can work with that.

So the image above is the 2.5MB 24-bit PNG (2nd line). That tells us that there is ~8MB of metadata in the 1st file. What??? That's insane. The only explanation I can come up with is that Adobe stores all the layers there. I'm starting to understand why this plugin seems useful.

The JPG file is compressed with 100% quality. That's overkill. 80% is perfect value, no visible difference, huge size reduction. Result: 200KB.
fzxzB4r.jpg

As for the last PNG, the 256 colors version, Irfanview produced a 1MB file. There is also no visible difference but it's a trick as there isn't any high contrast part. That's still 5 times the size of the JPG above.

So what now? I don't know what your pipeline is, but I'm guessing you will make a mp4 with the individual frames. In that case, the only useful file is the STRIPPED PNG, you can ignore everything else. Final file size will be approx.: Number of frames * 200KB / 10 (30MB/mn, 2GB/h).

As for the SuperPNG plugin, just untick the Quantize box and never look back. This option has no use whatsoever. No modern movie format supports 8-bit color (the encoder will just convert back to 24-bit).

Is that a rendering error on the left above the tree?
challenge accepted
j70wZs3.png
423KiB png
 

Infinitron

I post news
Patron
Staff Member
Joined
Jan 28, 2011
Messages
99,441
Codex Year of the Donut Serpent in the Staglands Dead State Divinity: Original Sin Project: Eternity Torment: Tides of Numenera Wasteland 2 Shadorwun: Hong Kong Divinity: Original Sin 2 A Beautifully Desolate Campaign Pillars of Eternity 2: Deadfire Pathfinder: Kingmaker Pathfinder: Wrath I'm very into cock and ball torture I helped put crap in Monomyth
10abf4d62682891a6e6747b1556b25a7_original.png
e9926040b9cdb971adc42bacde061c89_original.png
e251e3407bb61c7eab788dad3c753168_original.png
c12cf936cb1cdfc1e2143c1c6fdff347_original.png


https://www.kickstarter.com/project...n-isometric-post-apocalyptic-ad/posts/2578997

JULY 2019 - BACKER UPDATE

Hey Backers!

We've managed to crawl out from behind our desks to post a backer update - woohoo!

I'm sure you've heard of game development "crunch time"? Well, Nic and I are crunching away. Grey, Wintery days here in SA are great for productivity, I can assure you.

We like to joke that we can see the light peaking through the forest (ever so slightly) at the end of this long journey.

Well, we better get back to the grindstone - chat soon!

The Bros.
 

ScrotumBroth

Arcane
Patron
Joined
May 13, 2018
Messages
1,292
Grab the Codex by the pussy Insert Title Here Strap Yourselves In
Appreciate the neat update, despite being busy. Probably most honest Kickstarter updates I've seen, no bullshit, just goodies.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom