Hello !
I have been working on creating a workflow for VAT(vertex animation texture) aka morph textures that run in local vertex space. I have for the most part a complete working process and shader in defold. However I have had an issue with distortion in the mesh and have been going over the whole process of encoding animation to texture and making sure the math in the shader is right , comparing vertices positions from baked animation to the vertex positions in the encoded textures and have suspected texture compression issues. Vat settings that are needed is no mipmaps and no compression or lossless compression to be able to preserve vertex position/normal values in the encoded textures.
I needed to check if texture compression was the issue, so I enabled texture compression in editor preferences
Then created a custom texture profile and set it as default in project settings.
I then tested most settings and realized there is not a setting for no compression then I read there is DEFAULT compression that is supposed to be lossless? Took a closed look, I believe the default setting for texture compression is set to -
COMPRESSION_TYPE_DEFAULT : All formats Generic lossless data compression
- This generic lossless compression seems to not be lossless at all. So to confirm my suspicion, using the same assets I recreated the scene and shader in Godot and tested compression to make sure its not just a problem with my animation encoding or bad math. Here is a video confirming that it is a compression issue in defold and the “Generic” lossless compression is causing the distortion in the mesh/animation.
(Video updated with working VAT )
The video shows the generic lossless compression in defold on the left and on the right is the same assets in godot and compression with lossy is very similar results to defold and then later in the video godot texture compression is set to lossless and it works , also note that no compression works well.
With this knowledge I can rest easy on trying to figure out where it went wrong and now I think it would be awesome to have a working lossless compression and or option for no compression at all in defold. What do you all think?
Thanks for reading and Happy Halloween !
Notes: Big inspiration from Mario Palmero and his GDC talk here: