11-11-2020, 08:59 AM
(This post was last modified: 11-11-2020, 09:10 AM by josemendez.)
(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 .