Jump to content


  • Content Count

  • Joined

  • Last visited

  1. @kcoley The file is uploaded to your dropbox, please have a test
  2. Hi @kcoley It is a max file, error happens when I try to export it in 3dsmax 2018. please try to download the file from this link: https://cgtfiles.s3.amazonaws.com/uploads/files/635450/FullHouse.rar?response-content-disposition=attachment%3B filename%3Dfullhouse.rar%3B filename*%3Dutf-8''FullHouse.rar%3B &X-Amz-Expires=300&X-Amz-Date=20181107T072652Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJAIWBP4YJ3PPYJKA/20181107/us-east-1/s3/aws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=51f590107b7da32e4376026bfa66ff106edcc394b7e2c617bf458c790ed
  3. Hi @kcoley It seems not the reason, when create a submesh like below, var submesh = new BABYLON.SubMesh(..., mesh); Actually the created submesh will be pushed to subMeshes array of the parent mesh automatically. You can verify it in this new PG: https://www.babylonjs-playground.com/#28EUMN#24 I removed these push actions: sphere.subMeshes.push(submesh1); sphere.subMeshes.push(submesh2); sphere.subMeshes.push(submesh3); sphere.subMeshes.push(submesh4); sphere.subMeshes.push(submesh5); sphere.subMeshes.push(submesh6
  4. When exporting from some 3dmax files, it always report such error: System.NullReferenceException: Object reference not set to an instance of an object. at Max2Babylon.BabylonExporter. isMaterialSupported Did anyone encounter this problem before, and how to fix it?
  5. @kcoley What I want is not a really a single mesh, but a mesh with BABYLON.MultiMaterial, it will have multiple submesh. my code is like: if (handledMesh.materials.length > 1) { babylonMesh.subMeshes = []; var multimat = new BABYLON.MultiMaterial("multi", scene); babylonMesh.material = multimat; for (var i = 0; i < handledMesh.materials.length; i++) { var submat = materialsFromMTLFile.materials[handledMesh.materials]; m
  6. Hi everyone, In the obj file, when an object has multi-material, the obj file loader will create several meshes. I want to only create one mesh with multi-material, but got the wrong result: I attached the obj file and the new obj file loader I modified(objFileLoader_new.js ), can anybody help to have a look why it is wrong. It troubled me a whole day now. obj.rar
  7. @dbawel @Pryme8 Thanks for your concern about this issue. I'v got the root cause: In my program, there are two viewport, so the scene.activeCameras has two cameras in it. To use the project function, var transformMatrix = this._scene.getTransformMatrix(); may not get the right transformation matrix. Instead, the transformation matrix should come from the active camera of the active viewport: var transformMatrix = this._activeport.activeCamera.getTranformationMatrix();
  8. @dbawel I do need more help. Actually, the "screen coordinate" here , is I want to get the 2D coordinate of the pickedPoint on the canvas, not the real screen. I modified the PG in your post, adding these code in onPointerDown var transformMatrix = scene.getTransformMatrix(); var viewport = freeCamera.viewport.toGlobal(engine); var coordinates = BABYLON.Vector3.Project(pickResult.pickedPoint, BABYLON.Matrix.Identity(), transformMatrix, viewport); console.log("screen coordinates:", Math.ceil(coordinates.x), Math.ceil(coordinates.y)); Here is th
  9. Hi everyone, I'm trying to go from world to screen coordinates, this is my code: onPointerDown = function (evt) { console.log("pointer:", this._scene.pointerX, this._scene.pointerY); var pickResult = this._scene.pick(this._scene.pointerX, this._scene.pointerY, null, null, this._camera); if(pickResult.hit) { var transformMatrix = this._scene.getTransformMatrix(); var viewport = this._camera.viewport.toGlobal(this._engine); var coordinates = BABYLON.Vector3.Project(pickResult.pickedPoint, BABYLON.Matrix.Id
  10. @Deltakosh I don't want to chip anything, I just want to select a rectangle area, and then scale up it to fill the render canvas size. @NasimiAsl Thanks for your PG demo, it can zoom in the selected area, but the scale is a little different than what I want. Your method is also a good choice if I can't find a better way to implement it
  11. Hi everyone, I need to select an area in the scene, and then enlarge it as frustum plane. Select an area by mouse: Enlarge the selected area as frustum plane: It seems babylon can not set a frustum plane directly, any idea to implement it?
  12. @sable @brianzinn Thanks for you guys' help. I just found that I set the rotation of FreeCamera mistake, sorry, please ignore the mouse move issue. As the exporting tool I use has no such exporting option, I can't get a left handed model. Still, there is something trouble me, it seems that babylon has Y as the up-axis, the building is not standing correctly. Normally I should see the front, not the bottom of the building. (You can use ArcRotateCamera to have a look what the building is) could you please help me on this point. The PG is below:
  13. @sable Hi, There is another issue with this right-hand model if the active camera is a FreeCamera. When the mouse moves in left - right direction, the model moves up - down, while move the mouse up - down, the model moves left - right. Can anybody tell me how to fix it?
  14. @dbawel, thanks for your useful info. @SvenFrankson, The meshes are converted from a model designed by Revit (a BIM design tool of Autodesk). about merging the meshes, I'll use uv2 to have a try, thanks a lot.
  15. @SvenFrankson, thanks for the advice. What I am trying is a very detailed building information model(BIM), a whole subway station with all kinds of building elements, structures, equipment, pipelines, and so on. There are more than 10k entities in this model, each entity has its own information, and must be pickable. As each entity is parsed to a mesh, so there are so many meshes need to draw. Besides merging the meshes, I have an thought but not sure if it is possible , and how to implement it. That is , can Babylon support to just draw the meshes in sight of the
  • Create New...