How to properly encode normalmap as compressed texture #835
-
|
The command im using : For this test im using a model from sketchfab : https://sketchfab.com/3d-models/cut-fish-c9bcb782e5ef4d37bd8671f1f82a0fbc I try different setting but cant get a correct normal map without the square, any idea of what im missing ? thanks ! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
|
First of all I don't know what you mean "without the square". What square? I see some compression artifacts but nothing extraordinary. You should not use sRGB for normal maps as normals are not color data. sRGB encoding will completely mess up the normals. Also I presume by If the renderer does not support 2 channel normal maps then do not use |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for your answer @MarkCallow ! Yes i was talking about the compression artifacts & the For my use case im not the author of the 3d models and i will have to deal with .srgb normal sometime. I will try to compress the normal with another compression than basislz, any suggestions for higher quality ? Thanks ! |
Beta Was this translation helpful? Give feedback.
-
|
there are some examples of usage for ktx create from @donmccurdy https://github.com/donmccurdy/KTX2-Samples/blob/main/encode.sh |
Beta Was this translation helpful? Give feedback.

First of all I don't know what you mean "without the square". What square? I see some compression artifacts but nothing extraordinary.
You should not use sRGB for normal maps as normals are not color data. sRGB encoding will completely mess up the normals. Also
never use --assign-oetf unless you know that the input file has incorrect colorspace metadata. If the input file is linear, as it should be, specify only
--format R8G8B8_UNORM. If the input file is sRGB then use--convert-oetf linearso it is properly converted.I presume by
--normal-mapyou mean--normal-mode.--normal-modecreates a 2 component normal map and expects the normals to be normalized. A 2 component map allows the unco…