KevinBLT Posted August 7, 2015 Share Posted August 7, 2015 Hello everyone, I'm back again with a question.I have a scene (see screenshot below) that is static after the construction has finished.I want to render shadow once after the construction. I tried "renderTargets" off. But the shadow sometimes disappears. I would need something like a shadowgenerator manual mode.So like "calculateShadow" and then it keeps this shadow map until the next "calculateShadow" call. Is there something like that or an easy way to achieve that?I think this is something useful for other users too. Have a nice day, Kevin Quote Link to comment Share on other sites More sharing options...
monkeyface Posted August 7, 2015 Share Posted August 7, 2015 If the light isn't moving and mesh isn't changing, you can just bake the lighting into a light map using blender. What would be awesome is if babylon had a lightmap baker built in - was looking for a javascript implementation to copy but I couldn't find one Quote Link to comment Share on other sites More sharing options...
KevinBLT Posted August 7, 2015 Author Share Posted August 7, 2015 The Mesh changes.But only if you change the settings of the construction.Then all the bar positions get recalculated. But between then and the next change nothing happens to the view, except the camera angle/zoom.So these "buildings" have neither seen blender in any time nor will they see it in the future. It's completely build out of "BABYLON.Mesh.CreateBox" and CSG subtractions. I hope it's a bit clearer now. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 7, 2015 Share Posted August 7, 2015 We have exactly what you need:) http://doc.babylonjs.com/classes/2.1/RenderTargetTexture#refreshrate-number Use 0 to render just once, 1 to render on every frame, 2 to render every two frames and so on... So set shadowGenerator.getShadowMap().refreshRate = 0 and you're done adam and rodrigop 2 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 7, 2015 Share Posted August 7, 2015 Oh and btw I used the function linking feature of the doc which works perfectly (GG @temechon:)) Temechon 1 Quote Link to comment Share on other sites More sharing options...
Temechon Posted August 9, 2015 Share Posted August 9, 2015 Thanks :) Quote Link to comment Share on other sites More sharing options...
KevinBLT Posted September 2, 2015 Author Share Posted September 2, 2015 Hello, I am back from my holidays. I will implement this ! A big thank you. Now I can use the biggest possible shadow map, I think.And everything will look fantastic. Have a nice day Kevin Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 2, 2015 Share Posted September 2, 2015 feel free to share your project when possible 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.