We’ve been busy
We haven’t posted in a while because we wanted to create a soft-body solution that could work well on mid-level machines and mobile devices while keeping to the same gameplay mechanics on both. It took four weeks of Research and another four weeks of development and micro optimizing. Typically, we don’t micro-optimize until closer to the end, but in this case, it was crucial due to the amount of data handled in milliseconds. Here’s a preview of our progress below.
Note: This tech is currently not for sale or licensing.
What is Soft-Mesh?
Soft-mesh is a new alternative to soft-body physics in Unity that handles only mesh deformation and collisions. Since it does not require heavy calculations, it is about 80% faster than soft-body physics and can work on mid-level mobile phones with excellent performance. In addition, it works in conjunction with our dynamic colliders. Dynamic Colliders are advanced shape-matching convex colliders that mimic almost any shape at runtime, even water-like forms. Unlike static colliders, dynamic colliders can be controlled by a rigidbody.
Soft-Mesh vs. Soft-Body physics
Soft-body physics adds a level of destruction in games most gamers are guilty of enjoying. For example, driving a vehicle in a racing game at 200 mph and “accidentally” running into a wall should result in catastrophic damage – not just a few scratches on the bumper or a broken headlight. Soft-body physics in Unity can achieve catastrophic vehicle damage and deformation but sometimes at a high CPU cost.
On the other hand, Soft-Mesh doesn’t require much processing power, mainly because it only deforms the mesh – not process and calculate the springs, mass, velocities, and all of the nodes of the body. Soft-Mesh allows us to add more and larger objects and control how the mesh deforms after a collision. We will still use soft-body physics in our games, but only when soft-mesh can not do the job.
Note: Soft-mesh is not a soft-body replacement; it is an alternative. Soft-body physics or dynamics are much more advanced; they are CPU intensive and require heavier calculations.
Tutorial or White Paper?
Soft-Mesh and Dynamic Colliders are both still a work in progress. However, we have progressed enough to fully integrate them with the rest of our Tatsu Toybox framework. Once we have released a game or two on Desktop and mobile and it is a proven success, we may write an in-depth tutorial or whitepaper. No promises.
We do not wish to write a tutorial this early because our process is continuously evolving as we move forward. For example, 12 days ago, the framerate on the same objects in the video above was roughly 30-40 fps. If we had written a whitepaper, it could have led many developers in the wrong direction, wasting their production costs and efforts. Since we are indie and self-funded, currently without deadlines, we have that luxury to explore, experiment, and even fail a few times. We have discovered over 60 different ways NOT to create soft-body physics.
We have received many emails and direct messages over the last few days, with most questions curious about performance. The framerate is the top right corner of most of our recently posted videos on Twitter and Reddit. The framerate is there so everyone can see the performance. With that said, it can and will perform much faster than shown in the videos. The screen recorder, post-processing effects, and custom shaders add overhead to the framerate. As for mobile, it can efficiently run 60 fps with 100+ simultaneously deformable objects on most mid-level phones released in the last three years.
Want to see more?
If you want to see more updates about our future content, consider following us on social media. For Developers, we frequently post dev videos on Twitter and Reddit and milestone videos on YouTube. For Gamers, we post game-related updates on Instagram and Facebook.