Inequality Constraint in PBD

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
apapaxionga
Posts: 19
Joined: Mon Jul 14, 2014 9:05 pm

Inequality Constraint in PBD

Post by apapaxionga »

In position based dynamic, equality constraint such as distant constraint can be solved using constraint projection method. However, in paper related to PBD, how to solve inequality constraint are not mentioned a lot. How to solve the inequality constraint in the PBD framework ?
Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Re: Inequality Constraint in PBD

Post by Dirk Gregorius »

You simply skip over the constraint if the inequality is satisfied.
apapaxionga
Posts: 19
Joined: Mon Jul 14, 2014 9:05 pm

Re: Inequality Constraint in PBD

Post by apapaxionga »

Dirk Gregorius wrote:You simply skip over the constraint if the inequality is satisfied.
Then, if the inequality constraint is not satisfied, how to solve the constraint?
Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Re: Inequality Constraint in PBD

Post by Dirk Gregorius »

Conceptually very much like equality constraints. It depends on the type
raigan2
Posts: 197
Joined: Sat Aug 19, 2006 11:52 pm

Re: Inequality Constraint in PBD

Post by raigan2 »

If your state is within the valid region: the constraint isn't violated, you don't have to do anything.
If your state is outside the valid region: find the point on the surface of the valid region closest to the current state, this is your target state.

So, for a min/max distance constraint:

if(current_distance < min_distance): project to min
if(current_distance > max_distance): project to max
else: do nothing

("project to X" means "solve distance constraint using X as the desired/target/rest distance")
Post Reply