Glb export from blender doesn´t carry the texture animation

I´m having a trouble while creating a texture animation in blender, by changing the intensity of the color emission in the ‘Principled BSDF’ material. The keyframes of the animation do show up in the dope sheet

But when I´m importing this using the glbLoader, the ‘candraGlow’ animation doesn´t show up in the animations array. The other animation I´ve created called the ‘DrumAction’ does appear correctly, and it shows up in the action editor tab of blender, just like this:

But the ‘candraGlow’ animation I can´t find a way to put to link to some action in the action editor.

1 Like

Currently material animations are not one of the animation types that glTF supports. I’m not sure if Blender can export them to other formats either… it may be necessary to re-create that part of the animation in three.js unfortunately.

1 Like

Hi @donmccurdy, thanks for the reply. I´ve tried to export the same model project in fbx, and by inspecting the properties of the object loaded to memory during runtime using the FBXLoader of three.js seems like the animation goes, however in using fbx I´m hitting another limitation that is the textures are not being loaded in the same way they are using the glb format also the animations are not playing correctly.
I´m having trouble to find useful examples that I could use in order to load the textures in three.js from the fbx model.

This is what I´m getting loading using fbx:


No textures nor animations
By inspecting the json the animation is there:

This is the snippet I´m using to load the fbx

            fbxLoader.load(
            model.url,
            (fbx) => {
              model.fbx = fbx

              const mixer = new THREE.AnimationMixer(fbx)

              const action = mixer.clipAction(fbx.animations[0])
              action.play()


              fbx.traverse(function (child) {
                if (child.isMesh) {
                  child.castShadow = true
                  child.receiveShadow = true
          
                  // console.log( child.geometry.attributes.uv ) this is not working as expected
                  // child.material.map = child.geometry.attributes.uv
                }
              })

              if (model.url.indexOf("murti") > -1) {
                model.fbx.name = "drumShiva"
              }

              scene.add(fbx)
            },

This is what I get using the glb model, however if you notice, in the top of the head the moon doesn´t even appear

glb candra model

Inspecting the glb model loaded you can see the ‘DrumAction’ of the moving arm, but no reference to the material glowing animation

#update - solved

I had to create another mesh in blender and import it in threejs. Just as recommended recreating the animation using threejs
Final result: krishna-speaks

1 Like