A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by DashW » Thu Apr 09, 2015 5:13 pm
Having spent the last few months working with the ragdoll provided in the Newton examples, I'm now finding that when the ragdoll is suspended, the ragdoll's arms and legs tend to swing for a long time, with very little friction. I'd like a ragdoll that is a little more 'soft and fleshy', so for that, I'd like to add damping to the angular movement of the CustomLimitBallAndSocket joint.
I've played around with min/max friction and stiffness, but these don't seem to have the right effect, presumably because the CustomLimitBallAndSocket joint only consists of Linear rows and doesn't constrain orientation until the joint has actually reached one of its angular limits. What would be the best way to introduce angular damping for both the cone and twist into this joint?
-
DashW
-
- Posts: 5
- Joined: Sun Aug 03, 2014 4:45 am
by Julio Jerez » Thu Apr 09, 2015 5:38 pm
are you making you own rag doll?
if you are you need to use a Joint with dry friction, damping is a adhoc way that almost never works
if you look at example ..\applications\demosSandbox\sdkDemos\demos\StandardJoints.cpp
there is a class CustomBallAndSocketWithFriction: public CustomBallAndSocket
play the demo see if it is what you want, than you can take that joint and
class CustomLimitBallAndSocket: public CustomBallAndSocket
and make one joint that does Friction when the limit is not violated and limit when it is.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by DashW » Mon Apr 13, 2015 5:45 pm
Yes, I am sort of making my own ragdoll specification system, loosely based on the ragdoll example.
Wow, I didn't know about the CustomBallAndSocketWithFriction! I've taken your advice and combined it with the CustomLimitBallAndSocket to create a CustomLimitBallAndSocketWithFriction (maybe need to think of a more imaginative name

). If the joint is not constrained by the twist or cone limit, and its friction value is greater than zero, the angular rows are added with the friction applied.
It took some trial and error to get to that solution, but now it seems to work quite well, and it also exposes bodies in the ragdoll that have incorrect masses. Thank you Julio!
-
DashW
-
- Posts: 5
- Joined: Sun Aug 03, 2014 4:45 am
by Julio Jerez » Mon Apr 13, 2015 6:08 pm
The one thing you have to consider is that the joint friction is no exactly like a coulomb frictions.
a coulomb friction is a coefceondt that is multiplied by the curent force or torque at the point.
the mean for example of you have 0ne box resting on the floor, the fruition is proportional to the weight of the Box, if you have tow boxes staked on top of each other the friction is proportional the the weight of the two boxes, and so on.
for a torque friction toy can no really pass a coefiecnet of friction, for tow reason.
1- I do no know any columb for dry friction torque.
2- The friction toque is specific as a torque value in the call back.
what you could do is that empirically you can specific different torque values base of the location of et joint. for example a lower arm have lower friction than and upper arm, and so on.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 1 guest