Search Forums

(Advanced Search)

Latest Threads
Change rod section at run...
Forum: Obi Rope
Last Post: matty337s
Today, 06:07 AM
» Replies: 0
» Views: 26
Sliding along a rope
Forum: Obi Rope
Last Post: vrt0r
Yesterday, 07:43 PM
» Replies: 0
» Views: 27
In SolidifyOnContact exsa...
Forum: Obi Fluid
Last Post: asimofu_ok
Yesterday, 04:15 PM
» Replies: 2
» Views: 53
Is it possible to render ...
Forum: Obi Fluid
Last Post: asimofu_ok
Yesterday, 10:07 AM
» Replies: 2
» Views: 75
Cloth has stretchy behavi...
Forum: Obi Cloth
Last Post: Andreia Mendes
31-07-2025, 02:38 PM
» Replies: 22
» Views: 845
Get separate particles pa...
Forum: Obi Fluid
Last Post: slimedev
29-07-2025, 06:51 PM
» Replies: 6
» Views: 3,186
Solver outside of hierarc...
Forum: General
Last Post: Jawsarn
29-07-2025, 06:19 PM
» Replies: 4
» Views: 170
Rope ignoring colliders o...
Forum: Obi Rope
Last Post: josemendez
24-07-2025, 07:03 AM
» Replies: 1
» Views: 134
Ladder made by Ropes (Rat...
Forum: Obi Rope
Last Post: josemendez
23-07-2025, 01:43 PM
» Replies: 5
» Views: 315
can you remove particles ...
Forum: Obi Softbody
Last Post: josemendez
22-07-2025, 02:19 PM
» Replies: 1
» Views: 182

 
  Scripting pinconstraints on 2 non-kinematic rigidbodies
Posted by: ibbybn - 07-03-2018, 05:35 PM - Forum: Obi Rope - Replies (1)

Here's my current code to change the pinconstraints during runtime:

Code:
        rope.PinConstraints.RemoveFromSolver (null);

        ObiDistanceConstraintBatch distConstraints = rope.DistanceConstraints.GetFirstBatch ();
        ObiPinConstraintBatch pinConstraints = rope.PinConstraints.GetFirstBatch ();

        pinConstraints.Clear ();

        Oni.SetParticlePositions (
            rope.Solver.OniSolver,
            new Vector4[] { new Vector4 (SubStart.transform.position.x, SubStart.transform.position.y, SubStart.transform.position.z, 1) },
            1,
            distConstraints.springIndices[0]
        );

        pinConstraints.AddConstraint (distConstraints.springIndices[0], SubStart.GetComponent<ObiColliderBase> (), Vector3.zero, 1);

        Oni.SetParticlePositions (
            rope.Solver.OniSolver,
            new Vector4[] { new Vector4 (contactPoint.x, contactPoint.y, contactPoint.z, 1) },
            1,
            distConstraints.springIndices[distConstraints.springIndices.Count - 1]
        );

        pinConstraints.AddConstraint (distConstraints.springIndices[distConstraints.springIndices.Count - 1], Obj.GetComponent<ObiColliderBase> (), Vector3.zero, 1);

        rope.PinConstraints.AddToSolver (null);

It works fine as long as one object I attach them to is kinematic for particles but as soon as I want both objects to be non kinematic in the rigidbody and in the obirigidbody the particles don't follow the object anymore. Not sure what I'm doing wrong right now?

Btw, there was also an error when attaching from the Rigidbody about it's velocities beeing set to NaNs.
I added a float.isNan check in the ObiRigidbody to get rid of it.

Using 3.3.1 with Unity 2017.3


Just found a workaround:
Making one of the objects kinematic for particles when adding the pinconstraints then afterwards make it nonkinematic. Still a bit odd that you need to trick it like this?

EDIT:
Actually that workaround only works sometimes?
Also just found out it doesn't happen in a scene with just two spheres with the same script etc.. so still bug hunting.

EDIT2:
Ok the problem was that I used ObiColliders as pintargets which were slightly inside another ObiCollider with a coll layer which the solver takes into account.
Apparently the solver tries to solve this for a second and then stops.

Print this item

  Freezing up when I come into contact with a collider that is moving
Posted by: corbinyo`` - 07-03-2018, 04:36 PM - Forum: General - Replies (2)

Unity will freeze when obifluid comes into contact with a moving gameobject - It only started to do this recently.
Any thoughts?

Print this item

  Obi Rope + Photon Unity Network (PUN)
Posted by: Evgenius - 07-03-2018, 02:29 PM - Forum: General - Replies (1)

Hello there!

I'm trying to synchronize my rope in different clients by using PUN. Is there any simpler way to do that, except tracing every particle of rope?

Print this item

  Obi fluid and obi wind or unity windzone
Posted by: skywaver - 07-03-2018, 10:41 AM - Forum: Obi Fluid - Replies (1)

Can Obi fluid particles be affected by obi wind or unity's windzone?

I load "FaucetAndBucket" scene and added 'Obi Ambient Force Zone', 'Obi Spherical Force Zone', and unity3d's windzone
near falling water particles. But obi fluid does not react on any wind elements..
(Of course I added my fluid solver to Obi force zones.)

Does Obi wind only effect on Obi cloth?

Thanks for reading. Sonrisa

Print this item

  Soft body deform issue
Posted by: Nikowill - 06-03-2018, 12:32 AM - Forum: Obi Cloth - Replies (1)

Hello,

I'm trying to use the OBI to simulate the artery and aneurysm, and facing a problem that really hard to solve, hope if anyone can help me out.
What I'm trying to do is aneurysm clipping, use the clip on the aneurysm and it will deform when I clip it, the old way I'm doing it by direct moving the vertex in vertex shader, which works but not realistic enough. So I bought OBI cloth and trying to use physic to simulate this. The picture below shows how old way works.

[Image: ?ui=2&ik=64cd0510ea&view=fimg&th=161f855...&zw&atsh=1]
[Image: ?ui=2&ik=64cd0510ea&view=fimg&th=161f855...&zw&atsh=1]


Here is the problems I encountered: 
1) when I set up a obi version soft body, its too soft I have to increase iteration and add a bunch of constrains to make it looks real, which kills the performance. I'm using a 400 vertex mesh as particle base and use a 1300 vertex mesh as proxy. Is there any solution which can find a balance between visual and performance?

2) when I add some obi collider on the clip is not working, my clip is moved by Unity physic, and I have a hierarchy of rigidbody and fixed joint on it to work with clipholder. Any idea how to set up the obi collider to work with unity physic joint and rigidbody?

3) I'm trying to use two obi colliders(move by transform) to squeeze this soft body, it works when the collider is big enough, if the collider is the same size of the clip(which is small) soft body just go through the collider when I try to clip it. Any idea how to improve the collision detection with small colliders?

4) When I trying to make the soft body more rigid and looks real when I touch it, it seems hard to deform as I expected. When I trying to make it deform realistic, I have to make it very soft, which looks too soft when I touch it. It seems have a paradox between these two situations. Any idea how to solve this?

It will be great appreciated if anyone can help me solve this out!

Print this item

  Rope 'jumps' when a particle is added or removed
Posted by: Wilbert - 05-03-2018, 10:28 AM - Forum: Obi Rope - Replies (3)

I've created a system with four Obi Rope cables and a hook for a crane simulation.
When I change the length of the rope, each time a particle is added or removed the rope makes a jump.
See video: 

I'm using this code to change the length of the cables:

Code:
 float flCableLength = rsc.rpcCablesOuter[0].GetComponent<ObiRope>().RestLength + Input.GetAxis("Hoist") * flHoistSpeed;
       foreach (ObiRopeCursor rpc in rsc.rpcCablesOuter) rpc.ChangeLength(flCableLength);

How can I prevent the 'jumping' ?

Print this item

  fluid particles not falling
Posted by: musab - 01-03-2018, 09:36 PM - Forum: Obi Fluid - Replies (2)

ive added an emitter and it emits particles , but the particles arent getting affecting by gravity for some reason they are just stuck where they got emitted 

please help

Print this item

Dedo abajo Fluid falling through bucket
Posted by: yulaw2k - 01-03-2018, 06:59 PM - Forum: Obi Fluid - Replies (2)

Is it possible to create the facuet and bucket scene but stop the water from falling through the buckets?
Anytime the cups are moved to quickly the water falls through the walls and bottom of the bucket. I need to hold water in a bucket but take care for water flying out of the bucket if the user gets....to excited.
My only idea is to put a invisible lid on the bucket to help it from pouring out until time, and destroying particles that fly out, and recreating them when they are destroyed.

I read in another post about using distance fields for improved performance???
When I try and create a distance field on the bucket (I also click the generate button on the df). I place it on the bucket but the water falls straight through. I can recreate the test environment and get that working just fine.

Print this item

  Crash report
Posted by: ipislar - 28-02-2018, 11:32 PM - Forum: Obi Rope - Replies (1)

Hi ,

  We have been using obi rope in our game for our hoses , we been experiencing two issues.

 1. the Obi rope goes through meshes , we been trying everything but in terms of collision the obirope allways go though the mesh once the tension in the rope passes a certain treshold.
 2. Crashes , they happen randomly through out the game.



Attached Files Thumbnail(s)
   
Print this item

  if loading obi fluid with corroutine, fluid does not render.
Posted by: corbinyo - 28-02-2018, 07:42 PM - Forum: Obi Fluid - Replies (2)

If I want to view a fluid like Honey but after a set amount of time - after the corroutine turn the game object to "Active" the fluid will not render out. I can see it if I select "Render Particles"

Print this item