sergiopt Posted July 18, 2015 Share Posted July 18, 2015 Hello i am struggling to put shadows in "predio.babylon" file, is just a scene with a building and ground, created and exported from blender addon.i have success with the generated primitives from babylon, but with json files not.I have attach my files,hope your help, thanks.public_html.zip Quote Link to comment Share on other sites More sharing options...
iiceman Posted July 19, 2015 Share Posted July 19, 2015 Try that, that should work:// Shadowsvar shadowGenerator2 = new BABYLON.ShadowGenerator(1024, light2);shadowGenerator2.getShadowMap().renderList.push(newScene.meshes[1]);newScene.meshes[0].receiveShadows = true;newScene.meshes[1].receiveShadows = false;//shadowGenerator.usePoissonSampling = true;shadowGenerator2.useBlurVarianceShadowMap = true;I think the main problem was that you referenced newScene[0] instead of newScene.meshes[0]. and the [0] is the ground it seems... so you had to push the the other mesh [1]. On another note: you can't use usePoissonSampling and useBlurVarianceShadowMap at the same time as far as I know. They just overwrite each other. decide which one you want. I kind of assume you can set these things up in blender and then let the exporter do that for you. but I am not sure aobut that. I think we wait for one of the blender/exporter senpais to clear that up Anyways, hope it helps GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
sergiopt Posted July 19, 2015 Author Share Posted July 19, 2015 Try that, that should work:// Shadowsvar shadowGenerator2 = new BABYLON.ShadowGenerator(1024, light2);shadowGenerator2.getShadowMap().renderList.push(newScene.meshes[1]);newScene.meshes[0].receiveShadows = true;newScene.meshes[1].receiveShadows = false;//shadowGenerator.usePoissonSampling = true;shadowGenerator2.useBlurVarianceShadowMap = true;I think the main problem was that you referenced newScene[0] instead of newScene.meshes[0]. and the [0] is the ground it seems... so you had to push the the other mesh [1]. On another note: you can't use usePoissonSampling and useBlurVarianceShadowMap at the same time as far as I know. They just overwrite each other. decide which one you want. I kind of assume you can set these things up in blender and then let the exporter do that for you. but I am not sure aobut that. I think we wait for one of the blender/exporter senpais to clear that up Anyways, hope it helps thanks, you help me a lot. 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.