benoit-1842 Posted October 13, 2014 Share Posted October 13, 2014 Hi everybody, I have an animation that works fine inside Blender. It's a bvh that use with a Makehuman model. The problem: I am able after several minutes to get a .babylon file. But when I drag it to the Sandbox, I get an eternal spinning disk. If somebody could help me, It's kind of a big project and I want to use blender and babylon. https://drive.google.com/a/physmodo.com/file/d/0B6PrQ0hnuh0ATTZuWTBGbnFkakk/view?usp=sharing Merci, Benoit Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 13, 2014 Share Posted October 13, 2014 You have to drag'n'drop all file (meanint .babylon and textures files) Did you add a camera to your scene? Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted October 13, 2014 Author Share Posted October 13, 2014 My avatar is working when there's no bone and animation, I suspect this is the problem and yes there's a camera.... Merci de repondre,Benoit Quote Link to comment Share on other sites More sharing options...
gryff Posted October 13, 2014 Share Posted October 13, 2014 Benoit, can you place your blend file somewhere so I can download it and take a look at it? In a PM if you want. Check out this thread - I used the same tools - MH and Blender. And here she is - the Blue Lady cheers, gryff Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted October 13, 2014 Author Share Posted October 13, 2014 The link is in the first message...... Happy thangsgiving !!!! Benoit Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted October 13, 2014 Author Share Posted October 13, 2014 I don't know if it make a difference but I have used MakeWalk......Thanx,Benoit Quote Link to comment Share on other sites More sharing options...
gryff Posted October 14, 2014 Share Posted October 14, 2014 I don't know if it make a difference but I have used MakeWalk Benoit, I used MakeWalk for the Blue Lady (and MakeClothes for the dress) Should be no big deal. The link is in the first message...... Happy thangsgiving !!!! I tried the link - but I have to "apply for access" which I have done. I assume you have to grant it somehow. Et merci beaucoup pour les voeux. cheers, gryff Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted October 14, 2014 Author Share Posted October 14, 2014 This one should work......sorry about that and thanx for your help, Merci, Benoit https://drive.google.com/file/d/0B_ZBy6q5jS8xNTJCN2xRT09GOHM/view?usp=sharing Quote Link to comment Share on other sites More sharing options...
gryff Posted October 14, 2014 Share Posted October 14, 2014 Well Benoit I got the file TY. And I took a look at it. First question I have is: what rig did you export from Make Human? What I see is a very complex rig with both FK, IK and various control bones. Below is a screen grab showing just the bones in the right foot selected. In the yellow box, Blender tells me that I have 9 of 263 (!!!) selected. (The big bone at the base of the foot is an IK bone) When I export you figure and rig, it exports all the 263 bones as far as I can tell. An example: {"name":"toe.L","index":254,"matrix":[1.0000,0.0000,0.0000,0.0000,-0.0000,0.8890,-0.4579,0.0000,-0.0000,0.4579,0.8890,0.0000,-0.0000,1.3150,-0.0000,1.0000],"parentBoneIndex":246,"animation": {"dataType":3,"framePerSecond":24,"keys":[{"frame":1,"values":[1.0000,0.0000,0.0000,0.0000,-0.0000,0.8890,-0.4579,0.0000,-0.0000,0.4579,0.8890,0.0000,-0.0000,1.3150,-0.0000,1.0000]},{"frame":250,"values":[1.0000,0.0000,0.0000,0.0000,-0.0000,0.8890,-0.4579,0.0000,-0.0000,0.4579,0.8890,0.0000,-0.0000,1.3150,-0.0000,1.0000]}],"loopBehavior":1,"name":"anim","property":"_matrix"}} Note the index 254 for bone named "toe.L" It does not appear to be exporting the animation apart from a start and end frame. cheers, gryff Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted October 14, 2014 Author Share Posted October 14, 2014 I have just used makewalk..... Maybe I don't have the right thing.... I have a .mhx file from make human and I load and retartget it in Blender.... Do you have a very basic model that I can see, something very generic so I can compare and Tweek Merci beaucoup, Benoit Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted October 14, 2014 Author Share Posted October 14, 2014 Yeahhhhh I figured out that there's different option in makehuman (have a super complex rigging, or a basic one etc.....) and I was alway chosing none so I was having a super complex rigging..... Now I just have 33 bones.... And still working on my model.... Thanx, Benoit Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted October 14, 2014 Author Share Posted October 14, 2014 Now I am able to open my .babylon file in the sandbox but the animation isn't working.... My character is in t-pose without having the bvh file working.... Thanx, Benoit https://drive.google.com/file/d/0B_ZBy6q5jS8xX1d2Q1ZZMjZVTjQ/view?usp=sharing Quote Link to comment Share on other sites More sharing options...
gryff Posted October 14, 2014 Share Posted October 14, 2014 I was alway chosing none so I was having a super complex rigging..... Now I just have 33 bones.... And still working on my model.... Benoit, You chose the "game rig" - with 33 bones - right? Now I am able to open my .babylon file in the sandbox but the animation isn't working.... My character is in t-pose without having the bvh file working.... Do you have a server that you can use? If so set up your babylon file as part of a web page that you can then browse to Create a webpage by grabbing the scene loading code from my Blue Lady example (the index.html). Then just change the name of the babylon file to your file and delete all the code that refers to the music (the howler.js stuff). Should work. cheers, gryff Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted October 14, 2014 Author Share Posted October 14, 2014 Can you do me a little step by step I am fairly new with that Thanx... Benoit and yes I have used the game rig Quote Link to comment Share on other sites More sharing options...
gryff Posted October 14, 2014 Share Posted October 14, 2014 Benoit : tutorial here : Loading your.babylon file inside your page app by David Catuhe (AKA Deltakosh who runs this forum) Build an HTML page from the two blocks of code you find on that page when you scroll down. Something like below:<html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Using babylon.js - How to load a scene</title> <script src ="../hand.js"></script> <script src= "../babylon.1.14-beta.js"></script> <style> html, body { width: 100%; height: 100%; padding: 0; margin: 0; overflow: hidden; } #renderCanvas { width: 100%; height: 100%; } </style></head><body> <canvas id="renderCanvas"></canvas> <script> if (BABYLON.Engine.isSupported()) { var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load("", "xxxxxxx.babylon", engine, function (newScene) { // Wait for textures and shaders to be ready newScene.executeWhenReady(function () { // Attach camera to canvas inputs newScene.activeCamera.attachControl(canvas); //code to play animation var skeleton = newScene.getSkeletonById(0); newScene.beginAnimation(skeleton, 1, 499, true, 1); // Once the scene is loaded, just register a render loop to render it engine.runRenderLoop(function() { newScene.render(); }); }); }, function (progress) { // To do: give progress feedback to user }); }</script> </body></html> Change the xxxxxxx to the name of your babylon file. Make sure you add the two lines of code to play the animation. Then save as index html. Upload to your webserver and view in your browser. See the tutorial for more on setting up the files. Make sure that all scripts, images, and the babylon file are all in their proper folders. cheers, gryff Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted October 16, 2014 Author Share Posted October 16, 2014 But I think it will help me more if I could export directly from blender.... Is there something I am missing for exporting animation done with bvh.... Right now I have my model in a T-pose in the sandbox but he's not doing my bvh animation.... Thanx, Benoit Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 17, 2014 Share Posted October 17, 2014 The exporter can auto animate the rotation, position, & scaling of python sub-classes of FCurveAnimatable : Mesh(all 3), Camera(no scaling), Light(only position). I do not have a copy of the old, flat static class, legacy code on this machine, but I do not think it was dropped skeletal animation. For .babylon files, enabling this may more than changing the exporter. Quote Link to comment Share on other sites More sharing options...
zouarino Posted November 29, 2014 Share Posted November 29, 2014 I want to stop the animation but this code doesn't work please help my.var createScene = function () {var scene = new BABYLON.Scene(engine);var camera = new BABYLON.ArcRotateCamera("Camera", 3 * Math.PI / 2, Math.PI / 8, 50, BABYLON.Vector3.Zero(), scene);camera.attachControl(canvas, false);var light = new BABYLON.HemisphericLight("hemi", new BABYLON.Vector3(0, 1, 0), scene);BABYLON.SceneLoader.ImportMesh("a", "scenes/", "ww.babylon", scene, function (newMeshes) {newMeshes[0].position = BABYLON.Vector3.Zero();newMeshes[0].autoAnimate = false;newMeshes[0].autoAnimateLoop = false;});return scene;} Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.