Skip to content

Physics - rigid bodies insomnia

Physics - rigid bodies insomnia

Postby ivankio » 01 Nov 2011, 06:22

This is more related to the PhysiX engine than Antares Universe, but I post it here related to Neodrop multithreaded physics demo:
http://forum.unity3d.com/threads/108327 ... tions-(WIP)

You said people to wait the blocks become blue (which we assume they come to sleep). They seem to be really picky to sleep, and I assume that theoretically "sleep velocities" settings should help. I'm shure you didn't overlook it, but why couldn't these attributes be used to help? I assume a manual velocity check with forced sleep could introduce too much computation. Follows my experiment:

unity_Q01.png
* ATM, 10 unity units = 10 cm. A ball is 6 in diameter, gravity = -100 (-980 would make it much less likely to sleep), timestep = 0.005

I don't get why the rigidbody does not sleep when bellow the thresholds set for sleep velocities. The screenshot displays the read values for the the black ball. It have no forces applied on it (except gravity) and it eventually comes to sleep only when velocities are near 0.000001. The table is just a static collider.

As "sleep velocities" are single floats, I'm assuming they are actually "sleep speed". Anyway, the magnitudes are also read bellow the thresold. Any insight why are the bodies so hard to sleep?
ivankio
 
Posts: 31
Joined: 14 Sep 2011, 21:35

Re: Physics - rigid bodies insomnia

Postby Neodrop » 01 Nov 2011, 19:44

Did you set Sleep Velocity here : Edit/Project Settings/Physics
of for rigidbody manually ?
User avatar
Neodrop
Администратор
 
Posts: 1068
Joined: 15 Jan 2011, 13:18

Re: Physics - rigid bodies insomnia

Postby ivankio » 01 Nov 2011, 21:13

Yes, that's where the body is getting it from. If it should follow what's written here http://unity3d.com/support/documentatio ... eping.html - then I think it should work as is.

In your multithreaded example they also seems to be hard to sleep. Your demo is one I think would benefit a lot of it, so when I see the bodies having trouble getting to sleep, I guessed you encountered the same problem. If you would increase the sleep velocities a lot, would the bodies sleep easier?
ivankio
 
Posts: 31
Joined: 14 Sep 2011, 21:35

Re: Physics - rigid bodies insomnia

Postby ivankio » 01 Nov 2011, 21:22

Wops, nevermind about the relation, I forgot that the awakening of your bodies is because of rigidbody + rigidbody frequent collisions. Now I'm even more clueless. Thanks for trying to help, neo.
ivankio
 
Posts: 31
Joined: 14 Sep 2011, 21:35

Re: Physics - rigid bodies insomnia

Postby Neodrop » 01 Nov 2011, 22:14

BTW - my demo is based on complitely other physics engine. Not with builtin one. And it's freezed as fast as less objects is collided each other.
User avatar
Neodrop
Администратор
 
Posts: 1068
Joined: 15 Jan 2011, 13:18

Re: Physics - rigid bodies insomnia

Postby Kamilla1 » 24 Nov 2015, 14:16

Thank you for posting this information!)
Kamilla1
 
Posts: 11
Joined: 24 Nov 2015, 13:11


Return to General Discussion

Who is online

Registered users: No registered users