Closed seyfeb closed 1 year ago
Hi @seyfeb,
Which workflow are you aiming for?
If you're going for 1, then prior compressing meshes and textures does not make sense as it introduces compression artifacts. Granted, I never tried that workflow and I don't know if Unity converts that texture to something the target platform can digest.
Actually, I’m aiming for 1. right now but for number 2 in the long term. For 2. I infer that there is no problem at all (haven’t tried it yet).
I get your point that compressing first (and then a second time with a different algorithm by the Unity editor) doesn’t make much sense. However, what I actually tried to achieve was to reduce the resolution of the textures. gltfpack
lets you do this only in combination with a compression, hence the compressed textures.
For the supported default texture assets (JPG, PNG,..) Unity let’s you choose a desired maximum resolution. The glTFast-imported models do not expose that option. That part of the issue might even be better placed in the glTFast
repository (although I seem to be the only one ever using it that way 😀).
Maybe it’s best to shift it to the content-creation part of the workflow and use a different tool for texture resizing of an existing GLB/GLTF file (do you happen to have any recommendations?).
@seyfeb Have a look at the glTF Project Explorer for tools. Maybe glTF-Transform or Gestaltor do the trick.
Closing this, since this is an authoring/tooling issue.
fwiw: Next release will allow you to discard the higher resolution mipmap levels, which might just be what you need.
I feel like I’m doing something wrong or I missed the answer when searching the previous issues, because I assume I don’t have a very special use case.
I want to load a glTF file with compressed textures in Unity3D for building an app including those models to iOS (and Android) devices. I’m loading it via glTFast and the KtxUnity library.
The model I use for testing is the
gltfpack
-converted Avocado model via~/bin/gltfpack -i Avocado.gltf -o Avocado_uastc.glb -tc -noq
or~/bin/gltfpack -i Avocado.gltf -o Avocado_uastc.glb -tu -noq
to obtain a GLTF model with compressed textures (ect1s or uastc, respectively).In Unity the importer shows the texture compression as
RGB compressed DXT1|BC1 UNorm
and there is no way to change the format either for specific platforms (iOS/Android) or in general. HoweverDXT1|BC1
is not supported on iOS. Does anybody know what’s the right way to handle this? 😬