Skip to content

Updating a material texture on a gltfpacked model #728

Answered by zeux
callumprentice asked this question in Q&A
Discussion options

You must be logged in to vote

the original material map (object.material.map) is null

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.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@callumprentice
Comment options

@zeux
Comment options

Answer selected by callumprentice
@callumprentice
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants