vidjuheffex Posted October 26, 2013 Share Posted October 26, 2013 Hey everybody, My name is Julián, just wanted to introduce myself and say how cool it is there is an official forum. I am a self-taught developer coming from vfx-scripting as my introduction to programming.Babylon.js is really cool so far but already I have a few questions.Thought it would be easier to host an example an discuss the issues I am having (and where I suspect they may be coming from).http://www.vidjuheffex.com/html5tests/babylontest1/index.html1) This is a combination of requirejs, and loads knockout and jquery (as i go to those often) despite not using them. It loads babylon as a shim config in require. And the lot of it (plus my modules) are optimized using r.js through node. Hand.js is added in a script tag before the rest as I wasn't sure how to load something that should behave as an "invisible" polyfill through require.2) Some findings: While on IE11 (windows 8.1 RTM) I get no errors when navigating to the page in the console. However in both Chrome and Firefox I get nagged about an xhr.request failure for monkey.babylon.manifest (monkey.babylon being the file I am loading)The page works fine and I admit I had some troubles adding the MIME types to my .htaccess file, and the fact that the optimization step ruined my referenced paths. But I don't think in the tinkering I did with those files that I would have introduced a reference to a .manifest file.3) The scene has a Light0 omnilight called "Omni0" and a vector position in this case 100,100,100. If I add a light1 omni1 at vector position -100,100,100 nothing happens. If I comment out the first light I then see my other light. But two lights on opposite sides should be filling the shadows no?I suspect here this might be an issue with the blender export as I read the standard material should support 4 lights. However when I tried to use the hemisphere light only the insides of the ears recieved lights. So maybe I have a normals issue? I just read about the support being for an earlier version of blender so I will test again myself.Can't wait to see what people come up with using this! Quote Link to comment Share on other sites More sharing options...
Temechon Posted October 26, 2013 Share Posted October 26, 2013 Hi and welcome here ! By the way, we share the same first name 1) Your link is not correct - FTFY : http://www.vidjuheffex.com/html5tests/babylontest1/index.html 2) In Chrome, here is the error I get : Failed to load resource: the server responded with a status of 404 (Not Found) http://www.vidjuheffex.com/html5tests/babylontest1/html5tests/babylontest1/mdl/monkey.babylon.manifest Did you created a manifest file for your model as described here : https://github.com/BabylonJS/Babylon.js/wiki/Caching-the-resources-in-IndexedDBIt should contains this : { "version" : 1, "enableSceneOffline" : true, "enableTexturesOffline" : true }For the third point, I don't know what the problem is... Maybe you can add some snippets of your code ? See you ! Quote Link to comment Share on other sites More sharing options...
vidjuheffex Posted October 26, 2013 Author Share Posted October 26, 2013 Thanks for the pointers! Thanks for pointing me to the manifest segment had not seen that. I am however running into some new issues. I thought maybe my path issues had to due with the minifying/concatenation of the compile scripts so I have switched over to serving the debug version of the page. the directory structure is like this:/css /img /js /libs babylon.js hand.js jquery.js knockout,js /app core.js scene01.js main.js require.js/mdl monkey.babylon monkey.babylon.manifest scene01.js has the code to load the .babylon file. it looks like this:sceneMeshes = BABYLON.SceneLoader.ImportMesh("Suzanne", "../../mdl/", "monkey.babylon", scene, function (newMeshes) {//code goes here}this works locally, online I get an error stating that vidjuheffex.com/mdl/monkey.babylon cannot be found. If it switch the path to "/html5tests/babylontest1/mdl/" i get the model to load again however firefox reports: [16:53:00.929] GET http://www.vidjuheffex.com/html5tests/babylontest1//html5tests/babylontest1/mdl/monkey.babylon.manifest [HTTP/1.1 301 Moved Permanently 191ms][16:53:01.126] GET http://www.vidjuheffex.com/html5tests/babylontest1/html5tests/babylontest1/mdl/monkey.babylon.manifest [HTTP/1.1 404 Not Found 272ms] so cleary something is up with my paths. Should I: A) use full paths like above? use referenced paths? (why are these broken onine? ../../mdl is two dirs up from scene01.js and into the mdl directory?C) only host at the root of my domain? As for the third part:the code is light0 = new BABYLON.PointLight("Omni0", new BABYLON.Vector3(100, 100, 100), scene); light1 = new BABYLON.PointLight("Omni1", new BABYLON.Vector3(100, 100, -100), scene); if i comment one or the other it toggles between both. If i leave both on, one takes priority rather than seeing two lights on the model. Quote Link to comment Share on other sites More sharing options...
vidjuheffex Posted October 31, 2013 Author Share Posted October 31, 2013 this is a polite bump. hope no one minds. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 31, 2013 Share Posted October 31, 2013 You have to authorize .babylon and .babylonmeshdata MIME type on your web server 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.