4 ms·
Chocked at FAT size video games file ? Me too. Giga bytes Damned ! To reduce the size, I decided : 1) To use the standard PNG compression. 2) To limit mesh
by tmilard 3y ago
Chocked at FAT size video games file ? Me too.
Giga bytes Damned !
To reduce the size, I decided :
1) To use the standard PNG compression.
2) To limit mesh size at less than 300 points for a scene.
- Result :
a) File size < 1 mega Byte ( really).
b) It downloads in 4 seconds.
Check it here :
https://free-visit.net/fr/demo01 https://free-visit.net/fr/demo01
(pleaseload url twice : I still have a bug)
Question :
- why video games STUDIOS do not use this strategy ?
- terafo 3y agoBecause PNG isn't a good format for GPU textures. Oodle texture+Kraken+something like BC7 is an optimal solution and is used in many games.
- tmilard 3y agoI think in today's machine (be it PC, Mac or even Smartphones) the reading-and-transform of a png asset for the GPU is hard coded in the processor : so VERY fast. It works well.
- terafo 3y agoThere is no hardware acceleration for PNG in any consumer device that I know of. And there is such thing as VRAM usage, if you decompress PNG to bitmap it would use 3x-4x more VRAM than BC7. If you decompress it from PNG and then compress to BC7 it would increase loading times and basically destroys all point of using PNG instead of lossy compression.
- egypturnash 3y agoTo limit mesh size at less than 300 points for a scene. I am pretty sure most modern video games use more mesh points than that for, like, a hat your character can wear.
- tmilard 3y agoI it is true : I was very agressive on this one. But still, thousands and tousands of triangle feels like so much overweight for me. Specialy for indoor scenes. Quality for the eye is a lot to do with texture, NOT the number of triangle.
- tmilard 3y agoAnd I do not even talk about the GPU work to handle those thousands of triangles. With 300 points, my scene runs quick&fast even on budget Smartphones ! This is an important issues I can tell you. A video game that runs on all devices ...
- Sohcahtoa82 3y agoAt 300 points, a computer from 1996 could run your game.
- tmilard 3y agoBut not the high texture
- kevingadd 3y agoPNG decompression is way too slow. Some games use it but it's on the way out, either being replaced by codecs like Basis or QOI in most cases
- tmilard 3y agoReally ? It does not feel this way on my scene that has more than 90 .png files used for texture. The time to : download the globel zip file + open and reading the points and all textures => 5 to 7 seconds. This is super quick !
- kevingadd 3y agoSwitching from PNG to basis for my game (currently with a pretty minimal set of textures) was like a 50% reduction in load times with no other changes. Note that I'm not storing assets at rest in a ZIP file because there's no reason to. If I was doing that it might close the gap some.
- tmilard 3y agoYes I agree but the PNG compresion size is so great ! The Textures in total reduce enormously my game file size. By 15 times : so good. And because it is small the web download is VERY quick. Very.... So in a way I loose a bit on decompresing textures time, BUT a gain a lot od seconds in dowloading reduced textures files.
- ehaliewicz2 3y agoHow many times do you decompress the textures, and how many times do you download them?
- tmilard 3y agoOnly once : - Step 1: download zip file containing my XML point file and my 90 PNG texture files. - Step 2: open zip file and dezip in 91 filed - Step 3: run 3D games with all the 91 Assets. The (small) game engine reads each 90 PNG files and - of xccourse- transform each one in a GPU compatible texture. All zip takes about 6 seconds. Not so bad