Jump to content

[SOLVED] - Combining Collision Meshes Or Not


MackeyK24
 Share

Recommended Posts

When i have a scene with a bunch of static scenery props like :

58e98f10b4698_ScreenShot2017-04-08at3_31_24PM.thumb.png.e001fddbcf457ac83a68f7d5e1614918.png

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 :)

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...