Search the Community

Showing results for tags 'skeleton'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 65 results

  1. Hi ! is there is possible to make smooth skeletal animation transition between two animations,,, from "IDDLE" to "RUN" ,,,,, from "RUN" to iddle also I would need to get current animation frame, or set animation frame.
  2. Hi People, I have imported a rigged model (dude model in my project, the method scene.beginAnimation() works so i suppose that the skeleton is already attached to the mesh. I want to rotate a bone of this skeleton but i can't reach this goal The code that i used is the following: engine.runRenderLoop(function () { var bone = scene.getSkeletonByName("Skeleton0").bones[20]; //I've tried different bones var boneMat = bone.getWorldMatrix(); BABYLON.Matrix.RotationXToRef(0.1, boneMat); bone.updateMatrix(boneMat); scene.render();}I have no result, do you have some hint?
  3. Hello, I have a character that was rigged using mixamo's auto-rigger (25 bones). The animation works fine in blender (2.72b) but when I export the babylon file and bring into the sandbox I can see the character but he doesn't move. Attached babylon files. Thanks!
  4. Hello, all. I want to be able to have two variables: startFrame and endFrame; and I want them to contain the starting and ending animation key frames respectively that I set up in Blender. How is that done? Where can I find that information inside of Babylon? Many thanks in advance!
  5. thank you in advance, I am trying to control through variables like position and scaling... a rigged character with multiple meshes in a ,babylon file,"which was exported with animations from blender". The model is made up of three base objects "Creature", "eye", and "eye2". i need to be able to control the three meshes togeither as a whole. here is a clip of my code refering to this.... // Load character object BABYLON.SceneLoader.ImportMesh("", "models/", "creature.babylon", scene, function (meshes) { var c = meshes[0]; c.isVisible = true; c.scaling = new BABYLON.Vector3(0.1,0.1,0.1); c.position = new BABYLON.Vector3(0,3,0); //c.renderingGroupId = 2; c.checkCollisions = true; CREAT = c; }); window.addEventListener("keydown", function (evt) { switch (evt.keyCode) { case 67: createCreat(); break; default: break; } }); var createCreat = function () { var posX = LANES_POSITIONS[Math.random()]; var c2 = CREAT.clone( =; c2.isVisible = true; c2.position = new BABYLON.Vector3(Math.random() * 100- 50, 3, Math.random() * 100 - 50); };when i load this with the meshes[0] selection it only effects the eye... [1] = eye2... [2] = Creature... how can i select all 3 at once? i will need to be able to do this for the animation as well. ty for any help you can give.
  6. Hi, I'm trying to debug why my mesh is not getting deformed as is should be, and am trying to work back to understand which transformation of the vertex is causing the distortion. On a bone i can see what appear to be 4 transformation matrices. Can anyone explain the difference between: •base matrix •absolute matrix •matrix •world transform I don't entirely understand which of these gets used by a mesh vertex which is weighted to it?
  7. Hello again.... i tried to make a simple animation in Blender to understand how skeletons/bones work in Babylon... and of course, the bottom fell out. it's just a drop dead simple bending cylinder with two bones and three key frames. i can't understand why it doesn't render correctly. i believe it's just me and my lack of knowledge, but nevertheless, i need some guidance. here's the animation: it's just a simple dual viewport scene, one camera set up at left and second cam at front of the model. everything loads & works ok, no errors and such -- but the animation just looks substantially different than in the original blender file: would be nice to know what's going on.
  8. Hi everyone! I need you again ! So my problem : I have a scene (and a dream too...but it's not the question actualy... ....) Here, a .gif of my scene : Like you can see, I play animations of basics meshes on html select onchange event without difficulties...But when I try to play a skeleton animation with the last select html tag with the onchange event, I get an error in console like this : If I play my animation in the callback function parameter of the "Scene.Loader.ImportMesh(...)" function, there is no problem....I tried to create a "homemade" callback function but I had the same result... Here my scene code : 'use strict';// A voir pour popup patiente//var canvas = document.getElementById('myCanvas');//var context = canvas.getContext('2d');//var imageObj = new Image();////imageObj.onload = function() {//context.drawImage(imageObj, 69, 50);//};//imageObj.src = '';var scene;var engine;var posXSkel = 0;var posYSkel = -3;var posZSkel = 5;var objBrasSqueletteSupportExterne;var objBrasSqueletteSupportInterne;var objBrasSquelette;var objBrasProgramationSupportExterne;var objBrasProgramationSupportInterne;var objBrasProgramation;var objBrasPieceSupportExterne;var objBrasPieceSupportInterne;var objBrasPieceSupport;var objBrasPieceOutil;var objCapot;var objTrappeContour;var drapAnimationStart; var nameLastSkelAtelier;var tabMeshImportes = [];var tabSkelImportes = [];var tabAnimationSquelette = [];var tabAnimationPiece = [];var objAnimTest;//Start the demofunction runVisuAtelier(canvasId,listeParamsSkel) { var canvas = document.getElementById(canvasId); engine = new BABYLON.Engine(canvas, true); nameLastSkelAtelier = ""; scene = new BABYLON.Scene(engine); BABYLON.SceneLoader.Load("", "SceneAtelier.babylon", engine, function (newScene) { // Wait for textures and shaders to be ready //newScene.executeWhenReady(function () { // Attach camera to canvas inputs newScene.activeCamera.attachControl(canvas); // Get the scene's objects objCapot = newScene.getMeshByName("MeshCapotTrappeAtelier"); objBrasSqueletteSupportExterne = newScene.getMeshByName("MeshSupportExterneBrasSkeletteAtelier"); objBrasSqueletteSupportInterne = newScene.getMeshByName("MeshSupportInterneBrasSkeletteAtelier"); objBrasSquelette = newScene.getMeshByName("MeshAimantBrasSkeletteAtelier"); objBrasProgramationSupportExterne = newScene.getMeshByName("MeshSupportExterneBrasProgramationAtelier"); objBrasProgramationSupportInterne = newScene.getMeshByName("MeshSupportInterneBrasProgrammationAtelier"); objBrasProgramation = newScene.getMeshByName("MeshCasqueProgramationAtelier"); objBrasPieceSupportExterne = newScene.getMeshByName("MeshSupportExterneBrasPieceAtelier"); objBrasPieceSupportInterne = newScene.getMeshByName("MeshSupportInterneBrasPieceAtelier"); objBrasPieceSupport = newScene.getMeshByName("MeshBrasPieceSupportAtelier"); objBrasPieceOutil = newScene.getMeshByName("MeshBrasPieceOutilsAtelier"); objTrappeContour = newScene.getMeshByName("MeshContourCapotAtelier"); // In default, the scene plays all animations newScene.stopAnimation(objCapot); newScene.stopAnimation(objBrasSqueletteSupportExterne); newScene.stopAnimation(objBrasSqueletteSupportInterne); newScene.stopAnimation(objBrasSquelette); newScene.stopAnimation(objBrasProgramationSupportExterne); newScene.stopAnimation(objBrasProgramationSupportInterne); newScene.stopAnimation(objBrasProgramation); newScene.stopAnimation(objBrasPieceSupportExterne); newScene.stopAnimation(objBrasPieceSupportInterne); newScene.stopAnimation(objBrasPieceSupport); newScene.stopAnimation(objBrasPieceOutil); newScene.stopAnimation(objTrappeContour); // Set up the select tag initSelectPackPiecesAte(); initSelectAnimaSkelAte(); initSelectAnimaPackPieceAte(); //scene.beginAnimation(target, from, to, loop, speedRatio, onAnimationEnd) //newScene.beginAnimation(objCapot, 140, 160, true, 1.0, function(){}); scene = newScene; createSkybox(); createAllSkeletons(listeParamsSkel); drapAnimationStart = false; // Once the scene is loaded, just register a render loop to render it engine.runRenderLoop(function() { scene.render(); }); //}); });}//Create the skyboxfunction createSkybox() { var sMaterial = new BABYLON.StandardMaterial("skyboxMaterialMagasin", scene); sMaterial.backFaceCulling = false; //sMaterial.reflectionTexture = new BABYLON.CubeTexture("images/skybox/skybox", scene); sMaterial.reflectionTexture = new BABYLON.CubeTexture("../../Bll/MoteurJeu/Img/IMG_Decor/Skybox/skyboxArene", scene); sMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE; var skybox = BABYLON.Mesh.CreateBox("SkyboxMagasin", 50, scene); skybox.material = sMaterial; skybox.checkCollisions = true; }// Set the position of meshfunction setupMeshWithPosFix(obj,meshes,posX,posY,posZ){ obj = meshes[0]; obj.position = new BABYLON.Vector3(posX,posY,posZ); return obj;}// Create the skeleton into the cylinderfunction createSkeleAtelier(tabParamsSkel){ if(tabParamsSkel != null) { var skelAtelier; var nomSkelAtelier = tabParamsSkel[0].NomBlender; //var chemVersFichierSkelAtelier = tabParamsSkel[0].ChemVersFichier; //var nomFichierSkelAtelier = tabParamsSkel[0].NomFichier; if(nameLastSkelAtelier != "") { skelAtelier = scene.getMeshByID(nameLastSkelAtelier); if(skelAtelier != null) { scene.beginAnimation(objCapot, 500, 540, false, 1.0, function(){}); skelAtelier.position = new BABYLON.Vector3(posXSkel, posYSkel-10, posZSkel-2.0); if(tabMeshImportes.length > 0) { var i = 0; var nbMeshesImportes = tabMeshImportes.length; for(i=0;i<nbMeshesImportes;i++) { var mesh = scene.getMeshByID(tabMeshImportes[i]); mesh.position = new BABYLON.Vector3(posXSkel, posYSkel-10, posZSkel-2.0); } } } } // Charger le squelette de démo pour l'aperçu de la pièce //skelAtelier = scene.getMeshByName(nameLastSkelAtelier); //skelAtelier = scene.getMeshByName(nomSkelAtelier); //skelAtelier = scene.getSkeletonByName("Armature"); //skelAtelier = scene.getSkeletonById(nomSkelAtelier); skelAtelier = scene.getMeshByID(nomSkelAtelier); // If mesh already exists if(skelAtelier != null) { // Jouer l'animation d'entrée du squelette scene.beginAnimation(objBrasSqueletteSupportExterne, 0, 100, false, 1.0, function(){}); scene.beginAnimation(objBrasSqueletteSupportInterne, 0, 100, false, 1.0, function(){}); scene.beginAnimation(objBrasSquelette, 0, 100, false, 1.0, function(){}); scene.beginAnimation(objTrappeContour, 0, 100, false, 1.0, function(){ scene.beginAnimation(objTrappeContour, 100, 190, false, 1.0, function(){}); scene.beginAnimation(objBrasSquelette, 100, 190, false, 1.0, function(){}); scene.beginAnimation(objBrasSqueletteSupportInterne, 100, 190, false, 1.0, function(){}); scene.beginAnimation(objBrasSqueletteSupportExterne, 100, 190, false, 1.0, function(){}); skelAtelier.position = new BABYLON.Vector3(posXSkel, posYSkel+3.5, posZSkel-2.0); }); } nameLastSkelAtelier = nomSkelAtelier; }}// Load all of the skeleton at the beginning of in the scenefunction createAllSkeletons(listeParamsSkel){ var tabParamsSkel = eval(listeParamsSkel); if(tabParamsSkel != null) { var i; for (i=0;i<tabParamsSkel.length;i++) //for (i=0;i<1;i++) // for test the first skeleton only { var skelAtelier; var nomSkelAtelier = tabParamsSkel[i].NomBlender; var chemVersFichierSkelAtelier = tabParamsSkel[i].ChemVersFichier; var nomFichierSkelAtelier = tabParamsSkel[i].NomFichier; BABYLON.SceneLoader.ImportMesh(nomSkelAtelier, "../../Bll/MoteurJeu/" + chemVersFichierSkelAtelier, nomFichierSkelAtelier, scene, function (newMeshesSkel,particleSystems, skeletons) { // -10 in y to load the skeleton under the floor and +3.5 in final position skelAtelier = setupMeshWithPosFix(skelAtelier,newMeshesSkel,posXSkel, posYSkel-10, posZSkel-2.0); //skelAtelier = setupMeshWithPosFix(skelAtelier,newMeshesSkel,skeletons,posXSkel, posYSkel+3.5, posZSkel-2.0); // Animation of skeleton is good here !!!! //objAnimTest = scene.beginAnimation(skeletons[0], 10, 55, true, 1.0, function(){}); //objAnimTest.stop(); }); tabSkelImportes.push(tabParamsSkel[i]); } }}// Create the device on the robotfunction createPieceAtelier(tabParamsPiece){ if(tabParamsPiece != null) { // Play the scene animations... scene.beginAnimation(objBrasPieceSupportExterne, 200, 270, false, 1.0, function(){}); scene.beginAnimation(objBrasPieceSupportInterne, 200, 270, false, 1.0, function(){}); scene.beginAnimation(objBrasPieceSupport, 200, 270, false, 1.0, function(){}); scene.beginAnimation(objBrasPieceOutil, 200, 270, false, 1.0, function(){ var i; var nbPieces = tabParamsPiece.length; for(i=0;i<nbPieces;i++) { var nomBlenderPiece = tabParamsPiece[i].NomBlender; var chemVersFichierPiece = tabParamsPiece[i].ChemVersFichier; var nomFichierPiece = tabParamsPiece[i].NomFichier; var piece; var pos = tabMeshImportes.indexOf(nomBlenderPiece); if(pos == -1) { // Import the mesh BABYLON.SceneLoader.ImportMesh(nomBlenderPiece, "../../Bll/MoteurJeu/" + chemVersFichierPiece, nomFichierPiece, scene, function (newMeshes) { piece = setupMeshWithPosFix(piece,newMeshes,posXSkel, posYSkel+3.5, posZSkel-2.0); = nomBlenderPiece; }); tabMeshImportes.push(nomBlenderPiece); } else { var mesh = scene.getMeshByID(tabMeshImportes[pos]); if(mesh != null) mesh.position = new BABYLON.Vector3(posXSkel, posYSkel+3.5, posZSkel-2.0); } } scene.beginAnimation(objBrasPieceOutil, 270, 340, false, 1.0, function(){}); scene.beginAnimation(objBrasPieceSupport, 270, 340, false, 1.0, function(){}); scene.beginAnimation(objBrasPieceSupportInterne, 270, 340, false, 1.0, function(){}); scene.beginAnimation(objBrasPieceSupportExterne, 270, 340, false, 1.0, function(){}); }); }}// Create the animation of the skeletonfunction createAnimation(idSkel,idAnimationSkel){ if(!drapAnimationStart) { var i = 0; var skelAtelier; var keyDeb; var keyFin; var nbSkel = tabSkelImportes.length; for(i=0;i<nbSkel;i++) { if(tabSkelImportes[i].ID == idSkel) { var nomSkel = tabSkelImportes[i].NomBlender; skelAtelier = scene.getMeshByID(nomSkel); if(skelAtelier != null) { // Find keyframes of the animation var j = 0; var nbAnimsSkel = tabAnimationSquelette.length; for(j=0;j<nbAnimsSkel;j++) { if(tabAnimationSquelette[j].ID == idAnimationSkel) { keyDeb = tabAnimationSquelette[j].KeyFrameDeb; keyFin = tabAnimationSquelette[j].KeyFrameFin; } } } } } if(!drapAnimationStart) { var objAnim = scene.beginAnimation(skelAtelier.skeleton, keyDeb, keyFin , false, 1.0, function(){ drapAnimationStart = false; }); drapAnimationStart = true; } //objAnimTest.restart(); //skelAtelier = scene.getSkeletonByName("Armature"); /* var objAnim = scene.beginAnimation(skelAtelier.skeleton, keyDeb, keyFin , false, 1.0, function(){ drapAnimationStart = false; }); drapAnimationStart = true; */ //test(retour2,skelAtelier.skeleton, keyDeb, keyFin ); // affiche 'Retour 2' //scene.render(); //scene.unregisterBeforeRender(function(){ //}); //scene.registerBeforeRender(function(){ /* if(!drapAnimationStart) { var objAnim = scene.beginAnimation(skelAtelier.skeleton, keyDeb, keyFin , false, 1.0, function(){ drapAnimationStart = false; }); drapAnimationStart = true; } */ //}); } }function addInTabAnimationSquelette(animationSkel){ tabAnimationSquelette.push(animationSkel);}function addInTabAnimationPiece(animationPiece){ tabAnimationPiece.push(animationPiece);}// Test of callback functionfunction retour2(lObjSkel,lImgeDeb,lImgeFin) { //alert('Retour 2'); if(!drapAnimationStart) { var objAnim = scene.beginAnimation(lObjSkel, lImgeDeb, lImgeFin, false, 1.0, function(){ drapAnimationStart = false; }); drapAnimationStart = true; } }function test(fct_retour,objSkel,imgDeb,imgFin) { fct_retour(objSkel,imgDeb,imgFin); // appel de la fonction} and here my onchange event function of the html select "Liste des Ids des packs de pieces" : function getValComboAnimationSkelAtelier(idDeComboSkel,idDeCombo){ // Get the skeleton var selectBox = document.getElementById(idDeComboSkel); var txtCombo = selectBox.options[selectBox.selectedIndex].textContent; var posBal = txtCombo.indexOf(':'); var idSkelStr = txtCombo.substr(0,posBal); // Get the num skeleton selectBox = document.getElementById(idDeCombo); txtCombo = selectBox.options[selectBox.selectedIndex].textContent; posBal = txtCombo.indexOf(':'); var idAnimationStr = txtCombo.substr(0,posBal); if(idAnimationStr != "") { createAnimation(idSkelStr.trim(),idAnimationStr.trim()); } }Anyone has an idea ??? Thanks !! Zino
  9. Hi Gentlemen! The question is in the title... Can I change the execution speed of an animation with/in Babylon? Let me explain : I have a skeleton imported from Blender in Babylon. This skeleton has many animations. In my game projet, I have many characters based on the same skeleton. So, characters all have the same animations. Now my problem : I would like to make animations be differents in playing although they have the same skeleton. Why? Because I have many animations which are the same except the speed execution between the different characters. Otherwise, I will have to make an animation by characters and I prefer factorize as possible my code... (Especially if the animation is the same!) Thank you for your opinion on this issue. Zino
  10. 2600 FREE bvh files babylon dev team, please integrate.bvh support to handle meshes with bones (bvh) For example: BABYLON.bvh.constrain(mesh, bendingStiffness[array], tolerance, scene)
  11. Hi, I'm trying to change a texture region attachment on a spine model. For example, change the haircut of a character. What is the best way to change a region attachment? I've tried to get the head slot (slot = Sp.skeleton.findSlot("head") )and use setAttchement on this slot, but i was only able to set an existing attachment (like put an arm instead of the haircuts). Anyway, if i change the TexturePacker texture, its not working because the texture dont fit with the spine project due to the non-existing images in the spine project. So i suppose that I need to create another texture with PackerTexture including all the possibles haircuts. But i wasn't able to change the texture of an attachment If you have any ideas, it wil help me Thanks
  12. Hi, I try, since yesterday, to start an animation loaded from Blender, but nothing appens. All my scene is loaded from blender. There's camera, lights, walls, a character with its rig, and an animation set for "walk". After reading this tutorial (, I decided to loop manually into scene.meshes to retreive the character, and attach the scene.skeleton[0] to it. I've checked that all vertex groups are ok in Blender, and that each vertex has maximum 4 bones influence (not so easy). The mesh _vertexBuffer has only color, normal and position, but doesn't have matrices weight or matrice indices. Is it the problem ? How can I generate this values ? Is there something to do in Blender to import them automatically ? Here's the light version of my code : <script>var canvas, engine, scene, player;function render(){ scene.render();}window.onload = function(){ canvas = document.getElementById("renderCanvas"); engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load("", "testroom.babylon", engine, function (nscene) { scene = nscene; scene.executeWhenReady(function () { for(var i=0,n=scene.meshes.length; i<n; i++) { if(scene.meshes[i].name=="player"){ player = scene.meshes[i]; player.skeleton = scene.skeletons[0]; } } scene.beginAnimation(player.skeleton,0,60,true,1.0); engine.runRenderLoop(render); }); });};</script>Thanks PS: Babylon is really great and has a good render engine. But it could be great to have an API and more examples when building a game from Blender. But well, it's still young and I think it will come after ^^
  13. Hi guys ! On the advice of Gwenael, I write this topic for my question... As the title say it, how can I modify a part or many parts of a mesh imported in Babylon.js linked to a skeleton with an another mesh without bone? An example ? Ok ... I have this mesh in Blender v2.67 : You can see the mesh linked to a skeleton composed of 3 bones... As you see it, the mesh moves with the skeleton... until this, all is ok ^^ ! Now an another mesh like this for example : A basic mesh without animation, nothing to say... So in my Babylon scene, I have this... (after import of my 2 files.babylon of course) And the result that I would like will be anything like this : I saw in tutorial that a skeleton have a bone array and a bone can "access" to his mesh linked...Gwenael talks me about "submeshes" too... but a example made by a competent person like ProfessorF, Gwenael or DeltaKosh will be more evident to understand I think : ) Thanks you for your help. P.S : If anyone want my Blender or Babylon files to go quickly in this research, I will send them.
  14. Hi everyone, First, thanks to Babylon.js!It has many potential! Now, my problem... I'm a programmer and I try to create a 3D game with Babylon.js on a wamp server and Blender v2.67. I'm learning how to create basic mesh and animation and how export it into Babylon.js. When I import a basic mesh (like a cube...) linked to many rotation keyframes (in blender...), there is no problem when playing animation in Blender and Babylon.The mesh spins well to the center of the mesh... See the files RotaInBlender.gif and RotaInBabylon.gif... In Blender : In Babylon : When I import the same mesh linked to a skeleton and repeat the process of the creation of the rotation keyframes (linked to the skeleton this time...),there is no problem in Blender but the animation in Babylon.js is not the same... See the files RotaInBlenderWithSkel.gif and RotaInBabylonWithSkel.gif... In Blender : In Babylon : It's like the mesh doesn't spin but turn around a new offset center but I don't understand because the center of the bone is the same that the mesh center in Blender! I see many options to repeat the process of the creation of the rotation keyframes in Blender with different properties "Rotation Mode" like : XYZ Euler, Axis, Quaternion(WXYZ)... but always the same result. What i'm doing wrong please ? I can send file .blend or .babylon if anyone want help me. Thanks you for your help, i real need it! PS : Sorry for my bad english, i'm French and it's my first forum...
  15. I would like to play with blender animations start, stop, forward and back. A link to my project.