hit2501 Posted January 11, 2015 Share Posted January 11, 2015 I have a problem with the display of an imported model. The model is displayed as I go through but I want to see the full model, why this is happening?, what can I do? You can see it here: www.youtube.com/watch?v=gujPG8J70-4 This is my code. <!DOCTYPE html><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Like Reality</title> <!-- Babylon.js --> <script src="js/hand.minified-1.2.js"></script> <script src="js/cannon.js"></script> <script src="js/oimo.js"></script> <script src="js/babylon.js"></script> <style> html, body { overflow: hidden; width: 100%; height: 100%; margin: 0; padding: 0; } #renderCanvas { width: 100%; height: 100%; touch-action: none; } </style> </head> <body> <canvas id="renderCanvas"></canvas> <script> var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); var createScene = function () { var scene = new BABYLON.Scene(engine); var camera = new BABYLON.FreeCamera("camera1", new BABYLON.Vector3(0, 5, -10), scene); camera.setTarget(BABYLON.Vector3.Zero()); camera.attachControl(canvas, true); var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene); light.intensity = 0.7; BABYLON.SceneLoader.ImportMesh("", "Mall/", "02.babylon", scene, function (newMeshes) { camera.target = newMeshes[0]; }); camera.speed = 200; return scene; }; var scene = createScene(); engine.runRenderLoop(function () { scene.render(); }); window.addEventListener("resize", function () { engine.resize(); }); </script></body></html>Sorry if its too basic, Im new with babylon. Thanks. Quote Link to comment Share on other sites More sharing options...
gryff Posted January 11, 2015 Share Posted January 11, 2015 This is that huge model, right hit? I think you need to alter the far clipping plane.camera.maxZ = <some value>;The default value is 100 I believe. cheers, gryff Quote Link to comment Share on other sites More sharing options...
hit2501 Posted January 11, 2015 Author Share Posted January 11, 2015 You save again gryff, it work with negative values but now some parts are blinking when I move, do you know why this happen? Thanks again. Quote Link to comment Share on other sites More sharing options...
gryff Posted January 11, 2015 Share Posted January 11, 2015 some parts are blinking when I move If you mean the flashing I see at 22 secs into your YouTube video - an advertisement of some kind - and a lot more later, I think you have two lots of geometry occupying the same space and they are both trying to be displayed. I believe it is called "z-buffer fighting". To fix it you may have to tweak your mesh geometry. cheers, gryff Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.