Dal Posted May 7, 2016 Share Posted May 7, 2016 The groundmesh optimize function makes the terrain disappear: http://www.babylonjs-playground.com/#ON8FM It seems to only work if it is run repeatedly during the update loop: http://www.babylonjs-playground.com/#ON8FM#1 It's far too expensive to run this every frame on a large terrain though... how come it can't just run once to create the octree if the geometry isn't changing? Quote Link to comment Share on other sites More sharing options...
jerome Posted May 7, 2016 Share Posted May 7, 2016 Maybe you should call optimize() only once you are sure the ground is generated from the heightmap texture (download latency), so in the callback function of CreateGroundFromHeightmap() Quote Link to comment Share on other sites More sharing options...
Dal Posted May 7, 2016 Author Share Posted May 7, 2016 Hey, you're right! http://www.babylonjs-playground.com/#ON8FM#3 It doesn't seem very useful though... it only subdivides into lines that go right the way across, so they aren't easily culled... and more importantly it increases the draw call count significantly so it actually seems to slow things down 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.