mangualmanuel Posted December 29, 2014 Share Posted December 29, 2014 I created a mesh in Blender and called it "Walking.babylon". I set it up in my code like so:///<reference path="/ref script/babylon.1.14-debug.js"/>"use strict"var canvas;var engine;var scene;document.addEventListener("DOMContentLoaded", startBabylonJS, false);function startBabylonJS() {if (BABYLON.Engine.isSupported()) {canvas = document.getElementById("renderCanvas");engine = new BABYLON.Engine(canvas, true);scene = new BABYLON.Scene(engine);var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);light.position = new BABYLON.Vector3(20, 150, 70);//create the camera that will view our scenevar cam = new BABYLON.FreeCamera("camera1", new BABYLON.Vector3(0, 5, -10), scene);cam.setTarget(new BABYLON.Vector3.Zero());cam.attachControl(canvas, false);scene.ambientColor = new BABYLON.Color3(0.3, 0.3, 0.3);// Groundvar ground = BABYLON.Mesh.CreateGround("ground", 1000, 1000, 1, scene, false);var groundMaterial = new BABYLON.StandardMaterial("ground", scene);groundMaterial.diffuseColor = new BABYLON.Color3(0.2, 0.2, 0.2);groundMaterial.specularColor = new BABYLON.Color3(0, 0, 0);ground.material = groundMaterial;ground.receiveShadows = true;// Shadowsvar shadowGenerator = new BABYLON.ShadowGenerator(1024, light);// DudeBABYLON.SceneLoader.ImportMesh("man", "Scenes/Models/Animation/", "Walking.babylon", scene, function (newMeshes, particleSystems, skeletons) {var dude = newMeshes[0];for (var index = 0; index < newMeshes.length; index++) {shadowGenerator.getShadowMap().renderList.push(newMeshes[index]);}dude.rotation.y = Math.PI;dude.position = new BABYLON.Vector3(0, 0, -80);scene.beginAnimation(skeletons[0], 0, 100, true, 1.0);});//Once the scene is loaded, just register a render loop to render itengine.runRenderLoop(function () {scene.render();});//Resize window.addEventListener("resize", function () {engine.resize();});}}But When I load my scene and hit F12 I get this message in the console: Failed to load resource: the server responded with a status of 404 (Not Found) and right next to it is this link: http://localhost:50207/Scenes/Models/Animation/Walking.babylon.manifest?1419869394361So my question is: what am I doing wrong that is causing my animated mesh not to show? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 29, 2014 Share Posted December 29, 2014 Hello, you should configure IIS with a web.config like this:```<?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> </system.web> <system.webServer> <staticContent> <mimeMap fileExtension=".json" mimeType="application/text" /> <mimeMap fileExtension=".dds" mimeType="application/dds" /> <mimeMap fileExtension=".tga" mimeType="application/tga" /> <mimeMap fileExtension=".fx" mimeType="application/fx" /> <mimeMap fileExtension=".babylon" mimeType="application/babylon" /> <mimeMap fileExtension=".babylonmeshdata" mimeType="application/babylonmeshdata" /> <mimeMap fileExtension=".babylonbinarymeshdata" mimeType="application/babylonbinarymeshdata" /> <mimeMap fileExtension=".cache" mimeType="text/cache-manifest" /> <!--<mimeMap fileExtension=".mp3" mimeType="audio/mpeg" />--> <!--<mimeMap fileExtension=".svg" mimeType="image/svg+xml" /> <mimeMap fileExtension=".mp4" mimeType="video/mp4" />--> </staticContent> </system.webServer></configuration>``` Quote Link to comment Share on other sites More sharing options...
mangualmanuel Posted December 29, 2014 Author Share Posted December 29, 2014 @deltakosh I went ahead and updated my web.config file and started my project up again but nothing loaded. Its still not showing me my walking character Quote Link to comment Share on other sites More sharing options...
davrous Posted December 29, 2014 Share Posted December 29, 2014 What happen if you're using our sandbox tool to load it: http://www.babylonjs.com/sandbox ? Does it display it? Note: the sandbox tool is not launching animation but it will be useful to check that your .babylon file is valid Quote Link to comment Share on other sites More sharing options...
mangualmanuel Posted December 29, 2014 Author Share Posted December 29, 2014 @davrous I did that and it shows nothing for my Walking.babylon file. What does that mean? Doe sit mean that there is no animation? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted December 29, 2014 Share Posted December 29, 2014 The problem with using the sandbox as debugging tool in this case is the camera and lights are not defined in the .babylon file. This development approach does have a little trickier debug, since you cannot just hit F12 in Blender to render and spot obvious things like the camera or lights are not pointed right. Also the 404 is on the optional manifest file, ignore that. First key question is: Do you get a Black window, meaning a lighting / aiming issue. Or white window, meaning a Java script error has occurred. Quote Link to comment Share on other sites More sharing options...
mangualmanuel Posted December 29, 2014 Author Share Posted December 29, 2014 While I am in the babylon.js sandbox I get a black window after the initial loading. Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 29, 2014 Share Posted December 29, 2014 Hello, I can see in yoru code that you are trying to create a shadow generator with an Hemispheric Light => you should have a javascript error with this.Try to replace your hemispheric light with a directional light (cf wiki https://github.com/BabylonJS/Babylon.js/wiki/15-Shadows), and everything will be ok If it is not, can you please provide an URL where we can debug in real time ? Cheers ! 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.