simon_bg Posted August 1, 2017 Share Posted August 1, 2017 Hello everyone, Is is possible to implement some occlusion or LOD-like mechanism for sprites in Babylon? I have a scene with a very large terrain and some forest areas represented by thousands of tree sprites. There are so many sprites that they actually affect performance. Could someone point me in the right direction? Is there a way to adapt LOD for sprites? Or could I put the camera into some kind of transparent mesh and in some way occlude the sprites behind the mesh walls? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 1, 2017 Share Posted August 1, 2017 Hey why not relying on actual lod for meshes and use planes with billboard to simulate sprites? Quote Link to comment Share on other sites More sharing options...
simon_bg Posted August 2, 2017 Author Share Posted August 2, 2017 Thank you for your response! I tried to do that, but unfortunately the performance is waaay worse with meshes, even using instances and LOD with small distance to the camera:https://www.babylonjs-playground.com/#KBBWVT#1 With 10000 sprites it renders with 60 FPS on my computer, but using 10000 planes with instances and LOD results in 20 FPS Quote Link to comment Share on other sites More sharing options...
Temechon Posted August 2, 2017 Share Posted August 2, 2017 @simon_bg Could you send me a playground with an examples with sprites ? I'll code a lod function for this. Quote Link to comment Share on other sites More sharing options...
simon_bg Posted August 2, 2017 Author Share Posted August 2, 2017 Like this, you mean? https://www.babylonjs-playground.com/#KBBWVT#2 Temechon 1 Quote Link to comment Share on other sites More sharing options...
Temechon Posted August 2, 2017 Share Posted August 2, 2017 https://www.babylonjs-playground.com/#KBBWVT#3 The performance is almost the same as billboards Quote Link to comment Share on other sites More sharing options...
simon_bg Posted August 2, 2017 Author Share Posted August 2, 2017 That's a pity... Thank you for your time anyways! 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.