In the case of a grouped mesh, the animation no longer runs

Do I go correctly in the assumption that the AnimationMixer does not run when 2 mesh are grouped? In my case, that is the eyes in a head. If so, can the problem be solved via AnimationObjectGroup?

The best way to find that out is to try it, I would say.

I noticed that the animation no longer runs when an eye is grouped as a child. Is this behavior well known? Maybe I’m doing something wrong … I’m still a bloody beginner. If this is a known effect, I have to come up with something.

I do not find much useful information regarding AnimationObjectGroup.

@Tom two THREE.Mesh objects inside of a THREE.Group should work just fine. AnimationObjectGroup is only helpful if the same properties are animated in the same way on each object, which probably isn’t the case here. You can just target each eye with a different animation clip. Your AnimationMixer should be initialized with a root object that contains everything it will modify — in this case that should be the parent group. If this isn’t working please include a JSFiddle or Codepen so we can understand what might be going wrong.

1 Like

@donmccurdy Thanks for the answer and the good news. I try to put together something that is comparable. Here is a video to show how it looks.

In this way, I’ll grup the whole thing.

var loader = new THREE.JSONLoader();
var group = new THREE.Group();

loader.load( "./three/models/JSON/Blender/Face.json", function addModelToScene( geometry, materials    ){			
var material = new THREE.MeshPhongMaterial({morphTargets: true, map: THREE.ImageUtils.loadTexture('./three/models/JSON/Blender/Face.jpg')});					
var face = new THREE.Mesh( geometry, material );		
    face.scale.set( 17, 13, 16 );
    face.position.set( 0,-17, 0);				
    face.rotation.set( -0.1, 0.0, 0.0);	
    group.add( face );			
loader.load( "./three/models/JSON/Blender/AugeHighResL.json", function ( geometry, materials ){							
var material = new THREE.MeshPhongMaterial({morphTargets: true, map: THREE.ImageUtils.loadTexture('./three/models/JSON/Blender/EyeTextur.jpg')});		
var eyes = new THREE.Mesh( geometry, material );
    eyes.scale.set( 24, 24, 24 ); 
    eyes.position.set( 50, 217, 124);	     			
    eyes.rotation.set(-0.16, 0.06, 0.0);             
    group.add( eyes );
        scene.add( group );		

mixer = new THREE.AnimationMixer( face );

var clip = THREE.AnimationClip.CreateFromMorphTargetSequence( 'test', geometry.morphTargets, 30 );		

    mixer.clipAction( clip ).setDuration( 6 );
var action = mixer.clipAction( clip );

    Play.onclick = function Play() {;		
    Stop.onclick = function Stop() {