KhronosGroup / glTF-Blender-IO

Blender glTF 2.0 importer and exporter
https://docs.blender.org/manual/en/latest/addons/import_export/scene_gltf2.html
Apache License 2.0
1.5k stars 320 forks source link

If use multiple UV maps, i will not be able to export material animations #2416

Open Maiev-42 opened 1 day ago

Maiev-42 commented 1 day ago

Describe the bug When I want to use two sets of UVs to make material animation, I find that the material animation cannot be exported, but the file can be exported

To Reproduce 1.I first created a material and applied a texture to the base color and emission texture 2.Then I created a new UV and connected it to the emission texture 3.I animated the material on the base color texture and pushed it into NLA 微信截图_20241125181149

4.I exported the GLB file and found that there was no animation in the babylon sandbox 4 5

test file test.zip

Version

other test I have conducted many tests and found that as long as different UVs are connected in the node, the material animation cannot be exported, regardless of whether it is TRS or weighted animation, and regardless of which channel it is made for.

In addition, if there are multiple layers of UV but they are not used in the node, it will not affect

julienduroure commented 1 day ago

Hello, Some animation are in the exported file: image

So the problem may not come from Blender.

Maiev-42 commented 1 day ago

thank you! I will check if it is a problem with babylon.js

Maiev-42 commented 1 day ago

I tested this file in other gltf viewers and found that they can all query this animation, but the playback is ineffective. 微信截图_20241125194401

微信截图_20241125194528

Link of the gltf viewer used https://github.khronos.org/glTF-Sample-Viewer-Release/ https://playcanvas.com/viewer https://gltf-viewer.donmccurdy.com/ https://threejs.org/editor/

julienduroure commented 1 day ago

I can confirm something is wrong on Blender export side. 2 materials are created, and the animated one is not the material used by the mesh. Investigation in progress