Pryme8 Posted March 3, 2016 Share Posted March 3, 2016 http://www.babylonjs-playground.com/#CQJMX#0 How can I stop the boxes that are not needed to be displayed because they are covered by other blocks not compute? If i increase the grid size to like 32 or even 64 then it lagggggggsssss.... especially if I increase the height. There is a lot of useless script in there I whipped this up in like 20 mins just to get the idea down, now I want to extend and refine it. Quote Link to comment Share on other sites More sharing options...
jerome Posted March 3, 2016 Share Posted March 3, 2016 we need to re-run (press back on RUN after first load) your PG because the perlin noise script is not loaded. Btw, you don't need to write "new" before the calls to "CreateXXX()" what are static methods. If you want to set a mesh as invisible "mesh.isVisible = false;" should do the trick. In your PG, actually you create many (2000+) similar meshes (boxes). Maybe you should consider using "instances" instead : http://doc.babylonjs.com/tutorials/How_to_use_Instances or a solid particle system : http://doc.babylonjs.com/overviews/Solid_Particle_System Both will render only one mesh Pryme8 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.