Sign in to follow this  
Clovis

Real Estate .ifc 3d viewer, is Babylon a good choice ?

Recommended Posts

Hi everybody !

We would like to build an open source .ifc 3D viewer (generic file for architecture models, which include material informations). This viewer will include first person view with collision detection. 

 

We saw that Microsoft built a similar viewer : http://microsoft.teia-solution.com/... but it doesn't look to work very well !! :/ (very very heavy, the viewer freeze in our navigators).

Is that because Microsoft teams didn't used Babylon the right way or is that because Babylon can have performance issues with complex objets ? 

 

Thanks a lot for your advices ! 

 

 

Share this post


Link to post
Share on other sites

@RaananW of course, is correct in declaring his fondness for babylon.js. Most of us have worked with practically every other WebGL framework, and there is no question currently that baylon.js is not only more functional and powerul 'straight out of the box', but BJS is far more flexible when the project requires unique tools to be built. Not only are there dramatic limitations within other WebGL frameworks, but you'll find that there is generally less code to write and a shorter path to creating most anything you might accomplish using OpenGL.

DB

Share this post


Link to post
Share on other sites

@Deltakosh great ! could you send me your skype account ? ;) We want to build a fully open source web and mobile 3D viewer, starting with .ifc 3d file format. Viewing a 3D file is still painfull for many people (softwares to install, etc..), maybe this project could interest some BabylonJS contributors, don't hesitate to message me ! 

I just tested to display an .obj of a building and Babylon seems to have performance issues (my navigator almost crashed while rotating the model). It's a real architecture project, the .ifc was converted to .obj and .mtl files with this simple tool: http://www.greentoken.de/onlineconv/. The size is 10Mo, and other big buildings don't exceed 50Mo.

 

image.png.79b9ee6e01f9767d4ea4483a982b4977.png

Here is my code :

<script type="text/javascript">
      var canvas = document.querySelector("#renderCanvas");
      var engine = new BABYLON.Engine(canvas, true);

      var createScene = function () {
         //SCENE PARAMS
         var scene = new BABYLON.Scene(engine);
         scene.clearColor = new BABYLON.Color4(200, 200, 200, 1.0);
         var camera = new BABYLON.ArcRotateCamera("ArcRotateCamera", 1, 0.8, 10, new BABYLON.Vector3(0, 0, 0), scene);
         camera.setTarget(BABYLON.Vector3.Zero());
         camera.attachControl(canvas, false);
         var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
         light.intensity = 1;

         //FILE LOADER
         var loader = new BABYLON.AssetsManager(scene);
         var theBuilding = loader.addMeshTask("theBuilding", "", "scenes/", "14-06-VIL_CHANTIER_150916_RVT2017_fdr.obj");

         loader.load();

         return scene;
      }; 

      var scene = createScene();
      engine.runRenderLoop(function () {
         scene.render();
      });
   </script>

Just below you can find the 'Babylon Building Viewer.zip' file with the simple project including the 3d files (open index.html with Firefox, Chrome doesn't accept local cross origin requests for the obj file).

Is my code wrong or is that because this file is too heavy ? 

 

 

Babylon Building Viewer.zip

Share this post


Link to post
Share on other sites

(my skype handle is...deltakosh :))

Your code is correct but do not expect it to support 10 millions vertices without help :)

First you can read this: http://doc.babylonjs.com/tutorials/optimizing_your_scene 

Then we will need more info: number of draw calls, number of vertices / indices. We can run complex scene in a browser but we always need to optimize the scene for that

Share this post


Link to post
Share on other sites

(my skype handle is...deltakosh :))

Your code is correct but do not expect it to support 10 millions vertices without help :)

First you can read this: http://doc.babylonjs.com/tutorials/optimizing_your_scene 

Then we will need more info: number of draw calls, number of vertices / indices. We can run complex scene in a browser but we always need to optimize the scene for that.

 

For instance this scene: https://www.babylonjs.com/demos/train/ contains:

- 1 Million+ indices

- 210 draw calls

- 565K vertices

 

and run even on a small computer

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.