@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.
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