Closed ssbucarlos closed 12 months ago
The nutexb format is easily handled using the nutexb crate in Rust. The issue is that Blender doesn't support BC7 compression for DDS files. There isn't a cross platform tool to convert DDS to PNG or TIFF. The tooling for modern compression formats is almost entirely windows only. We would need to find a C/C++ library and make Rust and/or Python bindings. This is fairly involved.
thanks for the info, its unfortunate that cross-platforming would be pretty involved. Maybe we can just settle for windows-only support? Alternatively, i wonder if we could settle with importing the .NUTEXB as a BC5 or another version which blender supports, and then re-exporting as a NUTEXB with that BC5. However , I am not sure what the functional difference of BC5 vs BC7 is, i will test using switch toolbox to save BC5 DDS files to nutexb and seeing if theres any noticeable issues in game.
BC7 has dramatically better quality than BC5 for the same size. If you can convert to BC5, you can just as easily convert to PNG or TIFF to load in Blender. The other problem is that saving DDS files at a higher quality setting is slow on most implementations. It would slow down exports dramatically if we needed to resave any textures. It would be nice to have a faster way to do the nutexb -> TIFF conversion than Switch Toolbox. I'm not sure Blender has any advantages in terms of export.
oh ok, thanks for the info. theres a list of other things i would like to tackle first, but i may return to this as this would be a feature that simplifies the modding workflow. since export times would become an issue, could always make it an optional feature.
Can we consider this solved since https://github.com/ScanMountGoat/ultimate_tex is cross platform and can batch convert textures to and from nutexb? It's definitely possible to get the texture conversion code working from Python, but I'm not sure if it's worth the additional effort. We could also report some sort of warning if the PNG files aren't present when importing materials since this does tend to confuse new users.
I didn't realize that was made, then yeah we can close this issue. You did the hard part already, so if/when i get around to bundling ultimate_tex it hopefully wont take too long. It would still be a nice quality of life since users always expect to be able to import the .nutexbs like studioSB
Can we consider this solved since https://github.com/ScanMountGoat/ultimate_tex is cross platform and can batch convert textures to and from nutexb? It's definitely possible to get the texture conversion code working from Python, but I'm not sure if it's worth the additional effort. We could also report some sort of warning if the PNG files aren't present when importing materials since this does tend to confuse new users.
@ScanMountGoat Im interested in getting the .nutexb import/export from blender working after all, how do you think i should go about implementing it?
Currently the user needs to convert .nutexbs to .png. Research is needed to find an (ideally) crossplatorm-solution for converting the .nutexbs and importing/exporting to/from blender.