• Content Count

  • Joined

  • Last visited

  1. i have change fbx file to babylon, and it have walk, run animaion. in default, it start walk animation. like sketchfab. https://sketchfab.com/models/0edde6accc4a4d92919bbbbaf824d849 how get the animation key and change the animation?
  2. zhg115

    3d to 2d err

    var p = BABYLON.Vector3.Project(vector, BABYLON.Matrix.Identity(), scene.getTransformMatrix(), camera.viewport.toGlobal(engine)); it's return P { x: NaN , y: NaN} camera.viewport.toGlobal(engine) is null e {x: NaN, y: NaN, width: NaN, height: NaN} i find google and the result page is return the NaN too. http://www.babylonjs-playground.com/#UWSIL#1 I use it this function last month, and it worked. but now didn't work. I don't konw why? help...
  3. zhg115

    FBX to BABYLON convert err

    thank you for you answer. this image is I using 3dMax import and export to make fbx file. then using FbxExporter to convert babylon file. and it run ok. In blender, In weight paint mode, select the Weight Tools panel in the toolbar, and run Limit Total, This removes vertex groups with lowest weights. I think 3dMax have something this logic too, so the next Version FbxExporter is possible to add the logic?
  4. Hi, I use FbxExporter to convert humanoid.fbx to humanoid.babylon file. but when run animation, some vertex is creacked. help...
  5. hi, I have a problem. when i import obj mesh and auto load texture from obj file, I can't load the texture. this problem occurs some obj file. the first image is using Babylonjs, second is using Threejs. sources: BABYLON.SceneLoader.ImportMesh("", "/model/load/", "turbosonic.obj", scene, function (meshes) { }); help..
  6. hi. I want to check the camera can see the point. and I caculate the worldviewProject like which is the Vertex shader has. the code: // worldViewProjectionMatrix = world * view * projection // worldViewProjectionMatrix * vector var viewport = camera.viewport.toGlobal(engine); var cw = viewport.width; var ch = viewport.height; var cx = viewport.x; var cy = viewport.y; var viewportMatrix = BABYLON.Vector3._viewportMatrixCache ? BABYLON.Vector3._viewportMatrixCache : (BABYLON.Vector3._viewportMatrixCache = new BABYLON.Matrix()); BABYLON.Matrix.FromValuesToRef(cw / 2.0, 0, 0, 0, 0, -ch / 2.0, 0, 0, 0, 0, 1, 0, cx + cw / 2.0, ch / 2.0 + cy, 0, 1, viewportMatrix); var matrix = BABYLON.Vector3._matrixCache ? BABYLON.Vector3._matrixCache : (BABYLON.Vector3._matrixCache = new BABYLON.Matrix()); BABYLON.Matrix.Identity().multiplyToRef( viewportMatrix , matrix); matrix.multiplyToRef(camera.getProjectionMatrix(), matrix); var p2 = BABYLON.Vector3.TransformCoordinates(vector, matrix) //BABYLON.Vector3.Project(vector, world, transform, viewport) var p = BABYLON.Vector3.Project(vector, BABYLON.Matrix.Identity(), scene.getTransformMatrix(), //scene.getTransformMatrix(), camera.viewport.toGlobal(engine)); console.log(p); console.log(p2); // p and p2 xy not like help.