pman
pman copied to clipboard
Add Texture Optimization
We can create Panda3D txo files for textures using Texture.write('name.txo'). We should add an option to convert textures to txo and to compress textures. Panda3D's texture class will automatically pick an appropriate compression format based on number of channels when using Texture.set_compression(Texture.CM_on). However, we will need to handle switching to CM_rgtc if we detect the texture is used for normal maps.
For the record, you can tell Panda's model-cache to cache textures as .txo automatically using model-cache-textures true. Also, when converting models using egg2bam, you can use the -txo flag to automatically convert textures referenced by the .egg file to .txo.
Those are good to know, thanks!
The current why pman handles conversion, it would be nice to separate texture compression from model conversion. However, maybe it makes sense to change up how pman does model conversion so it can take more advantage of Panda features.