Performance degradation with overlapping meshes

I’m not sure that it’s related to Needle, but overlapping meshes cause performance degradation.


Original Post on Discord

by user 301690209303658496

Are you using colliders on the meshes?

Are the meshes raycastable? You can set them to the noRaycast layer in Unity. It might be an issue if they are high-poly (looks a bit like it from the screenshot)

Yes, they use mesh collider

by user 301690209303658496

Is the mesh collider optimized? Can you try if it is better without the mesh colliders?

Yes, without mesh colliders everything is okay, buy adding them to Ignore Raycast layer don’t improve performance

by user 301690209303658496

Yeah, sorry for such issue, probably using box collider will solve this

by user 301690209303658496

Ok so perhaps an issue with rapier since they collide with each other every frame - at least that’s something I’d guess. The API for setting physics collision layers is not yet exposed unfortunately

Thanks!

by user 301690209303658496

If box colliders would work for now then it would be ideal. Midterm we should expose and export physics layers with which this could probably be solved

Do you think you can send me the scene with the issue too? I can add it to a bug for testing internally too when we add support for that. Would be good to have a scene to verify / test against too

Ofc, one minute

by user 301690209303658496

You can send it as a bug report (using the menu item Needle Engine/Report a bug)

Bugreport-SampleScene-230620-035652_uw

by user 301690209303658496

Thank you