vladimr Posted February 21, 2017 Share Posted February 21, 2017 Hi, In corporate environment I tried to run a very basic babylon.js scene in a Win7 Chrome browser using my own, Python 3.x and node.js simple HTTP servers - without any success. I always get the same error: "Error while trying to load texture: ..." for texture and height map files. These and all other project files (html, js, css, images) reside in the same directory for simplicity and HTTP servers were run from the same place. All other files are loaded successfully. I tried to run Chrome browser with a HTTP server on the same and different computers - not helped. No any Chrome add-on which could prevent to load these files + incognito mode didn't help too. The same scene I can run successfully in Internet Explorer on the same computers and in iPhone Chrome browser via wi-fi too. All other our applications (not babylon.js applications) have no any problem with Chrome browser, they are using XMLHttpRequest and Websocket protocols. I tried all suggestions which I found in Internet regarding this error - nothing helped in my case. Any advice ? Thanks, Vladimir My code (map.tif and ground.tif images cannot be loaded): ... var ground = BABYLON.Mesh.CreateGroundFromHeightMap("ground", "map.tif", 100, 100, 100, 0, 10, scene, false); var groundMaterial = new BABYLON.StandardMaterial("ground", scene); groundMaterial.diffuseTexture = new BABYLON.Texture("ground.tif", scene); ... Quote Link to comment Share on other sites More sharing options...
vladimr Posted February 21, 2017 Author Share Posted February 21, 2017 Just fixed it - now all working properly after I have replaced tif files with png files ( map.png, ground.png instead of map.tif, ground.tif). It's very strange that iPhone Chrome and Win7 Chrome differently working with tif-files. Our native files are tif - from this are used them :-) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 21, 2017 Share Posted February 21, 2017 Good news regarding performance try to use png instead of tif (they are smaller and thus faster to download) 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.