Hi,
I am currently working on a raycaster in Unity which allows any mesh to become destroyable.
I have some videos of it here:
The videos are of very low framerate due to recording with VLC. The actual framerate is MUCH higher; I get 60 fps on a distance, and ~40fps with fullscreen raycasting (raycasting on every pixel of the screen, which is heavy). Note that this is using SBS and warping for the Oculus Rift; without this I believe the framerate will be much higher. This is on a AMD A10 K5800, a not too heavy GPU.
It should work fine also with the free Unity version.
I currently have some options built in for adjusting the raycasting: adjustable and optional dithering (search for dither raycasting), adjustable stepsizes for the rays, a customizable number of voxels per object, a 2D texture for the inside(s), and different voxel formats (smoothed, more smoothed and rectangular). On the outer texture (on the actual unraycasted geometry) you can apply a bumpmapped texture.
It works best on rectangular geometry since the voxelgrid is rectangular as well. If you watch the videos you’ll see you’ll nice results with spheres and cylinders as well. For example a tree, where the stem is thin and the leaves part is big, would work less well, so it’d be best to seperate the stem and leaves part and apply seperate voxelgrids.
Let me know if you are interested; I’ll release this plugin in the asset store if there’s enough demand for it.
Currently I haven’t implemented physics yet, this won’t take up a lot of time I figure.
I’ll release a demo in a short while.
Greetings,
Kajos