Updating a material texture on a gltfpacked model #728
-
My workflow is:
I have the relevant JS extensions loaded for meshopt nd KTX2 textures - other optimized meshes in the scene that I am not trying to replace the materials on look correct. Is this something that should work? Apologies for not supplying a JS Fiddle to illustrate what I am seeing - I tried but was unable to figure out how to load the various extensions in that environment. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
By default, gltfpack uses You can preserve them while doing the replacement, eg.
You can also use |
Beta Was this translation helpful? Give feedback.
Is the original material untextured? If so, you would need both
-vtf
and-kv
to prevent the texture coordinates from getting stripped from the output file.-kv
was added in master a few weeks ago and will not be part of 0.21 build but it will be part of any recent build eg https://github.com/zeux/meshoptimizer/actions/runs/10086424018. Without a texture object, gltfpack doesn't have anywhere to store repeat/offset values, so it assumes texturing is not necessary and removes the texture coordinate.