kevzettler

Blender Exporter, Missing meshes when parented to bone.

Recommended Posts

I have an armature in blender and I have a mesh that's cut up into smaller modular meshes. To animate I select the modular meshes and parent them to bones then move the bones and the meshes inherit the translations.

Screenshot 2016-05-29 18.52.28.png

 

When I export from blender to babylon it seems that any mesh that is explicitly parented to a bone is missing.

Screenshot 2016-05-29 18.47.11.png

I've attached my blend file for reference.

It appears as though the mesh and bone data for the missing limbs are in the .babylon file. maybe they are hidden or something?
 

,{"name":"arm.L","id":"arm.L","materialId":"combined.lambert0.006","billboardMode":0,"position":[0.0203,0.1534,-0.5203],"rotation":[0,1.5708,-1.514],"scaling":[0.05,0.05,0.05],"isVisible":true,"freezeWorldMatrix":false,"isEnabled":true,"checkCollisions":false,"receiveShadows":false
,"positions":[1.1351,6.4324,4.5946,1.1351,-9.5676,6.5946,1.1351,-9.5676,4.5946,1.1351,6.4324,4.5946,1.1351,6.4324,6.5946,1.1351,-9.5676,6.5946,-0.8649,6.4324,-7.4054,-0.8649,4.4324,-5.4054,-0.8649,4.4324,-7.4054,-0.8649,6.4324,-7.4054,-0.8649,6.4324,-5.4054,-0.8649,4.4324,-5.4054,-0.8649,4.4324,-5.4054,-0.8649,2.4324,4.5946,-0.8649,2.4324,-5.4054,-0.8649,4.4324,-5.4054,-0.8649,4.4324,4.5946,-0.8649,2.4324,4.5946,-2.8649,6.4324,-5.4054,-2.8649,4.4324,4.5946,-2.8649,4.4324,-5.4054,-2.8649,6.4324,-5.4054,-2.8649,6.4324,4.5946,-2.8649,4.4324,4.5946,-2.8649,2.4324,0.5946,-2.8649,-9.5676,4.5946,-2.8649,-9.5676,0.5946,-2.8649,2.4324,0.5946,-2.8649,2.4324,4.5946,-2.8649,-9.5676,4.5946,-2.8649,2.4324,-5.4054,-2.8649,-9.5676,-1.4054,-2.8649,-9.5676,-5.4054,-2.8649,2.4324,-5.4054,-2.8649,2.4324,-1.4054,-2.8649,-9.5676,-1.4054,-4.8649,2.4324,-1.4054,-4.8649,-9.5676,0.5946,-4.8649,-9.5676,-1.4054,-4.8649,2.4324,-1.4054,-4.8649,2.4324,0.5946,-4.8649,-9.5676,0.5946,7.1351,4.4324,-5.4054,7.1351,6.4324,-7.4054,7.1351,4.4324,-7.4054,7.1351,6.4324,4.5946,7.1351,6.4324,-7.4054,7.1351,4.4324,-5.4054,7.1351,6.4324,4.5946,7.1351,4.4324,-5.4054,7.1351,-9.5676,4.5946,7.1351,-9.5676,4.5946,7.1351,4.4324,-5.4054,7.1351,-9.5676,-5.4054,3.1351,-9.5676,6.5946,3.1351,6.4324,4.5946,3.1351,-9.5676,4.5946,3.1351,6.4324,6.5946,3.1351,6.4324,4.5946,3.1351,-9.5676,6.5946,7.1351,-9.5676,-5.4054,3.1351,-9.5676,4.5946,7.1351,-9.5676,-5.4054,-2.8649,-9.5676,-1.4054,1.1351,-9.5676,4.5946,3.1351,-9.5676,4.5946,-2.8649,-9.5676,-1.4054,7.1351,-9.5676,4.5946,7.1351,-9.5676,-5.4054,3.1351,-9.5676,4.5946,-2.8649,-9.5676,0.5946,1.1351,-9.5676,4.5946,-2.8649,-9.5676,-1.4054,3.1351,-9.5676,4.5946,-2.8649,-9.5676,0.5946,-2.8649,-9.5676,-1.4054,-4.8649,-9.5676,0.5946,-2.8649,-9.5676,4.5946,1.1351,-9.5676,4.5946,-2.8649,-9.5676,0.5946,3.1351,-9.5676,6.5946,3.1351,-9.5676,4.5946,1.1351,-9.5676,6.5946,-2.8649,-9.5676,-1.4054,7.1351,4.4324,-7.4054,7.1351,4.4324,-5.4054,7.1351,4.4324,-7.4054,-0.8649,4.4324,-5.4054,-0.8649,4.4324,-5.4054,-0.8649,4.4324,4.5946,-0.8649,4.4324,-5.4054,-2.8649,4.4324,4.5946,-0.8649,2.4324,-5.4054,-2.8649,2.4324,-1.4054,-2.8649,2.4324,-5.4054,-0.8649,2.4324,-5.4054,-0.8649,2.4324,4.5946,-2.8649,2.4324,-1.4054,-0.8649,2.4324,4.5946,-2.8649,2.4324,0.5946,-2.8649,2.4324,-1.4054,-2.8649,2.4324,-1.4054,-2.8649,2.4324,0.5946,-4.8649,2.4324,0.5946,-0.8649,2.4324,4.5946,-2.8649,2.4324,4.5946,-2.8649,2.4324,0.5946,-2.8649,2.4324,-1.4054,-4.8649,2.4324,0.5946,-4.8649,2.4324,-1.4054,-0.8649,6.4324,-5.4054,-0.8649,6.4324,-7.4054,7.1351,6.4324,-7.4054,3.1351,6.4324,4.5946,-0.8649,6.4324,-5.4054,3.1351,6.4324,4.5946,1.1351,6.4324,4.5946,-0.8649,6.4324,-5.4054,7.1351,6.4324,-7.4054,7.1351,6.4324,4.5946,3.1351,6.4324,4.5946,-0.8649,6.4324,-5.4054,1.1351,6.4324,4.5946,-2.8649,6.4324,4.5946,1.1351,6.4324,6.5946,1.1351,6.4324,4.5946,-0.8649,6.4324,-5.4054,-2.8649,6.4324,4.5946,-2.8649,6.4324,-5.4054,3.1351,6.4324,4.5946,1.1351,6.4324,6.5946,-2.8649,-9.5676,-1.4054,-4.8649,2.4324,-1.4054,-2.8649,-9.5676,-1.4054,-4.8649,2.4324,-1.4054,7.1351,-9.5676,-5.4054,-0.8649,2.4324,-5.4054,-2.8649,-9.5676,-5.4054,-0.8649,2.4324,-5.4054,-2.8649,2.4324,-5.4054,-2.8649,-9.5676,-5.4054,7.1351,-9.5676,-5.4054,7.1351,4.4324,-5.4054,-0.8649,2.4324,-5.4054,7.1351,4.4324,-5.4054,-0.8649,4.4324,-5.4054,-0.8649,2.4324,-5.4054,-0.8649,4.4324,-5.4054,-2.8649,6.4324,-5.4054,-0.8649,4.4324,-5.4054,-2.8649,6.4324,-5.4054,7.1351,4.4324,-7.4054,-0.8649,6.4324,-7.4054,7.1351,4.4324,-7.4054,7.1351,6.4324,-7.4054,-0.8649,6.4324,-7.4054,-4.8649,2.4324,0.5946,-2.8649,-9.5676,0.5946,-4.8649,-9.5676,0.5946,-2.8649,2.4324,0.5946,-2.8649,-9.5676,0.5946,-4.8649,2.4324,0.5946,1.1351,6.4324,6.5946,3.1351,-9.5676,6.5946,1.1351,-9.5676,6.5946,3.1351,-9.5676,6.5946,1.1351,6.4324,6.5946,3.1351,6.4324,4.5946,7.1351,-9.5676,4.5946,7.1351,6.4324,4.5946,7.1351,-9.5676,4.5946,3.1351,6.4324,4.5946,-0.8649,2.4324,4.5946,1.1351,-9.5676,4.5946,-2.8649,-9.5676,4.5946,-2.8649,2.4324,4.5946,-0.8649,2.4324,4.5946,-2.8649,-9.5676,4.5946,1.1351,6.4324,4.5946,1.1351,-9.5676,4.5946,-0.8649,2.4324,4.5946,-0.8649,4.4324,4.5946,1.1351,6.4324,4.5946,-0.8649,2.4324,4.5946,1.1351,6.4324,4.5946,-0.8649,4.4324,4.5946,-2.8649,6.4324,4.5946,-2.8649,6.4324,4.5946,-0.8649,4.4324,4.5946,-2.8649,4.4324,4.5946]
,"normals":[-0.3015,0.9045,0.3015,-0.5773,-0.5773,0.5773,-0.3015,-0.9045,0.3015,-0.3015,0.9045,0.3015,-0.5773,0.5773,0.5773,-0.5773,-0.5773,0.5773,-0.5773,0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,-0.3015,0.9045,-0.3015,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.3015,0.3015,0.9045,-0.3015,0.3015,-0.9045,-0.5773,-0.5773,-0.5773,-0.3015,-0.3015,0.9045,-0.3015,0.3015,0.9045,-0.5773,0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,-0.5773,0.5773,0.5773,-0.5773,-0.5773,0.5773,-0.3015,0.9045,0.3015,-0.5773,-0.5773,0.5773,-0.3015,-0.9045,0.3015,-0.3015,0.9045,0.3015,-0.5773,0.5773,0.5773,-0.5773,-0.5773,0.5773,-0.5773,0.5773,-0.5773,-0.3015,-0.9045,-0.3015,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,-0.3015,0.9045,-0.3015,-0.3015,-0.9045,-0.3015,-0.5773,0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,-0.5773,0.5773,0.5773,-0.5773,-0.5773,0.5773,0.9045,-0.3015,-0.3015,0.5773,0.5773,-0.5773,0.5773,-0.5773,-0.5773,0.5773,0.5773,0.5773,0.5773,0.5773,-0.5773,0.9045,-0.3015,-0.3015,0.5773,0.5773,0.5773,0.9045,-0.3015,-0.3015,0.5773,-0.5773,0.5773,0.5773,-0.5773,0.5773,0.9045,-0.3015,-0.3015,0.5773,-0.5773,-0.5773,0.5773,-0.5773,0.5773,0.3015,0.9045,0.3015,0.3015,-0.9045,0.3015,0.5773,0.5773,0.5773,0.3015,0.9045,0.3015,0.5773,-0.5773,0.5773,0.5773,-0.5773,-0.5773,0.3015,-0.9045,0.3015,0.5773,-0.5773,-0.5773,-0.3015,-0.9045,-0.3015,-0.3015,-0.9045,0.3015,0.3015,-0.9045,0.3015,-0.3015,-0.9045,-0.3015,0.5773,-0.5773,0.5773,0.5773,-0.5773,-0.5773,0.3015,-0.9045,0.3015,-0.3015,-0.9045,0.3015,-0.3015,-0.9045,0.3015,-0.3015,-0.9045,-0.3015,0.3015,-0.9045,0.3015,-0.3015,-0.9045,0.3015,-0.3015,-0.9045,-0.3015,-0.5773,-0.5773,0.5773,-0.5773,-0.5773,0.5773,-0.3015,-0.9045,0.3015,-0.3015,-0.9045,0.3015,0.5773,-0.5773,0.5773,0.3015,-0.9045,0.3015,-0.5773,-0.5773,0.5773,-0.3015,-0.9045,-0.3015,0.5773,-0.5773,-0.5773,0.9045,-0.3015,-0.3015,0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.3015,-0.3015,0.9045,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.3015,0.3015,-0.9045,-0.3015,0.9045,-0.3015,-0.5773,0.5773,-0.5773,-0.3015,0.3015,-0.9045,-0.3015,0.3015,0.9045,-0.3015,0.9045,-0.3015,-0.3015,0.3015,0.9045,-0.3015,0.9045,0.3015,-0.3015,0.9045,-0.3015,-0.3015,0.9045,-0.3015,-0.3015,0.9045,0.3015,-0.5773,0.5773,0.5773,-0.3015,0.3015,0.9045,-0.5773,0.5773,0.5773,-0.3015,0.9045,0.3015,-0.3015,0.9045,-0.3015,-0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,-0.3015,0.9045,-0.3015,-0.5773,0.5773,-0.5773,0.5773,0.5773,-0.5773,0.3015,0.9045,0.3015,-0.3015,0.9045,-0.3015,0.3015,0.9045,0.3015,-0.3015,0.9045,0.3015,-0.3015,0.9045,-0.3015,0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,0.3015,0.9045,0.3015,-0.3015,0.9045,-0.3015,-0.3015,0.9045,0.3015,-0.5773,0.5773,0.5773,-0.5773,0.5773,0.5773,-0.3015,0.9045,0.3015,-0.3015,0.9045,-0.3015,-0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,0.3015,0.9045,0.3015,-0.5773,0.5773,0.5773,-0.3015,-0.9045,-0.3015,-0.5773,0.5773,-0.5773,-0.3015,-0.9045,-0.3015,-0.5773,0.5773,-0.5773,0.5773,-0.5773,-0.5773,-0.3015,0.3015,-0.9045,-0.5773,-0.5773,-0.5773,-0.3015,0.3015,-0.9045,-0.5773,0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,-0.5773,0.9045,-0.3015,-0.3015,-0.3015,0.3015,-0.9045,0.9045,-0.3015,-0.3015,-0.5773,-0.5773,-0.5773,-0.3015,0.3015,-0.9045,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,0.5773,-0.5773,-0.5773,0.5773,0.5773,-0.5773,-0.5773,0.5773,-0.5773,-0.5773,0.5773,0.5773,-0.3015,-0.9045,0.3015,-0.5773,-0.5773,0.5773,-0.3015,0.9045,0.3015,-0.3015,-0.9045,0.3015,-0.5773,0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,-0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,0.3015,0.9045,0.3015,0.5773,-0.5773,0.5773,0.5773,0.5773,0.5773,0.5773,-0.5773,0.5773,0.3015,0.9045,0.3015,-0.3015,0.3015,0.9045,-0.3015,-0.9045,0.3015,-0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,-0.3015,0.3015,0.9045,-0.5773,-0.5773,0.5773,-0.3015,0.9045,0.3015,-0.3015,-0.9045,0.3015,-0.3015,0.3015,0.9045,-0.3015,-0.3015,0.9045,-0.3015,0.9045,0.3015,-0.3015,0.3015,0.9045,-0.3015,0.9045,0.3015,-0.3015,-0.3015,0.9045,-0.5773,0.5773,0.5773,-0.5773,0.5773,0.5773,-0.3015,-0.3015,0.9045,-0.5773,-0.5773,0.5773]
,"uvs":[0.4001,0.6668,0.4999,0.8331,0.4999,0.6668,0.4001,0.6669,0.4001,0.8332,0.4999,0.8332,0.4001,0.6668,0.4999,0.8331,0.4999,0.6668,0.4001,0.6669,0.4001,0.8332,0.4999,0.8332,0.6001,0.3334,0.6999,0.5414,0.6999,0.3334,0.6001,0.3336,0.6001,0.5416,0.6999,0.5416,0.4001,0.6668,0.4999,0.8331,0.4999,0.6668,0.4001,0.6669,0.4001,0.8332,0.4999,0.8332,0.4001,0.6668,0.4999,0.8331,0.4999,0.6668,0.4001,0.6669,0.4001,0.8332,0.4999,0.8332,0.4001,0.6668,0.4999,0.8331,0.4999,0.6668,0.4001,0.6669,0.4001,0.8332,0.4999,0.8332,0.4001,0.6668,0.4999,0.8331,0.4999,0.6668,0.4001,0.6669,0.4001,0.8332,0.4999,0.8332,0.4999,0.8331,0.4001,0.6668,0.4999,0.6668,0.4001,0.8331,0.4001,0.6668,0.4999,0.6945,0.1001,0.8333,0.2001,0.6251,0.8998,0.8333,0.6002,0.6666,0.6999,0.4724,0.6999,0.6666,0.4999,0.8331,0.4001,0.6668,0.4999,0.6668,0.4001,0.8332,0.4001,0.6669,0.4999,0.8332,0.4001,0.6668,0.44,0.8332,0.4001,0.6668,0.4999,0.7334,0.4334,0.8332,0.4001,0.8332,0.4998,0.667,0.4001,0.8332,0.4001,0.6669,0.4999,0.8332,0.4999,0.7223,0.4002,0.8331,0.4999,0.6669,0.4001,0.6668,0.4001,0.8332,0.4001,0.6669,0.4999,0.8332,0.4999,0.8332,0.4001,0.8332,0.4999,0.6669,0.4001,0.8332,0.4001,0.6669,0.4999,0.8332,0.4001,0.6668,0.4001,0.6668,0.4001,0.8332,0.4001,0.6669,0.4999,0.8332,0.4001,0.6668,0.4001,0.8332,0.4001,0.6669,0.4999,0.8332,0.4001,0.6668,0.4999,0.8331,0.4999,0.6668,0.4001,0.6668,0.4001,0.8332,0.4999,0.7334,0.4002,0.8331,0.4999,0.7223,0.4999,0.6669,0.4001,0.6669,0.4001,0.8332,0.4999,0.8332,0.4001,0.8332,0.4999,0.8332,0.4999,0.6669,0.4001,0.6668,0.4999,0.8331,0.4999,0.6668,0.4999,0.8331,0.4999,0.6668,0.4001,0.6668,0.45,0.8331,0.4999,0.6945,0.4002,0.8332,0.45,0.8332,0.4999,0.667,0.4001,0.6669,0.4001,0.8332,0.4999,0.8332,0.45,0.6669,0.4001,0.8332,0.4999,0.8332,0.4999,0.8331,0.4999,0.6668,0.4001,0.6668,0.4999,0.8331,0.4999,0.6668,0.4001,0.6669,0.4999,0.8332,0.4001,0.6668,0.4999,0.8331,0.4001,0.6669,0.4999,0.8332,0.4001,0.6668,0.48,0.8331,0.4999,0.6668,0.4001,0.8332,0.4999,0.8332,0.4999,0.6669,0.6999,0.6665,0.6999,0.4723,0.6001,0.5001,0.6001,0.3332,0.6999,0.3332,0.6999,0.1669,0.4001,0.6668,0.4999,0.8331,0.4001,0.6669,0.4999,0.8332,0.4001,0.6668,0.4999,0.8331,0.4001,0.6669,0.4001,0.8332,0.4999,0.8332,0.4999,0.8331,0.4001,0.6668,0.4999,0.6668,0.4001,0.8332,0.4001,0.6669,0.4999,0.8332,0.4999,0.8331,0.4001,0.6668,0.4999,0.6668,0.4001,0.6669,0.4999,0.8332,0.4999,0.8331,0.4001,0.6668,0.4001,0.8332,0.4001,0.6669,0.4999,0.8332,0.45,0.8331,0.4001,0.6668,0.4999,0.6668,0.4999,0.8332,0.4001,0.8332,0.4999,0.6669,0.4001,0.8332,0.4001,0.6668,0.4999,0.7916,0.4999,0.75,0.4002,0.8331,0.4999,0.6669,0.4001,0.8332,0.45,0.6669,0.4999,0.8332,0.4999,0.8331,0.4001,0.6668,0.4999,0.6668]
,"indices":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,31,60,32,61,62,63,64,65,66,67,68,69,70,71,72,1,73,2,74,75,76,77,78,79,80,81,82,37,83,38,7,84,8,85,86,87,19,88,20,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,43,110,111,112,113,114,115,116,117,118,119,120,121,122,123,55,124,125,126,127,128,129,57,130,131,132,38,133,34,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,20,149,10,150,151,152,8,153,154,155,156,157,158,159,160,161,162,163,164,57,165,166,167,168,56,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189]
,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":190,"indexStart":0,"indexCount":210}]
,"instances":[]}

 

combined.blend

Share this post


Link to post
Share on other sites

Hi Kev - welcome to the forum :)

I took a quick look at your model - and have a question.

How did you actually go about parenting the meshes to the bones? When I look at each mesh for vertex groups (the triangle icon in the Properties panel) there are no vertex groups. I would expect to see vertex groups for each bone name.

And I would apply the scale for each of your meshes.

cheers, gryff :)

Share this post


Link to post
Share on other sites

Hi gryff.

I do the following
Object Mode:
 *Select mesh. -> shift select bone -> ctrl P -> set parent to bone.
heres a gif demonstarting:

parent.gif

 

Quote

And I would apply the scale for each of your meshes.

How do I do this? I'm not proficient in blender. Is there any best practice guide for exporting to babylon? Like "how to blender your model for babylon"

Share this post


Link to post
Share on other sites

Kev, can you post a blend file with the textures packed in it?

File->External Data->Pack All Into Blend. Save that file then post here.

And to apply scale Select a mesh in Object mode then

Object-> Apply ->Scale

But don't spend time doing that for now as there are going to be issues with mesh normals to.

Did you build this character ?

And just to be on the same page - what version of Blender (I have 18 different versions installed on my PC) and what version of the BJS exporter?

cheers, gryff :)

Share this post


Link to post
Share on other sites

@gryff Thanks for you support on this

attached is the packed blend file

 

Quote

Did you build this character ?

Not originally. I got it from http://opengameart.org/ it was originally a static voxel file. I cut it up into individual meshes in VoxelShop and imported and rigged in blender.

Blender: v 2.76

BJSAddon: v 4.5.1

Let me know if you need any other info

 

packed.blend

Share this post


Link to post
Share on other sites

TY kev. I exported the character with the textures to an empty directory, then loaded the .babylon file and textures into the BJS sandbox and clicked on the button that looks like a dial with a needle.

Then in the "Options", I checked the "Meshes Tree" box. A new panel pops up - listing all the meshes :) So the issue is not "Missing Meshes".

You should try it on your computer.

The issue is one or more of these mesh scale, mesh origins and your rig. The meshes are all on top of each other. Uncheck all the meshes in the "Meshes Tree" panel - then recheck them one at a time.

Will think about it. But in the meantime a question - do you have to use that model, both meshes and rig?

cheers, gryff :)

 

Share this post


Link to post
Share on other sites

@gryff

30 minutes ago, gryff said:

Then in the "Options", I checked the "Meshes Tree" box. A new panel pops up - listing all the meshes :) So the issue is not "Missing Meshes".

You should try it on your computer.

 
 

I do see all the meshes overlapping in the BJS sandbox, good find. I suspect the babylon export is setting the meshes origin to the armatures origin

in:Screenshot 2016-05-30 12.17.48.png

maybe I could re-parent the meshes to the bones and do "Bone Relative" ?

Screenshot 2016-05-30 12.23.43.png
 

30 minutes ago, gryff said:

But in the meantime a question - do you have to use that model, both meshes and rig?

I"m working on building a workflow pipeline for converting Voxel models into animated, modular meshes. I can tweak this blender model and rig anyway to achieve that goal.

Share this post


Link to post
Share on other sites

Well @kevzettler I've been looking at your rig and I am having difficulty understanding what you are doing. The rig has 10 bones that have IK constraints (yellow bones in pose mode). When I look at the constraint properties of them all I see that you only have variation in the chain length - nothing about targets. (First image below).

The second image below is of a model created by Sebastian Lague and posted on Blendswap. It is a CC-BY model. Note how he rigs the legs. He has created two IK bones to drive the legs (purple colour and labeled L and R). Above those IK bones are two bones that that have the IK constraints (only one for each leg) - compare his IK constraint properties with yours.

I downloaded that model this afternoon , did a little clean up and gave it a very simple walk animation using IK. Robot

So I do think you need to sort out your rig  and get some sign of animation in BJS.

cheers, gryff

constraint1.png

ikbones1.png

Share this post


Link to post
Share on other sites

@kevzettler Here is my cleaned up blend file of Sebastian Lague's robot model.

And you might want to view these video tutorials that Sebastian Lague has on YouTube to understand how he rigs models.

Get your Robot animating - then we can look at the scale, origin issues if the bits of your robot are flying all over the place ;)

cheers, gryff :)

Share this post


Link to post
Share on other sites

 

 

 

Quote

Get your Robot animating - then we can look at the scale, origin issues if the bits of your robot are flying all over the place

@gryff I'm confused my blend file has a key frame animation of the robot taking a step with some IK constraints. I didn't flesh out the animation yet because it would be a lot of work before I even knew if babylonjs would be a viable engine.

see this gif:

 step.gif

What I'm hearing here is that the BJSExporter has a very particular set of expectations for how a model is rigged and animated with Blender. Are these expectations documented anywhere for me to follow? Sebastian Lague's tutorials look generic to Blender. Is there any official "How to rig a blender model for babylonjs" tutorials?

Share this post


Link to post
Share on other sites

Hi @kevzettler -

Have you tried exporting the scene without parenting any meshes to any bones?  This should provide you with more info to troubleshoot the problem. Some applications automatically set the properties for meshes parented to bones to be flagged as skeleton objects - which might show only joint centers when exported to non-native formats such as .babylon. I've experienced this when importing meshes parented to bones in UE4. @JCPalmer would most likely be the best person to answer this, however if this is the case, then you may need to change the properties in Blender for the child meshes after parenting. However, I don't know if this is the issue or how it might be corrected if it indeed is the problem. If this is the case, then @gryff would probably be the best person to ask how to change the properties of a mesh flagged as a skeleton object (or armature.)

DB

Share this post


Link to post
Share on other sites

Well @kevzettler it has something to do with the rigging - but as yet I have been unable to figure out what

But I have been able to duplicate it with another model from a completely different source and the scale and stuff are all fine. See image below.

In the browser (left, all meshes buried inside the head) and in Blender (right). And it looks like it is rotated in the camera  too.:o

I will keep looking at it with this new model - a bit simpler than yours;)

cheers, gryff :)

spocjk1.png

Share this post


Link to post
Share on other sites

Well @kevzettler, while having a glass of wine I started experimenting with the simple model (only 6 bones).

So here is the start no changes - cubee1

My first experiment - essentially getting rid of the "set parent to bone" method and replacing it with "automatic weight painting" : cubee2

Now we see all the parts:) - but the UV mapping has gone adrift :angry:

Both scenes are using the same camera - yet the first one we are viewing the bottom of the meshes :o

It would seem that the BJS exporter does not like "set parent to bone" method  of creating a rig.

Will keep thinking.

As @dbawel said above, maybe @JCPalmer  might have some thoughts.

And credit to Ian Scott for the simple model.

cheers, gryff :)

Share this post


Link to post
Share on other sites

Ok, I only looked at the original post in detail.  Looks like parenting a mesh to a bone might be doable in Blender, but that process pipeline looks like is not resulting in the findArmature() API call returning the armature the bone is apart of.

Why not parent the mesh to the whole armature like everyone else? If a mesh is only influenced by one bone weight painting should be easy.  Then just move the armature to a separate layer, the spray booth.  Move each mesh to that layer one by one, and spray it completely red for the wanted bone.

FYI, using the findArmature() method means that a mesh does not need to be parented to an armature (since 6/2015 I think), though that is usually how the relationship is initially established.  This is critical for the animation extension I am working on, because the parent relationship can then be used for something else. 

I am merging all the meshes that participate in the FACE shape key group (tongue, teeth, eye browses, eye lashes) to the body.  The body mesh is the one which has the beforerender in BJS, where the shape key group(s) (FACE, WINK, L_HAND, R_HAND) queues are processed, along with the skeleton pose interpolator queue.

Root bone translation /rotation from the poses are applied to the mesh.  If the other meshes were not parented to the one with the before render, then they would get left behind.  Here is the body mesh, "Jim:Proxy", with children for shoes, clothes, hair, eyes:

Selection_201.png

Share this post


Link to post
Share on other sites

@kevzettler and @JCPalmer :

I took a look at  the differences between the "set parent to bone" and the "automatic weight painting" - image below

A - no weightpainting

B - no vertex groups created

C - the mesh has no armature modifier

It seems that all the "set parent to bone" does is create a a child parent relation ship between the mesh and the bone.

cheers, gryff :)

selectdata.png

Share this post


Link to post
Share on other sites

@gryff @JCPalmer

Thanks for the help investigating this.

I am not committed to the 'set parent to bone' rigging method.

My understanding from this thread is that; BJSexporter expects meshes to be children of the armature. Meshes should be vertex painted to bones. Is that correct?

and @JCPalmer is saying, In my case this should be easy because I have a 1 to 1 mapping of meshes and bones.

Share this post


Link to post
Share on other sites

The "BJSexporter expects meshes to be children of the armature" part is not totally accurate.  It is expected that a mesh has an armature modifier.  You can do this by either parenting to an armature, or you might add it directly on modifiers tab of the mesh (c in gryff's screen print).

As you are going to do all the weights with painting, might not make much difference.

If you need to use the parent for another purpose, you can still use the parenting method to armature first, change to a different parent later without losing the modifier.

Share this post


Link to post
Share on other sites

Hello i know not exactly whats going on, i got the same problem with setting objects parent they used to appear in babylon engine at a different position.
I downloaded your first blender file and mess round with it, it kind of works, - as i said i got no straightaway answer, but if you scale your model or, do a new transformation 
and apply this transformation >Ctrl+A>Apply Transformation. It shows up in babylon. I got this "issue" with simple meshes in blender ad to parent. Maybe BABYLON.ImportMesh reset position or reset World Matrix at all.
Everything works also with bones, they only kind of offscreen.Maybe its a bug in blender :)

Good Luck

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.