Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
obi stitcher softbody
#1
Hi

does the obi stitcher work with 2 soft bodies?
if it does is there any documentation how to use it?

i tried it on the barrel example scene like this,

moved 2 barrels close to each other.
added the stitcher to the solver and the barrels to the first/second actor.
press edit and added stitches, i could see green dotted lines for the stitches.
pressed edit to get out of edit mode.
press play and fired at the barrels, they are not constrained together.

anything i did wrong or does it not work?

thanks
Reply
#2
Stitch constraints are globally disabled in that particular scene's solver component, because they're not used. Make sure to enable them, or they will be ignored during simulation. See:
http://obi.virtualmethodstudio.com/tutor...olver.html
Reply
#3
thank you
it still doesnt work, is this the best way to constrain 2 soft bodies?
Reply
#4
(09-09-2020, 02:34 AM)tegleg Wrote: thank you
it still doesnt work, is this the best way to constrain 2 soft bodies?

Hi there,

Just tried it and does work for me, this is the best (and currently only) way to constrain 2 softbodies.

What Obi version are you using?
Reply
#5
im using the latest version, fresh download and project the other day.
i must be missing a step somewhere.

please could you produce a document or a video showing how to do it?

thank you
Reply
#6
(09-09-2020, 12:44 PM)tegleg Wrote: im using the latest version, fresh download and project the other day.
i must be missing a step somewhere.

please could you produce a document or a video showing how to do it?

thank you

Hi,

My bad, I was testing using the development version (5.6). There is a small bug in 5.5 that prevents stitch constraints from working the first time they're enabled. The fix is easy:

Open ObiStitcher.cs, then take line 186:
Code:
inSolver = true;

And move it to line 177, at the start of the method. Should look like this:

Code:
if (!inSolver)
            {

                inSolver = true; // <------

                // create a constraint batch (CreateStitchConstraints() in burst returns a singleton):
                m_BatchImpl = solver.implementation.CreateStitchConstraints().CreateConstraintsBatch();

                // push current data to solver:
                PushDataToSolver();

                // enable/disable the batch:
                m_BatchImpl.enabled = isActiveAndEnabled;


            }

The stitcher should work fine now.
Reply
#7
yes that works

thank you
Reply