- Home /
How do I create a softbody that's relaxed by default?
2.In my soccer scene, there are a total of 8 softbodies (4 in each of the goals, for different parts of the net) with something like 400 vertices alltogether.
When I start the game, the framerate drops to something like 1 or 2 fps for a couple of seconds, during which times the softbodies are dropping to their idle positions. I think that's because after that time the rigidbodies go to sleep, and are deactivated for the time being, which restores the framerate to about 500 fps. This happens only when I put my laptop in power-saving mode, which essentially disables any and all GPU computing.
Are softbodies really this CPU-intensive? If so, how do I work around this? after all, only 1 or 2 of the softbodies will active at later times, and that doesn't seem to cause any problems. I'm guessing that if there's any way to mark the rigidbodies as sleeping on start-up, the problem can be solved
The reason they run so poorly is because the Unity $$anonymous$$m has paid little $$anonymous$$d to the needs of PC developers; there is no multi-core support for the Unity engine, but more importantly, there is no GPU PhysX support (which would give us insanely fast PhysX simulations). As a result, cloth physics are almost entirely unusable in any serious project. The best you can do right now is vote this up as a serious issue, as in this respect, Unity isn't even attempting to be competitive, and that is truly a shame.
http://feedback.unity3d.com/forums/15792-unity/suggestions/2069453-gpu-physx-support
Unity is such a great tool, and at the same time, small problems such as this make it very unusable for any large scale project... such a shame! Just out of curiousity, does this actually mean that the PS3 version runs on just one core as well? That'd be totally terrible!
Answer by roamcel · Aug 11, 2011 at 12:10 PM
This -MIGHT- solve your problem:
http://www.unifycommunity.com/wiki/index.php?title=TransformSaver
I have not tested it in your situation, but basically if you deliver the object transforms in their sleep positions, the engine should not hog cpu cycles.
Alternatively, you can access the project's physics manager and tweak the sleep times and such to make physics less cpu-intensive.