Jump to content

Blue screen instead full mesh


hit2501
 Share

Recommended Posts

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.

 
Link to comment
Share on other sites

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 :)

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...