Search Forums

(Advanced Search)

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

 
  Some issues and questions.
Posted by: LogaNRV - 26-11-2020, 08:37 AM - Forum: Obi Cloth - Replies (4)

Hi, new Obi-suite user here.

I started doing experiments with the cloth component, adding a simple floating cloth to a test scene, where I have a lot of physics elements and a character controller mostly based on physics. Something like a mini "Fall Guys" level.
My first issue is that the moment that I add the cloth to the scene, the ILCPP build stops working, the screen stays black after the Unity logo and then crashes after some seconds.
In the editor and with normal builds all works well.
Also, with only the solver active (and the cloth disabled) the ILCPP build works correctly. Is only the moment that I enable the cloth gameobject (also when the OniCollisionWorld object appears), that it stops working.

This is a very simple cloth component, done with a blueprint from the demo assets (Cloth sheet) and all default values.
My solver is configured like this:

   

And I'm working with Unity 2019.3.15f1, Windows 7 64 bits, last Obi cloth version.

My second question would be how to configure the cloth to avoid my character going visually through it. I increased the fixed updater substeps to 4, the max depenetration to 40, avoided using interpolation and used elements "non kinematic to particles", and got a very nice cloth, without any visual glitches most of the time. I also played with anisotropy set to 1, but didn't see much difference. My characters right now are capsules and the moving elements are mostly spheres, so there are no pointy edges, but maybe you have some extra advice to configuring a cloth for this. I assume that a mesh with a lot of points also helps.

Another question.. when I enable "Substep Unity Physics" in the solver, my own code kind of breaks. For example, instead of the player correctly "attaching" to moving platforms, it now jump and stumble over them. My own "force element" scripts seems to apply more force to the player than before, like if they were called more times per second, but with the same old delta time. I was expecting that enabling this option was kind of "transparent" to the rest of the code, but I assume is not, so I would like to know what steps I should follow or how I prepare my code to use it.
Also.. I have been using the "fixed updater substeps" set to 4, without enabling "Substep Unity Physics", and all seems to work correctly.. is this ok?

Regards.

Print this item

  I want to shake what I attached to the rod
Posted by: nyame - 26-11-2020, 05:18 AM - Forum: Obi Rope - Replies (5)

I am always grateful for your help.
This asset is so great!

I want to attach a sphere to the tip of an antenna made of rods.
I'm glad if the sphere sways according to the movement of the tip of the rod.
At the base of the rod is a square robot. Connected with obi particle attachment.

Currently, the spheres are connected by obi particle attachments, but there are two options: stay in place or fall with a rigid body.

I'm sorry I'm a beginner, but I'd be happy if you could get an answer.Thank you.

Print this item

  Error on FixedUpdate after upgrading to Obi 5.6.1
Posted by: Softscale - 26-11-2020, 03:09 AM - Forum: Obi Fluid - Replies (6)

I recently tried to upgrade one of my projects from Obi 5.6.0 to 5.6.1 (I'm using Fluid and Rope) and I now get many instances of this error when starting Play mode (with either Burst or Oni):

Code:
IndexOutOfRangeException: Index was outside the bounds of the array.
Obi.BIH.Build (Obi.IBounded[]& elements, System.Int32 maxDepth, System.Single maxOverlap) (at Assets/Obi/Scripts/Common/DataStructures/BVH/BIH.cs:63)
Obi.ObiTriangleMeshContainer.GetOrCreateTriangleMesh (UnityEngine.Mesh source) (at Assets/Obi/Scripts/Common/Collisions/ObiTriangleMeshContainer.cs:92)
Obi.ObiColliderWorld.GetOrCreateTriangleMesh (UnityEngine.Mesh mesh) (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:229)
Obi.ObiMeshShapeTracker.UpdateIfNeeded () (at Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiMeshShapeTracker.cs:38)
Obi.ObiColliderBase.UpdateIfNeeded () (at Assets/Obi/Scripts/Common/Collisions/ObiColliderBase.cs:189)
Obi.ObiColliderWorld.UpdateWorld () (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:362)
Obi.ObiUpdater.BeginStep (System.Single stepDeltaTime) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:40)
Obi.ObiFixedUpdater.FixedUpdate () (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:54)


I tried one of the Sample programs (FaucetAndBucket) while in my project and got some different results. With the Burst solver, I get this:

Code:
IndexOutOfRangeException: Index 0 is out of range of '0' Length.
Unity.Collections.NativeArray`1[T].FailOutOfRangeError (System.Int32 index) (at <526469d5a48c43eebd9af19f8745afa1>:0)
Unity.Collections.NativeArray`1[T].CheckElementReadAccess (System.Int32 index) (at <526469d5a48c43eebd9af19f8745afa1>:0)
Unity.Collections.NativeArray`1[T].get_Item (System.Int32 index) (at <526469d5a48c43eebd9af19f8745afa1>:0)
Obi.BurstDistanceField.DFTraverse (Unity.Mathematics.float4 particlePosition, System.Int32 nodeIndex, Obi.DistanceFieldHeader& header, Unity.Collections.NativeArray`1[Obi.BurstDFNode]& dfNodes) (at Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstDistanceField.cs:50)
Obi.BurstDistanceField.Contacts (System.Int32 particleIndex, System.Int32 colliderIndex, Unity.Mathematics.float4 position, Unity.Mathematics.quaternion orientation, Unity.Mathematics.float4 radii, Unity.Collections.NativeArray`1[Obi.BurstDFNode]& dfNodes, Obi.DistanceFieldHeader header, Obi.BurstAffineTransform colliderToSolver, Obi.BurstColliderShape shape, Unity.Collections.NativeQueue`1+ParallelWriter[T] contacts) (at Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstDistanceField.cs:33)
Obi.BurstColliderWorld+GenerateContactsJob.GenerateContacts (Obi.ColliderShape+ShapeType colliderType, System.Int32 particleIndex, System.Int32 colliderIndex, Unity.Mathematics.float4 particlePosition, Unity.Mathematics.quaternion particleOrientation, Unity.Mathematics.float4 particleVelocity, Unity.Mathematics.float4 particleRadii, Obi.BurstAffineTransform colliderToSolver, Obi.BurstColliderShape shape, Unity.Collections.NativeQueue`1+ParallelWriter[T] contacts, System.Single dt) (at Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderWorld.cs:408)
Obi.BurstColliderWorld+GenerateContactsJob.Execute (System.Int32 i) (at Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderWorld.cs:328)
Unity.Jobs.IJobParallelForExtensions+ParallelForJobStruct`1[T].Execute (T& jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at <526469d5a48c43eebd9af19f8745afa1>:0)

If I try to run that sample with the Oni solver, Unity just crashes immediately.


However, I'm not able to recreate these issues in a fresh project - the sample scene works fine with either Burst or Oni. I've tried reinstalling the Obi package in my problem project (and deleting/rebuilding the Library in case something was cached) but get the same results.

Do you have any idea what would be causing these errors, if there might be some setting or misconfiguration that would cause this to start happening now when it was fine in 5.6.0? Thanks.

Print this item

  Perhaps Useful
Posted by: gfh76 - 24-11-2020, 02:40 AM - Forum: General - Replies (3)

Perhaps useful, to the right person. Simulations, look promising.

Two Minute Papers Simulating Dragons Under Cloth Sheets!
https://www.youtube.com/watch?v=ooZ9rUYOFI4

The papers.
https://mmacklin.com/sdfcontact.pdf

Print this item

  How to fully reset a Softbody actor
Posted by: JanikH - 23-11-2020, 03:44 PM - Forum: Obi Softbody - Replies (3)

Hi,

so I have a Softbody actor that I want to reset completely to it's initial state.
Currently I'm caching the particle position, orientation, velocity and angular velocity and applying these values on reset.
This mostly works. However, the permanent softbody deformation is not reset, so it stays squished.

Can I cache the initial deformation (no deformation at all) as well or is there another approach I have to take?
I'd rather not instantiate a new actor, I would prefer to reset the existing one if possible.

Print this item

  Add Constraint problems
Posted by: datzme - 22-11-2020, 07:01 PM - Forum: Obi Rope - Replies (1)

I have some problems with constraints.

This is what im trying to do:


https://i.imgur.com/uMuY596.gif

This is the code


                            var pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints<ObiPinConstraintsBatch>;

                            pinConstraints.Clear();
                            Vector3 hit = rope.transform.InverseTransformPoint(contact.point); // this didnt work at all.
                 
                            var batch = new ObiPinConstraintsBatch();                                    // cheating with the pos, dont know how to get the correct position.
                            batch.AddConstraint(rope.solverIndices[contact.particle], boxCollider, new Vector3(-0.5f,-0.25f,0), Quaternion.identity,0,0,float.PositiveInfinity); 

                            batch.activeConstraintCount = 1;
                            boxCollider.Phase = 1;
                           
                            pinConstraints.AddBatch(batch);

                            rope.SetConstraintsDirty(Oni.ConstraintType.Pin);

:
what im trying to do is to make it stick to the box smooth, and then i want to be able to drag the box around and rope follow smoothly.

I also tried to use the Grab script, it looks good, but it will go crazy kinda fast:
https://i.imgur.com/zogiZZZ.gif

Print this item

Triste Ropes swing
Posted by: JskT01 - 21-11-2020, 06:52 PM - Forum: Obi Rope - Replies (1)

I have 4 ropes attached to a static object at the beginning and at the end in a dynamic object, this dynamic object is attached to 4 ropes at the beginning, these 4 ropes at the end have an object.
My problem is that when they collide with something the object takes flight as if it were thrown, how can I make the ropes heavier or more rigid so that they do not move when they collide, they end up being a swing

Print this item

Triste I want to know the times.
Posted by: dabinzzang - 21-11-2020, 05:29 PM - Forum: Obi Fluid - Replies (1)

I'm scattering 5,000 water particles on the floor.
every single 5,000 water particles, from the emitter to hitting the floor, are taken time. so i want to know the times one by one.
To sum up, I would like to know the time it took from the time 5,000 water particles were collided to the floor (total a number of 5,000 times).
I think i should write a script in 'CollisionEventHandler', and I'd like to know how to do it. Huh

Print this item

  Obi Rope Help
Posted by: jackhanneway - 21-11-2020, 04:43 AM - Forum: Obi Rope - Replies (4)

I'm a beginner to Unity and wanted to make a game like the one attached using Obi Rope. I've been trying and trying but can't seem to get it to work. Can someone please give some tips or steps to follow. Thank you for your time and help.

[Image: screen-0.jpg?fakeurl=1&type=.jpg]

Print this item

  Velcro
Posted by: arkanis - 20-11-2020, 11:24 PM - Forum: Obi Cloth - Replies (3)

Is there any built in way to support a system that behaves the same as velcro, so that when certain marked velcro points are close enough they are bound together until a breaking force is reached?

Thanks.

Print this item