WolfKodi Posted November 26, 2015 Share Posted November 26, 2015 Whoa! Okay, there are two parts to this. Case/Issue 1: Scene picking info for animated rigs only obtains picking information from the first frame of the rig animation. I've setup a test case, http://jsfiddle.net/7x0nkh0g/3/ , where there's this cube that is being animated and moved by this bone. You can click on the cube to change it's colour between green and red. Clicking only works if you click on the mesh where it was at the first frame of animation. Doesn't canvas picking info casts a ray into the scene and looks for active faces everytime? It appears that it's using the first frame of the rig as if it was not being animated at all.This issue occurs from files exported from both Babylon and Tower Of Babel exporter from blender.Case/Issue 2: Using the Morph Extension (ver 1.1) and Tower Of Babel to import and animate shape keys created in Blender, on a mesh that also has skeletal rig and animation, morph shape offsets are relative towards the Rest Position (edit mesh position in Blender before the mesh has been set to a pose by a rig).Using the previous jsFiddle example: http://jsfiddle.net/7x0nkh0g/3/, clicking on the blue circle morph's the cube's shape into a pyramid. Only the top four keys are morphed. Notice how the top four keys try to move towards the rest position of the original mesh instead of following the translated skeletal rig's first frame. After discovering this, I created another animation rig but this time, I set the first frame of the rig to match the original rest position of the mesh and then have my usual looping animation after that. In Babylon, I then set the rig animation to skip over that first frame. This is sort of a work-around but it actually works! See: http://jsfiddle.net/7x0nkh0g/4/ The cube is being morphed to a pyramid correctly now, while still being animated by a skeletal rig. I've only tried this trick out on the test case. Can't wait to try it out on my facial shapes on top of a skeletal animation. I read in some old threads that JCPalmer might have a working copy of the Morph Extension version 1.2 hasn't been released? I'm getting depreciation messages from BJS using this old Morph Extension: "BJS - [22:36:45]: Mesh.updateVerticesDataDirectly deprecated since 2.3."On a sidenote for those test cases I've created, if you click on the blue circle to morph the shape of the cube first, then you can't click on it to change it's colour later. JS gives an error "Uncaught TypeError: Cannot read property 'subtractToRef' of undefined". Click on the cube to change its colour first and then clicking the morph next works fine however.If you need the blender file, I've attached it.cubearmatureplusdeform.zip Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.