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
  • 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 a way to extract a bone's World position? I need an actor to pick up a rock and throw it. ELI5, please!
  2. Hello everyone! I'm working on a BabylonJS project and having problems with the movement of the 3D-model. I have used tens of hours to find a solution with poor results. The projects goal is to get 3D-model/avatar move according to the movement data from Kinect-sensor. I'm using a C#-server to send Kinect data through WebSocket to JS and BabylonJS for visualization. The problem what I'm having is that I don't know how to correctly move the model. BJS documentation seems to focus only to ready-made animations and not to the manual deforming of meshes with skeletons. I've moved and deformed the skeleton in BJS, but cannot get the meshes to move with the skeleton. Everything works fine in Blender (moving the skeleton deforms the mesh), but not in BJS. I've also tried to make custom animations for the skeleton in BJS to animate the model frame by frame with the data, but it's so complex I'm having a hard time understanding it (with no proper tutorial). What is the correct way to manually deform models with skeletons in BabylonJS? If the right way is to make custom animations can you help me understand how to build an animation for a skeleton in BJS? (I'm familiar with the BJS tutorials and documentations for animating meshes with no skeletons). My previous post about the problem Here is a bit creepy custom animation I'm working on. (How to delete the ready-made animation?) Here is one debug-model I'm using. How to make skeleton animation from scratch if your model doesn't have one? Thank you for your help. Mazax
  3. 1) Is there a way to create animation ranges via blender? e.g. define there that between 50-100 is a "win" animation, instead of defining it in bjs as follows: skeleton.createAnimationRange("win", 50, 100); Maybe by exporting markers? 2) Is there a way to get the total frames of a skeleton in bjs?
  4. I have a model loaded from a .babylon file, which consists of several meshes, a matching skeleton with animations is also loaded from that same file. I'd like to create a clone of the whole model (meshes + skeleton), and be able to animate each clone separately. I iterate over the meshes with a simple FOR loop and clone them, so far everything works as expected. I clone the skeleton, however when I try to animate the clone using scene.beginAnimation(skeleton...) neither the cloned meshes nor the original meshes are animated. When I try to animate the original skeleton, the original meshes are animated successfully. Since my skeleton cloning is completely separate from the meshes cloning, I guess it makes sense, as they don't have references of each other. 1) Is there a way to pass the skeleton which meshes it should be attached to after cloning? (or the other way around - pass the cloned skeleton to the cloned meshes) Alternatively - Is there some way to clone the meshes and skeleton in a way that keeps the newly cloned meshes synced to the newly cloned skeleton? 2) Is it even necessary to clone the skeletons if I want different clones of the same model to be animated separately? 3) Does a skeleton have a function similar to mesh.createInstance()? For instance, if I call mesh.createInstance(), should I still call skeleton.clone() or does skeleton have a function similar to createInstance() for improved performance?
  5. I'd like to animate a rigged 3d model I'm loading from a .babylon file, as concluded in the previous topic: I read the following according to @JohnK's suggestion: I'm using blender. Does @JCPalmer's Blender Exporter export skeletons with animations created in blender? In other words, would I be able to simply animate a model in blender and then call scene.beginAnimation(skeleton...) to animate the loaded skeleton in bjs?
  6. Recently I need to produce about 5 minutes of animation(more than twenty dirfferent people perform this animation ),How to use babylonjs to achieve this goal. Currently think of two ways: use 3DMax to make whole animation, then import it.But the problem is data file is so big and how to achieve the goal of different people perform? animation split into a small module,then import them in turn,But question is How to control the order of each small module? Finally, What is a good way to achieve the goal of different people perform the same animation efficient´╝č Sincere thanks.
  7. Hello everyone! I have kind of a complicated question. I'm currently doing my thesis at uni, the topic being web based games (specifically 3d ones). I'm going to create a small multiplayer Bomberman clone and reflect the process on the thesis itself; what problems I had, how does the development compare to for example Unity etc. I have used Unity kind of a lot and know the basics of threejs. However, after many hours I decided to make the game with Babylon, since it seems to be more suitable for the task at hand. I have a strong web-development background, so the thesis pretty much gives me some time to learn more about game programming Ah yes the question itself, which is pretty much about setting up the project. I would like to have help with these areas: Using modern JavaScript, ES6 syntax and features for BabylonJS. Maybe load the modules using, for example, SystemJS. Is this a silly idea? Is it best to use, for example, Gulp for the deployment stuff, like minification? However, I have not found that many sample projects at all for the engine itself. Maybe I haven't digged far enough? If anyone has any useful links, sample projects or ideas to share with me I would be really blessed. Thank you in advance for reading my lengthy post
  8. I have a scene where I create a Sphere. I then use BABYLON.SceneLoader.Append to import a skeleton. I attach the sphere to one of the skeleton bones and it disappears. You can see this happening here: I can provide the full source if that would help. The source of the scene looks like: const canvas = document.getElementById('render-container'); const engine = new BABYLON.Engine(canvas, true); var scene = new BABYLON.Scene(engine); scene.clearColor = new BABYLON.Color3(0, 1, 0); // This creates and positions a free camera var camera = new BABYLON.FreeCamera("camera1", new BABYLON.Vector3(0, 5, -10), scene); camera.setTarget(BABYLON.Vector3.Zero()); camera.attachControl(canvas, false); // This creates a light, aiming 0,1,0 - to the sky. var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene); light.intensity = .5; // Let's try our built-in 'sphere' shape. Params: name, subdivisions, size, scene var sphere = BABYLON.Mesh.CreateSphere("sphere1", 16, 1, scene); sphere.position.y = 1; var skeletonPlaceholder = new BABYLON.AbstractMesh('', scene); function skeletonLoadHandler(scene){ var skeleton = scene.skeletons[0]; var viewer = new BABYLON.Debug.SkeletonViewer(skeleton, skeletonPlaceholder, scene); viewer.isEnabled = true; //enables skeleton animation sphere.attachToBone(skeleton.bones[1], skeletonPlaceholder); var anim = skeleton.beginAnimation("ArmatureAction.001", true, 1); } function loadProgressHandler(progress){ console.log("loading: ", progress); } engine.runRenderLoop(() => { scene.render(); }); window.addEventListener("resize", () => { engine.resize(); }); BABYLON.SceneLoader.ShowLoadingScreen = false; BABYLON.SceneLoader.Append("./assets/models/mechsniper/babylon/", "combined.babylon", scene, skeletonLoadHandler, loadProgressHandler)
  9. I have an animated armature in a Blender file. I want to export and import only the armature. If possible i'd like to render the armature in babylonjs for debuggin Then in my babylonJS app code I want to create and attach meshes to the bones. Are there any tutorials, docs, or examples showcasing this? Is this possible. Appreciate any help.
  10. Hello, I'm testing to export bone animation from Blender to babylon.js. Animation in Blender works well ( sample_0.gif ), but it doesn't work well in babylon.js ( sample_1.gif). It seems the rotation axis is incorrect or the relationship between parent bone and child bone is not well. Do I have to set some values or something in blender or babylon.js? *enviroment babylon.2.3.js / blender 2.76 / blender exporter 4.5.0 / windows 10 / chrome if there were similar topics, please let me know. Regards
  11. Keysim

    Phaser + SPINE

    Hi, I'm a beginner with phaser, and I like using spine for my animations. The problem is that I can't find a good tutorial or anything interesting where I can easly understand and configure it. 1st question : Can I load Skeleton Animations of spine into Phaser ? If yes, is there anyone who can explain it clearly to me ? 2nd : I clone phaser lib into Cloud9 ( but I don't know how to generate the javascript .min.. (I saw that there was a pixi lib for loading spine animations but I don't know how to use it...) 3nd : However, if there is no solutions for the skeleton animation, I tried exporting usual spritesheet with Spine, BUT... Spine export a .atlas file for the positions of the frames, NOT json or xml, the problem is that Phaser don't support it... Is there a solution ? I have a spritesheet with many animations, the json would be very usefull so I don't have to type every positions of sprites in phaser... Thank you guys ! Keysim.
  12. I've successfully cloned a mesh and its skeleton with this code: this.mesh = Assets.avatar.clone(JSON.idx); this.mesh.skeleton = Assets.avatar.skeleton.clone(JSON.idx); I then run an animation like this: this.mesh.skeleton.beginAnimation("Idle",true,1); This works well on Windows browsers. I can have 10 people moving about with their own separate animations. Some running, some walking and some idle. However, this doesn't work on iPhone and iPad. If I animate one of the meshes then all of them will activate the same animation. If one is running then ALL of them will be running. Its as if they are all referencing the same animation. Does anyone know how I can get this to work on iPhone?
  13. i use the attachToBone to add sword to player. All is fine. sword is animated when playermash skeleton is animated. first issue: if i rotate meshPlayer, sword is not attached and doesn t move. second issue: if i use attachToBone twice, sword is "inverted". how can i fix sword rotation? nota: if i rotate meshplayer when animating, ... sword is rotating too
  14. I have a .babylon file containing a mesh and a skeleton (with animation) I load the mesh and skeleton into a scene, twice, using the SceneLoader ImportMesh() function. So now if I have a scene with two mesh and two skeleton. If I play animation on one skeleton it only animates the mesh it is attached to. So far so good Now I serialize the scene and save it to a file. I load the scene using the SceneLoader Load function. I play animation on one skeleton. Both the meshes are animated. !! I think the issue is that, unlike mesh and bones, skeletons do not have a uniqueId. In a serialized scene, meshes have references to skeleton ids and that skeleton id not unique. I think we should have uniqueId for each skeleton instance and when the scene is serialized the mesh should be serialized referencing their skeletons uniqueId.
  15. Hi, I'm very new to babylon.js. But I have a lot of experience with Blender and worked with other 3D Engines like Unity3D. I try to get a bone driven animation from Blender working in babylon.js. It works but it seems that the last keyframe of the animation used as the restpose for the animation, which gives totaly wrong results. Has this happen to anyone else? What can cause this behavior? Best, Fabian
  16. Hi again! Please advice me - how rules i must use for creating armature in blender for use in babylon.js scenes. 1. Now i create armature and 3 simple bones system. Attach controller and setting up bones. 2. Create IK-constraint for bones 2. Create animation for controller, it's ok. 3. Export from blender and import to BJS scene. In file all bones and skeleton is saved. Also controller animation. 4. Controller animation can play ("CTRL" cube), but mesh \ bone system is not bended. BJS not support constraints? Ok, but how make pretty samples BlueLady and etc demos? Moving every bone manually and set keys? Then every bones convenient make separate, not compile in armature system. And perhaps exist tool in blender for make keys for every bone automaticaly? Trap and dark forest How make it properly? Sorry for dumb quest, but i dig forum, dig tutorial and not see, what i can do with this Perhaps need small punch in right direction. Help please!!!
  17. Hello everyone!I plan to use the Kinect v2 (that for xboxOne) to move an avatar in my scene.My idea was to gain the quaternions of jointOrientations and then change the appropriate bone matrix. Nevertheless, the jointOrientations are expressed in global rotations (each jointOrientation indicates the direction of the joint in absolute coordinates) while, if I understand it, I can only modify the local matrix of skeleton bone. So I am trying to convert local jointOrientation in local rotation:var joint; //the joint of kinectvar parent = joint.Parent();var localOrientation = BABYLON.Quaternion.Inverse(parent.Orientation).Multiply(joint.Orientation);But I'm having trouble in the transformation of the reference coordinate between kinect joints and avatar bones int the babylon scene... I tried to change the axes by swapping values (x, y, z), but I'm probably wrong var kinectOrientation; //orientation of the joint expressed in quaternionreturn new BABYLON.Quaternion(kinectOrientation.y, kinectOrientation.x, kinectOrientation.z, kinectOrientation.w); //this is just one example, I have tried in different casesDo you have any advice? Thanks in advance
  18. Hello everyone. I've found some issue. I have a mesh with skeleton animation. Also, I have a specific shader used in ShaderMaterial. When I assign the ShaderMaterial to the mesh. The animation disappear, but the effect of shader is working. How do I have the animation with my shader?
  19. Hi! I successful rigged and animated a model in Blender and exported it to .babylon format. After loading and running everything, the results is not what I expected. A running demo here on plunker (press run to start, and detach a window to be able to move). It should be a single step where all of the parts hold together (as it can be seen in Blender). I also attached a Blender file for example above. After experimenting a bit I'd say that the problem lies in inverse kinematics, but can't confirm that. Has anyone experienced such problem? What causes it and the way to solve it? Thanks!
  20. Hi! I created a model, rigged it and started searching how will everything go into Babylon (topic that covers skeletons). After going through a couple (all) of the tutorials, documentation etc. one thing is still buzzing me. What is the best way to structure a model and why? Would it be better to break it down into multiple meshes or keep it a single one? I also spotted "submesh". What is it? Couldn't find anything useful not for blender not for maya. I tried making sense from dude model but I couldn't figure it out. My mesh (robot on image bellow) is created as a single mesh, only parts are divided into vertex groups. Thanks! P.S.: It's been four years since I touched Blender so it might not be the best looking creation.
  21. 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.
  22. 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?
  23. Carnegie Mellon has a whole library of motion capture files for their 31 bone skeleton The acm zip file is over 1gb. It is output in a number of formats. acm is the only non-binary format, so it should be easiest to work with. I am thinking about a class which will process one of these files into the animation for each bone, after removing as many frames as possible. What I have so far: module MORPH{ export class Mocap{ private _boneNames = {}; // format is "rclavicle": 1 private _animation : Array<BABYLON.Animation>; constructor(acmFile : string, frameRate = 120, toleranceToStripFrame = 0){ // Todo: read the acm file and parse to members // remove as many frames as possible, working backwards; final frame must be provided } /** Memory efficient reference copying of a Mocap animation to a skeleton. */ public transferAnimations(destSkeleton: BABYLON.Skeleton, animationIdx = 0){ var destBones = destSkeleton.bones; var nBones = destBones.length; for (var i = 0; i < nBones; i++){ var boneIdx = this._boneNames[destBones[i].name]; if (typeof boneIdx === "undefined"){ BABYLON.Tools.Error("Mocap: not same rig"); return; } destBones[i].animations.splice(animationIdx, 0, this._animation[boneIdx]); } } }}Make Human can rig using this, so seems to be worth looking into. One problem is a small # of vertices need more than 4 influencers. This is not a problem as long as I use software skinning (probably going to have to for mobile anyway), and do not compress my mesh weights. Tower of Babel does not do this, so still good. Would have to put in a subclass, so applySkeleton could be over ridden (thinking about variable length influencers). Still Good. Not sure how to take the root element & combine with each bone to make a frame. Any ideas? Here is the first frame of a file: #!OML:ASF H:\Terrain\Patient Classification 1\Walking\liu\liu.ASF:FULLY-SPECIFIED:DEGREES1root 8.87208 15.7511 -31.7081 5.5217 4.9122 3.70117lowerback -6.36782 -4.70696 -6.683upperback -0.643012 -5.87124 2.06862thorax 3.78681 -3.04691 5.29674lowerneck -24.0759 -2.27082 -11.0665upperneck 24.0856 -2.48175 11.8592head 12.2401 -0.563692 6.00894rclavicle -2.43511e-015 -1.90833e-014rhumerus -44.9636 -1.75199 -74.7834rradius 18.5852rwrist -1.70884rhand -28.8562 -18.8005rfingers 7.12502rthumb -2.21279 -48.7688lclavicle -2.43511e-015 -1.90833e-014lhumerus -1.92727 -17.3217 82.8203lradius 47.7499lwrist 17.0419lhand -19.6688 -28.7993lfingers 7.12502lthumb 6.65951 1.07601rfemur -38.858 0.527314 17.3997rtibia 30.0014rfoot -4.01149 0.174858rtoes -20.7668lfemur 24.5842 9.53209 -22.1071ltibia -1.90833e-014lfoot -3.73452 -5.77693ltoes -22.05172...
  24. Hello. I've been experimenting and enjoying Babylon.JS; thanks for all the hard work on the library. I've been trying to blend loaded model bone animations and run into issues. The simplest case would be idle->walk->run loops. This has been mentioned a while back (pre v2) here, here, and here. While you can call custom animations on each bone (ie, arms get one frame set, legs get another), this doesn't help with easing between animations that use the same bone. Another suggestion was storing the combined animations in the model, but that doesn't allow for smooth transitions (or permutes up very quickly) As a learning experiment, I dove into the code. Here's a demo of my results. The babylon.js it references is a hack experiment where I do the following: 1) allow multiple animations per target by not calling stopAnimation(target) on beginAnimation 2) on every call to a scene's animation, pass along a cache 3) on every animation._interpolate() where datatype == Animation.ANIMATIONTYPE_MATRIX, write the matrix to the cache 4) if the animation._interpolate() has a cache hit, invoke the otherwise unused matrixInterpolateFunction() with a factor value to interpolate between the 2 matrix The result plays the animations, mostly. The result is flipped, both in normals and on the z-axis, which I don't understand (my grasp of matrix math is not great). Most of the work revolved around getting data passed between the otherwise isolated animation instances so they could be aware of the other animation to blend. This hack also doesn't handle an arbitrary number of animations to merge or an easy way to work with them, since calls to stop use the target as the common factor. What is the best way to approach this? Is there something I missed in the library? Or how could I implement this correctly for Babylon.js? Thanks