koerismo / PBR-2-Source

A Python-powered gui for converting pbr materials into Source Engine-compatible materials.
GNU General Public License v3.0
26 stars 2 forks source link

Feature request: VTF format options #13

Closed Jofoyo closed 3 weeks ago

Jofoyo commented 1 month ago

Presently all textures will use uncompressed formats, however this is very debilitating in file size, having options at least to switch formats per texture is very desirable. Presently if using this I would absolutely need to manually do reconversions for sane file sizes.

DXT1 compression is very unnoticeable on albedos most of the time, especially at higher resolutions, and uncompressed is very overkill here. Modern day games still use DXT compression on albedos. DXT5 offers DXT RGB but uncompressed alpha and works great if it contains an envmapmask. If implementation is an issue you can see VTFEdit Reloaded for an updated compression binary from AMD.

Most of the channels in the phongexponent texture will go unused, and having just an I8 format would work here in a lot of cases. BGRX5551 and IA88 are also decent compromises in their own circumstances.

koerismo commented 1 month ago

Hi, this is actually a regression! Basetextures should be compressed by default, and bumpmaps left uncompressed. The library I use (srctools) does have this behavior implemented, however it is just not exposed through the image adapter currently.

koerismo commented 3 weeks ago

This should be addressed in the next update. The basetexture should use DXT1/5 and the bumpmap should use RGB/A8. The phong exponent should only use I8, since the phong saturation feature doesn't really seem to do much (or even exist) in the games i've tested.