Hello there, I am a newbie here and joined the group very soon.
I have a series of glTF files. Those files are consisted of exactly the same mesh with different vertex positions and UVs. I use those meshes to animate in Unity. Instead of loading all the meshes into the scene at one I try to figure out if there is a straightforward way to convert them into a one animated glTF file. Which is where I have come up with the morph target animations of Babylon.
I may able to create an animation from assigned morph targets so far. However I couldn’t achieve to animate the UVs of the mesh. https://playground.babylonjs.com/#SZ8PLA#5
I am pretty sure these 3 meshes are using the exactly same texture defined in their embedded glTF files separately. The only thing different is their assigned UVs in the vertex data. Any help would be much appreciated to animate the UVs.
P.S: Since the backface culling, I need to rotate the environment 180degrees to see the meshes on the scene load.
Unfortunately glTF does not support animating UVs via morph targets:
Currently the format only supports morphing vertex position, normal, and tangent data.
I’m not sure if our traditional animation system in Babylon.js supports UV animation, but you can surely do it via custom shader material, or Node Material. I’m not too sure how useful this may be for your usecase, do you plan to use your meshes in Babylon.js or Unity?
Thank you very much @Drigax.
I actually plan to use those meshes in Unity again. My plan (it may be absurd but I wasn’t able to see any other straightforward solution) is merging all the meshes into one animating mesh (both vertex positions and UVs) in Babylon and export it back again in glTF format, so that I can import them in Unity (using glTFUtility toolkit) with its models and animations. Thus, instead of importing all the meshes in Unity separately and applying a mechanism which alternates their visibility to create an (stop-motion) animation, I would be able to access the Unity animator component of the same mesh I had exported from Babylon.
However, I didn’t know that glTF doesn’t support UV animation, which calls of the entire plan, doesn’t it?