Search Forums

(Advanced Search)

Latest Threads
Stretching verts uniforml...
Forum: Obi Softbody
Last Post: Aroosh
Yesterday, 05:32 AM
» Replies: 0
» Views: 71
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
11-09-2025, 01:15 PM
» Replies: 25
» Views: 2,777
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 190
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 440
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 693
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 781
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 519
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 492
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 990
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 836

 
  Optimizing Stiff Cloth Object
Posted by: matsborges - 28-05-2021, 06:05 AM - Forum: Obi Cloth - Replies (5)

Hi,



I'm working for a project that's trying to simulate a renaissance manuscript with interactive parchment pages. We're trying to build it for Oculus Quest 2 standalone.


I have the page set up and working well through Oculus Link, so plenty of CPU power, but when I try to build it to run on the quest alone, I only get about 10 frames per second.


I've been building this knowing there's a trade-off between processing power and stiffness, but I'm wondering if someone might know a way to optimize a cloth object while still keeping it stiff. Parchment is a really rigid material, and any time I try to decrease my settings, I get a rubbery sheet.


I'm attaching images of my settings below:


Obi solver:
[Image: dhvWm82.png]
and
[Image: 28rMJcv.png]


Obi cloth object:
[Image: iM8bMA5.png]



3D model:
[Image: oELUFNI.png]



Any help would be greatly appreciated!

Print this item

  WebGL support with new backend ?
Posted by: mmortall - 27-05-2021, 06:34 PM - Forum: General - Replies (2)

Since we have a new Jobs-based Obi backend is there a chance to get webgl support someday? I tried the latest Obi CLoth version with webgl but I have some errors when I am adding cloth to simulation. At least it compiles now. 

Print this item

  Rope Tangent Help
Posted by: LORDeveloper - 27-05-2021, 04:46 PM - Forum: Obi Rope - Replies (2)

Hello,

I used the real-time generate hook sample to generate a rope for my crane game. It works fine on start, but when I change the rope length and have the jib up, it doesn't behave it should in real world

   
This what I have when I generate the rope in scene

   
And this is how it behave when I have the jib up and increase the rope length. I am expecting the rope should drop like the red line does.

How can I fix this?

Thanks.

Derek

Print this item

  Obi softbody catching on the edge of collider
Posted by: richienko - 27-05-2021, 02:29 PM - Forum: Obi Softbody - Replies (10)

Hi,
when I roll over edge of collider, the softbody will glitch out.
Two box colliders that are close together, and one is at the angle.
Here is setup:
https://drive.google.com/file/d/16Zr0FPN...sp=sharing
https://drive.google.com/file/d/1TewA4SM...sp=sharing

I'll send you video in PM in a minute if that's okay.

I tried increase thickness, but changing Thickness parameter of Obi collider is not presented in scene view. Only original collider is visible. 

Thanks.

Print this item

Triste Obi + cinemachine unity
Posted by: giulychu - 27-05-2021, 11:28 AM - Forum: Obi Fluid - Replies (1)

Hi! I'm Giulychu and i have a problem :/
I'm using obi fluid with normal camera in unity..and it's working.
But, if I use cinemachine, i dont' see obi fluid in the scene. why? cinemachine is not supported?

Print this item

  Can I have Obi Cloth 4.0 nowadays?
Posted by: wangkan - 27-05-2021, 06:19 AM - Forum: General - Replies (6)

Our project is made with Unity 2018. So we need Obi Cloth 4.0.

How can I purchase Obi Cloth 4.0 and C++ source code of physics library?

Print this item

Pregunta How to change the rest length of an existing rope at runtime?
Posted by: Hatchling - 26-05-2021, 09:27 PM - Forum: Obi Rope - Replies (4)

I've encountered a situation where I need to change the rest length of a rope that is already present in the scene.

I think I've figured out the solution, and the code seems to work, but I wanted to have you look over it to make sure I'm doing everything correctly (or if there's a better way).

I've added the following method inside ObiRopeBlueprintBase:

Code:
public void SetRestLength(float newLength)
{
    if(path == null)
    {
        Debug.LogError("Cannot set length because the path is null.", this);
        return;
    }

    if(path.Length == 0)
    {
        Debug.LogError("Cannot set length because it is currently 0.", this);
        return;
    }

    float multiplier = newLength / path.Length;

    if(float.IsInfinity(multiplier) || float.IsNaN(multiplier))
    {
        Debug.LogError($"Cannot set length due to floating point error. Old length: {m_RestLength} New length: {newLength}", this);
        return;
    }

    m_InterParticleDistance *= multiplier;
    m_RestLength *= multiplier;

    if(restLengths != null)
    {
        int count = restLengths.Length;
        for(int i = 0; i < count; i++)
        {
            restLengths[i] *= multiplier;
        }
    }
    else
    {
        Debug.LogError($"{nameof(restLengths)} is null. Perhaps it wasn't initialized?", this);
    }

    var ssData = stretchShearConstraintsData;
    if(ssData != null)
    {
        var batches = ssData.batches;
        var batchesCount = batches.Count;

        for(int iBatch = 0; iBatch < batchesCount; iBatch++)
        {
            var batch = batches[iBatch];

            var rlenList = batch.restLengths;
            var rlenListCount = rlenList.count;

            for(int iRest = 0; iRest < rlenListCount; iRest++)
            {
                rlenList[iRest] *= multiplier;
            }
        }
    }

    var dData = distanceConstraintsData;
    if(dData != null)
    {
        var batches = dData.batches;
        var batchesCount = batches.Count;

        for(int iBatch = 0; iBatch < batchesCount; iBatch++)
        {
            var batch = batches[iBatch];

            var rlenList = batch.restLengths;
            var rlenListCount = rlenList.count;

            for(int iRest = 0; iRest < rlenListCount; iRest++)
            {
                rlenList[iRest] *= multiplier;
            }
        }
    }
}

Since I'm doing this after the rope has been made, I get the feeling I might not need to do this from the blueprint. But as far as I know this is where the "data" for the rope is stored, whereas the rope itself represents an instance. (RopeBlueprint is to Rope as Mesh is to MeshFilter/MeshRenderer)

Do I, for example, need to call ObiActorBlueprint.OnBlueprintGenerate after making this modification?

On a side note, if my analogy between blueprints and actors vs. meshes and mesh renderers is accurate, I have a suggestion: (Ignore this section if this comparison is way off.) I noticed that ObiRopeBase.cs contains a "restLength" property that is recalculated under some conditions. It seems to me that since all ropes that share the same blueprint would have the same rest length, this data should be stored and calculated inside the blueprint:
  • All ropes using the blueprint will have the correct restLength value automatically the next time they read the property.
  • No need to recalculate the same value for multiple ropes sharing the same blueprint.
  • No need to use a callback to update the rope instances using the blueprint when it changes. (I don't know to trigger these.)
  • Could be useful during blueprint generation (as I had encountered before in a previous thread).
  • All the data about the blueprint (and common to all ropes that share the blueprint) is organized in one location.
  • The existing property can remain as a shortcut to writing rope.blueprint.restLength.

Print this item

  Precise control point editing
Posted by: greedylamo - 26-05-2021, 07:52 AM - Forum: Obi Rope - Replies (1)

Hello everyone,

I am unable to find a way to move path control points to precise positions in Obi Rope 6. Previously, Obi Curve seemed to be the exact tool for that, but it seems to now be deprecated.

The current path editor only allows to move points by hand and there doesn't seem to be any exposed position values - is there some setting that I am missing?

Is there any other way to set precise control point positions without custom scripts?

Thank you!

Print this item

  Change Shape Matching Constraints at Runtime
Posted by: richienko - 25-05-2021, 09:29 PM - Forum: Obi Softbody - Replies (2)

Hi,
first of all, you created amazing engine, kudos.

I'm not able to change shape matchig constraints at runtime.
My scenario: 1 solver has 1 softbody

I want to be able to change max deformation and deformation resistance at runtime. I really tried to do this based on what you write in http://obi.virtualmethodstudio.com/tutor...aints.html, but no luck.
First question -> you did write this "there's only one skin constraint per particle", where can I get info on how many actor constraints are for particle in softbody?


I tried this:

Code:
var shapeConstraints = softbody.GetConstraintsByType(Oni.ConstraintType.ShapeMatching) as ObiConstraints<ObiShapeMatchingConstraintsBatch>;
var solverConstraints = softbody.solver.GetConstraintsByType(Oni.ConstraintType.ShapeMatching) as ObiConstraints<ObiShapeMatchingConstraintsBatch>;

var softbodyBatch = shapeConstraints.batches[0];
int offset = softbody.solverBatchOffsets[(int)Oni.ConstraintType.ShapeMatching][0];

for (int i = 0; i < shapeConstraints.batches.Count; i++) {
    var solverBatch = solverConstraints.batches[i];
    for (int j = 0; j < softbodyBatch.activeConstraintCount; ++j) {
        int index = i + offset;
        solverBatch.materialParameters[0] = 0.1f; //deformationResistance
        solverBatch.materialParameters[4] = 0.9f; //maxDeformation
    }
}


And quite few variants but, I can't get it right.

Print this item

  compile error : Ver 6.1 (24-05-2021)
Posted by: lialear - 25-05-2021, 02:44 AM - Forum: Obi Cloth - Replies (3)

Unity Ver 2019.4.26f1

Assets\Obi\Scripts\Common\Solver\ObiSolver.cs(52,20): error CS0246: The type or namespace name 'ObiList<>' could not be found (are you missing a using directive or an assembly reference?)

Print this item