MackeyK24 Posted April 9, 2017 Share Posted April 9, 2017 When i have a scene with a bunch of static scenery props like : I have a bunch of separate LOW POLY INVISIBLE collision meshes, some grouped and some for each piece ... These low poly invisible meshes are use for Camera Collision (mesh.checkCollision = true) and used as the 'Collision Mesh' in my BJS Toolkit for things like Physics Collision and Mesh Intertection... Is Working Great. Now when it comes to optimizing the scene .... i have a 'Static Batching' feature that will combine all the meshes on the 'Babyon Static' batching layer by material. Now at right before i cache each mesh for static combining i generate is collision mesh based of the 'Collider Component'... Ok... Say i end up with 250 separate low poly INVISIBLE pieces (so draw calls should not be AS MUCH of an issue) but the 'CHECK COLLISION' computation that has to go on for each mesh ... m.checkCollision = true. Would it be BETTER for the 'Check Collision Computation Performance" to keep EACH mesh collider separate OR combine all LOW - POLY mesh colliders into one big mesh... I don't know if the invisible collision mesh implementation would be the only case where it is better to have separate meshes (even though on same default material and even though they are actually invisible) than combine meshes... Purely based on if the the mesh.checkCollision would perform BETTER checking things on 250 separate low poly pieces OR using the same vertex count of all those 250 pieces combined into a single mesh... set with checkCollision = true; WHAT SHOULD I DO Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 10, 2017 Author Share Posted April 10, 2017 Yo @Deltakosh , @davrous , @RaananW , @Sebavan ... Any of you BJS gurus ... Any thoughts here... Should i combine all my (lets say 200) static low poly and invisible collision meshes or keep them separate ??? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 10, 2017 Share Posted April 10, 2017 Hey Mackey! so for collision optimization the idea is to keep separated low poly meshes because then you will allow the bounding boxes optimization to work at full speed: One big mesh means only one bounding box and thus the collision will be force to check ALL the geometry 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.