• Content Count

  • Joined

  • Last visited

About vbillet

  • Rank

Profile Information

  • Gender
  • Interests
    Babylon, 3D Gaming

Recent Profile Visitors

522 profile views
  1. I don't see anything too... (chrome/win7)
  2. I tried your code and all seems to work on my computer. The only difference between our codes is now here : <script type="text/javascript" src="babylon.1.5.2.js"></script><script type="text/javascript" src="hand.minified-1.1.1.js"></script>My corresponding code is : <script type="text/javascript" src="babylon.1.5.3.js"></script>
  3. I'm also in version 30.0.1599.101 m... here is my web page code : <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Babylon - Basic scene</title> <style> html, body, div, canvas { width: 100%; height: 100%; padding: 0; margin: 0; overflow: hidden; } </style> <script src="babylon.1.5.3.js"></script> <script src="myrpg/main.js"></script> </head> <body> <div style="position:absolute;top:450px;left:300px;width:300px;color:#000;height:30px; z-index:2;"> My super Babylon project... Here to shows scene's transparency. </div> <div id="rootDiv" style="position:absolute;border:1px solid black; z-index:3;"> <canvas id="canvas"></canvas> </div> </body> </html>Do you import scene or meshes ?
  4. In Chrome, when I set Alpha to 0, it produce also a nice red background also. But when I set it like this : scene.clearColor = new BABYLON.Color4(0,0,0,0.0000000000000001); , it produce a nice transparent background.
  5. I can't mark it as answered. Could it be mark as answered ? Yes .... But.... NO. If I want to mount a bow or a crossbow on my bone, it might be difficult, because my bow need also a skeleton. This skeleton will be used for fire motion. Can we have multiple skeleton for a single mesh ?
  6. Thanks for your help. Finally here is my code : function mount(obj,ske,boneName){ matricesWeights =[]; floatIndices =[]; boneIndice=-1; // Find bone's Indice for (ii=0;ii<ske.bones.length;ii++) { if (ske.bones[ii].name==boneName) { boneIndice=ii; break; } } if (boneIndice==-1) {console.error("Unable to find bone : "+boneName); return;} // Build matrices and indices buffers. for (ii=0;ii<obj._totalVertices;ii++) { matricesWeights[ii*4+0]=1.0; matricesWeights[ii*4+1]=0.0; matricesWeights[ii*4+2]=0.0; matricesWeights[ii*4+3]=0.0; floatIndices[ii*4+0]=boneIndice; floatIndices[ii*4+1]=boneIndice; floatIndices[ii*4+2]=boneIndice; floatIndices[ii*4+3]=boneIndice; } // Mounting the object on the skeleton obj.skeleton = ske; obj.setVerticesData(matricesWeights, BABYLON.VertexBuffer.MatricesWeightsKind, false); obj.setVerticesData(floatIndices, BABYLON.VertexBuffer.MatricesIndicesKind, false);}mounted = false;engine.runRenderLoop(function() { if ((sword!=undefined) && (Armature!=undefined)) { if (!mounted) { mount(sword,Armature,"Bone"); mounted=true; } } scene.render();});And that's done. @TODO : unmount function
  7. How can I do this ? matricesWeights = ???;floatIndices = ???;sword.setVerticesData(matricesWeights, BABYLON.VertexBuffer.MatricesWeightsKind, false);sword.setVerticesData(floatIndices, BABYLON.VertexBuffer.MatricesIndicesKind, false); It's not easy to understand. Is it 4 float per vertex ? only 4 floats ? finally an example could be fine ....
  8. I Assume sword is a mesh (BABYLON.Mesh) and Armature is a skeleton (BABYLON.Skeleton) containing one bone (BABYLON.bones). In engine.runRenderLoop function, I use the following code : engine.runRenderLoop(function() { sword.parent=Armature.bones[0]; scene.render();});It result the following error : Uncaught TypeError: Object [object Object] has no method 'isEnabled' And if I use the following code : engine.runRenderLoop(function() { scene.render(); sword.parent=Armature.bones[0];});It result the following error : Uncaught TypeError: Object [object Object] has no method '_needToSynchonizeChildren' In both cases, sword does not follow bone's motion. Any Idea about this ?
  9. Ok, I solved my problem with this animation. To use animations you need to create Vertex group in blender.
  10. So, here is the project. Yes I saw this tutorial. I'm not sure to understand "preparing mesh" section. I really can't find what's happening, and what can break the animation into babylon. Thanks
  11. Hi, first of all, thank you for this great piece of code. I try to build a simple animation : 1 armature, 1 bone, and 1 cube parented to the bone. This animation works perfectly in blender. Unfortunately, it doesn't works in my babylon application. I used this code : BABYLON.SceneLoader.Load("", "myproject/assets/testRot.babylon", engine, function (newScene) { // Wait for textures and shaders to be ready newScene.executeWhenReady(function () { // Attach camera to canvas inputs newScene.activeCamera.attachControl(canvas); newScene.beginAnimation(newScene.skeletons[0],1,40,true,1.0); //newScene.meshes[0].parent=newScene.skeletons[0].bones[0]; // 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 }Is it possible to post a simple blender animation tutorial with export exemple. I join my sample blender file. Thank tou for your reply. testRot1.zip