-
Notifications
You must be signed in to change notification settings - Fork 122
Add support for generating mipmaps #2
Comments
Is this on the roadmap? We are interested in using etc2comp and it's essential for us that we can write out mipmaps. If this isn't planned we'll probably go ahead and do it ourselves. |
Are you planning to add this feature in the near future? |
@bog-dan-ro This work is not quite complete, but I forked the repo and adding mip level support to the libs, which was good enough for our use case. Perhaps it can help you. Here it is: https://github.com/Denzilb55/etc2comp You'll probably need to do some hackery to get it working for you too though. |
@Denzilb55 thats, I'll give it a try |
One thing that's unclear for this request is 'how are the mip-maps generated'? Is there preference / guidance / input on these topics? |
PlayCanvas experience on that might be one of the case study: Containers (KTX, PVR, DDS) - some of tools provided DDS container, some KTX, and some even none. So not to implement all different headers in engine, we've only implemented DDS headers parsing, and simply put all textures of different formats in DDS containers, of course providing correct header information so when parsing it can be easily identified what compression textures are inside the container. In advanced cases, where people use those tools in their tool-chain, they want to control and be able simply get the raw texture data, no header, no mips. Based on that, there should flexible settings to provide users a control, as well as default behaviour that applies to majority and starters of the tool: read-to-consume files. |
etc2comp was designed to be usable as a library with the hope that use cases like this would be covered when integrating the compressor into other tools. But given how useful it would be to generate mipmaps from the command line we should support this feature. |
For our use case we generated the mipmaps ourselves. That said, it would be useful if it could generate them as well, like Mali does. |
@Denzilb55 What resampler / resizer are you using? |
@mainroach For generating the mip levels? We just generate them with OpenGL. We have an OpenGL app, so we already have gl-textures available with generated mip-maps. |
@Denzilb55 in WebGL @mainroach from many tests, we found that Kaiser filter produces one of visually best results on generic variety of textures, and preserves sharpness really well comparing to many other filters we've tried. IM provides tons options. |
@Maksims yeah, that's not what I meant. Our app provides the texture with all miplevels (generated with OpenGL), and then then we modified the KTX-writer module to accept mip levels. So for us, the responsibility is still on us to provide the mip levels, it would just be nice if the KTX-writer in Tools could write multiple levels. (If it wasn't clear, we're not using the provided Etc2Comp app, we've integrated the libs into our app and make function calls into it). |
I think you can inspire from existing tools (e.g. PVRTexToolCLI generates quite acceptable mipmaps). |
Addressed in bf22b48 |
Yupee !!! |
|
No description provided.
The text was updated successfully, but these errors were encountered: