Brutile Posted May 16, 2014 Share Posted May 16, 2014 To anyone creating mesh at runtime, like an endless terrain or something, you don't have to call Update() on the surface you just created. It was in the documentation, so I thought it was something you had to do when you created a model, but you only need to call model->UpdateAABB() with local and global parameters, like in the docs. Updating the surface took around 15-20 milliseconds, which was causing frame drops when I was creating chunks of terrain, and there was nothing I could do to speed it up. But I tried it without surface->Update() and it now runs at a steady 100fps, instead of 100 and constantly dropping to 40fps. Hope this helped a few people 2 Quote Link to comment Share on other sites More sharing options...
Josh Posted May 17, 2014 Share Posted May 17, 2014 Update() is rather thorough. It will calculate binormals/tangents, BSP collision for raycasts, and some other stuff. Try calling UpdateBinormalsAndTangents() as well. I'm pretty sure the BSP collision will just recalculate itself only when needed. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. 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.