Accelerating structures for raycasting against mesh objects

I was wondering if there is a library or feature within Babylon.js that allows to use accelerating structures for raycasting against mesh objects (like BVH, octotree). I have a large scene with multiple mesh objects and am experiencing significant performance issues when using the built-in raycaster. Also, it’d be great to be able cast planes on meshes.

I have looked through the documentation and cannot find any mention of this type of feature. Is there a way to optimize raycasting in large scenes with multiple mesh objects, or is there a library that has been developed specifically for this purpose?

Any suggestions or guidance would be greatly appreciated. Thank you!

Hello! There is the possibility of using octrees: Optimizing With Octrees | Babylon.js Documentation (I’m not sure if this applies only to submeshes in a single mesh or to the entire scene? @sebavan do you know? ), and while that is not built in (yet), GPU picking is another good strategy: GPU picking demo - Demos and projects - Babylon.js (babylonjs.com)

1 Like

Should I understand that this is on the list or in the pipeline? Thx and have a great day :sunglasses:

Oh, not on any immediate list, but if you have interest could you create a feature request so we can discuss? :stuck_out_tongue: Or maybe someone on the community is interested in implementing :sweat_smile:

2 Likes