-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPU / Game engine optimised textures #2278
Comments
Hi, as far as I know Khamake expects .png textures and then converts them to another format depending on the target used. If you think that there should be more formats supported, maybe ask Robert on the Khamake repository. This repository is probably the wrong place to implement this. I also wonder if DXT textures are already used on some targets, it could be difficult to implement it as the correct DXT format depends on the type of texture (diffuse, normal etc.). |
I will check with Robert. |
Link to Kode/Kha#1351. The quality setting mentioned in Robert's answer can be found in Armory at |
I looked into KHA and the compress texture format is not implemented in any Backend I have checked. First the compress texture format will need to be added to KHA. @MoritzBrueckner |
Can you elaborate? Where in the Armory/Iron code should this be implemented (apart from |
changes that will be needed in Kha:
more infos: changes that will be needed in Iron (some of these): changes that will be needed in Armory (some of these): PNG's are 8bbp and there is also the part about the file extension but that will be in Kha I think. |
There is a new similar issue on the Armorpaint repo, let's see what Lubos answers: armory3d/armortools#1067. If it should get implemented in Armorpaint only there might be ways to use it in Armory as well. |
As a reminder, keep in mind that ASTC is slow to encode and isn't well-supported on older hardware. Last time I checked, it's also not supported at all on macOS (the same goes for BPTC). DXT*, as old as it may be, is almost universally supported on desktop platforms by now. On mobile platforms, ETC2 support is decent nowadays, but it can be slow to encode if you don't use something like etcpak. ETC1 can be used as a more widely supported alternative on mobile platforms, but it lacks support for storing an alpha channel and its quality is pretty bad by today's standards. Finally, if you want to optimize file sizes but don't mind very long encoding times and not-great quality, you could use Basis Universal. |
@Calinou thanks for the note. About Macs the question is more about supporting discontinued hardware since the ecosystem has moved toward Metal. About ETC2 (Ericsson Texture Compression version 2 / 2016). A note from Google comparing ASTC and ETC2 : Rather than falling back to an older format ETC2 - Older machines can use non-compressed textures we have now. My tests shows that VRAM consumption increases by a factor of six when using ETC2 compare to ASTC. Also the latest ASTC (2020) is much faster regarding compression time (about x3 times). Compressed textures requires hardware support and it seems their is a better support for them on PC and Mobile. PC : DTX Other machine can fall back to the uncompressed format. |
I have found that Direct Draw Surface (DDS) textures work well with Armory. They are likely better than PNG or JPEG as far as performance goes. |
Fixing GPU memory bottleneck with GPU optimised Textures.
well the current workflow picks up textures out from blender as PNG, JPG or HDR
and use them directly for any target export .
However these textures are not optimised for the GPU. Having optimised GPU textures can really improve real-time performances and GPU available memory.
I think we need at least ASTC and DXT1/DXT5 textures.
Textures should be processed in a first time as it is now but the exported code should point to the optimised format and load it properly. (as Blob object in JS for example)
Then you should convert manually the original textures files with the appropriate tool:
ASTC:
https://github.com/ARM-software/astc-encoder
DXT:
https://developer.nvidia.com/nvidia-texture-tools-exporter
This will liberate most of the GPU memory for well other better things than textures....
Example :
how to load AST textures in HTML5:
The text was updated successfully, but these errors were encountered: