Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alternative Bending Constraint Implementation
#1
Hey not sure if this is the right place to put this question.

I'm using Houdini to create a bunch of complex constraint relationships. I export the houdini constraint data as json and generate Obi constraint batches via a custom blueprint script.

This is all working pretty well but my Houdini configurations rely heavily upon Bend Constraints which in Houdini's vellum are implemented as two triangles sharing an edge; four points per constraint. (https://www.cs.ubc.ca/~rbridson/docs/cloth2003.pdf)

Obi's implementation of bending constraints, I believe uses this technique (http://image.diku.dk/kenny/download/kela...e.ea10.pdf) Which isn't going to give me the results I'm after. 

I guess my questions are: 

Was there a reason you chose the triangle blending constraint implementation vs the two triangle edge one?
Are there any plans to add support for the two triangle edge Bending constraint?
How difficult would it be to extend Obi to add support for this constraint? I'm assuming I would have to modify the Burst Solver.
Reply
#2
(10-11-2020, 06:34 PM)saiacide Wrote: Hey not sure if this is the right place to put this question.

I'm using Houdini to create a bunch of complex constraint relationships. I export the houdini constraint data as json and generate Obi constraint batches via a custom blueprint script.

This is all working pretty well but my Houdini configurations rely heavily upon Bend Constraints which in Houdini's vellum are implemented as two triangles sharing an edge; four points per constraint. (https://www.cs.ubc.ca/~rbridson/docs/cloth2003.pdf)

Obi's implementation of bending constraints, I believe uses this technique (http://image.diku.dk/kenny/download/kela...e.ea10.pdf) Which isn't going to give me the results I'm after. 


You're 100% spot on.


(10-11-2020, 06:34 PM)saiacide Wrote: Was there a reason you chose the triangle blending constraint implementation vs the two triangle edge one?

Yes: performance and convergence speed. These are analyzed in detail in the triangle bending constraints article you linked. The two-triangle constraint (aka dihedral angle constraint) requires trigonometric operations which are slow. It also converges slower than triangle bending, which means that for the same computational cost you get a less stiff constraint. So for realtime purposes where you need good results with minimal performance impact, triangle constraints are the best choice.

In addition to this, dihedral angle parallelizes worse since it affects 4 particles instead of 3, so graph-coloring generates more batches.

The only downside I can think of for triangle bending compared to dihedral angle, is that parameter setting is a bit less intuitive.

(10-11-2020, 06:34 PM)saiacide Wrote: Are there any plans to add support for the two triangle edge Bending constraint?

Not currently, as there's hardly any benefit in doing so in the general case. (besides mimicking the results of other simulators).

(10-11-2020, 06:34 PM)saiacide Wrote: How difficult would it be to extend Obi to add support for this constraint? I'm assuming I would have to modify the Burst Solver.

It is moderately complex, several things would need to be done: modify ObiClothBlueprint to cook dihedral angle constraints, instead of/in addition to triangle bending constraints, add new ObiDihedralAngleConstraints class, and implementations for Burst and Oni backends (the Oni one can just be empty). Most of the work stems not from the constraint code itself, but the scaffolding necessary to be able to generate them/edit them/solve them in parallel.

Can you give further details of your problem? there might be ways to solve it (completely or partially) without resorting to re-implementing Houdini Guiño.
Reply
#3
Thanks for the detailed response.

We have a couple of different use cases. 

-The player is inside a soft body world like a big squishy tube. The tube is not closed/solid.
-The player can collide, grab, and pull on the world.
-There are solid softbody objects attached to the world.
-The player can grab and rip apart this pre-fractured softbody objects.

I don't think shape matching is the right approach for this, particularly the tearing part.

In the tests I've run in houdini I've gotten good results using distance constraints and bend constraints. Houdini can create these internal struts of distance constraints which preserves the volume pretty well. 
For non-solid objects, I've been creating distance constraints to some fix/static world position to kinda pin the object in place.
For ripping apart I'm thinking of pre-fracturing in Houdini and creating distance constraints that I remove after some threshold.

If the triangle bending constraints are as good or better than the DihedralAngle it sounds like a better approach would be to modify my houdini tool to generate triangle bending constraints vs attempting to implement DihedralAngleConstraints in Obi but I'm open to any other ideas/recommendations.
Reply