optimize structure caching for blender/geometry nodes
in many cases a bvhtree or a kdtree is needed for raycasting or for nearest element searches etc,
if a mesh does not change, its bvhtree does not change, so in a sim - each frame a new bvhtree is built for all geometry - even geometry that has not changed.
in a test using upbge to do a physics sim it was taking 6-9 ms if I used raw py and managed my own bvhtree it took .12 ms.
this is 75x faster in raw python (in theory cpp should be 400x faster?)
if a request is made for a bvhtree - and that mesh has not changed - the old tree should be re-used.
0 Comments