pardo Posted February 1, 2016 Share Posted February 1, 2016 Hi Everyone , I'm just starting to work with BJS. I'm trying the ShadowGenerator but I have an issue with the shadow that appears to be a bug but I'm not sure. I've looked up for the "shadow" and "shadows" tag on the forum but I couldn't find anything. http://www.babylonjs-playground.com/#E3ZTS#0 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 1, 2016 Share Posted February 1, 2016 Hello! welcome ! Here is the fix: http://www.babylonjs-playground.com/#E3ZTS#1 pardo and Boz 2 Quote Link to comment Share on other sites More sharing options...
Estraven Posted May 10, 2016 Share Posted May 10, 2016 Hello, I'm digging up this topic as I have a similar problem, but the "bias" does not fix it. I have a simple babylon file imported from blender, I add a PointLight in the scene and create a Shadow Generator. Here is some pieces of my code : this.light = new BABYLON. PointLight("light", new BABYLON.Vector3(0,2.8,0), scene); var shadowGenerator = new BABYLON.ShadowGenerator(1024, this.light); shadowGenerator.bias = 0.00000000001; // OR EVEN 0 shadowGenerator.setDarkness(0.5); // for each shadow projecting object "pup" { this.light.includedOnlyMeshes.push(pup); shadowGenerator.getShadowMap().renderList.push(pup); } this.room.receiveShadows = true; var lightbulb = BABYLON.Mesh.CreateSphere("lightbulb", 16, 0.1, scene ); lightbulb.position = this.light.position; lightbulb.material = new BABYLON.StandardMaterial("material01", scene); lightbulb.material.emissiveColor.r = 1; lightbulb.material.emissiveColor.b = 1; lightbulb.material.emissiveColor.g = 1; Yet, i get the image attached. the white sphere is the light, the shadow are clearly not where they should be... Any suggestions ? Thanks ! Quote Link to comment Share on other sites More sharing options...
Estraven Posted May 10, 2016 Share Posted May 10, 2016 Ok nevermind, using the 2.4 nightly build instead of Babylon 2.3, it's fixed. NasimiAsl 1 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.