When I morph a model, how to modify UV coordinates in animation. The surface area is changed in animation. So I must modify UV coordinates. But it can only change vertex position and normal data.
As with position and normal, pass both texcoords into the vertex shader, and interpolate them.
To glTF specifically…
I don’t see anything here precluding texcoords. Just that support for it is optional:
Does three.js support TEXCOORD_n attribute in the targets property defined in the Mesh primitives ?
You may want to ask the guys that maintain it. A few related links on this I found to get you started:
- Add support for TEXCOORD_n and COLOR_n for morph targets · Issue #23467 · mrdoob/three.js · GitHub
- Added support for COLOR_n and TEXCOORD_n in morph targets - #116 - vpenades/SharpGLTF - Github
- three.js webgl - morph targets - face
The latter suggests maybe yes (?) But the first makes me wonder.
Oh, I know. Thank you! Because I use tinygltf. But it not support TEXCOORD_n in targets.