joshcamas Posted October 31, 2016 Share Posted October 31, 2016 Hia guys! It's been a while since I've used Babylon in a real project, so I ain't up to date with all of the Babylon features. Has anything been done with baking Shadows or lighting? What I'm thinking would make a lot if sense is if we could basically generate super fine and sexy shadows and make them static, so it would only be rendered once. (Or whenever you want) Is this a thing? If not, anyone interested in this idea? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 1, 2016 Share Posted November 1, 2016 Hey it is possible shadows (and all rendertargets actually) support a refresh rate. So just set your shadow generator to once with this code: shadowGenerator.getShadowMap().refreshRate = 0 Example: http://www.babylonjs-playground.com/#1Q2PPH#0 Quote Link to comment Share on other sites More sharing options...
joshcamas Posted November 2, 2016 Author Share Posted November 2, 2016 OoOOOooooOOOOOOoooo That's awesome! Is there a way to force render shadow whenever I want? Like if I set the refresh rate to 0 then I want to refresh it just once? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 2, 2016 Share Posted November 2, 2016 Set it in a scene after render to 0, so it is always reset to never. Whenever you wish to refresh set it to everyframe. GameMonetize 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.