Search Forums

(Advanced Search)

Latest Threads
Get separate particles pa...
Forum: Obi Fluid
Last Post: slimedev
1 hour ago
» Replies: 6
» Views: 3,017
Solver outside of hierarc...
Forum: General
Last Post: Jawsarn
1 hour ago
» Replies: 4
» Views: 40
Cloth has stretchy behavi...
Forum: Obi Cloth
Last Post: josemendez
8 hours ago
» Replies: 21
» Views: 546
Rope ignoring colliders o...
Forum: Obi Rope
Last Post: josemendez
24-07-2025, 07:03 AM
» Replies: 1
» Views: 110
Ladder made by Ropes (Rat...
Forum: Obi Rope
Last Post: josemendez
23-07-2025, 01:43 PM
» Replies: 5
» Views: 262
can you remove particles ...
Forum: Obi Softbody
Last Post: josemendez
22-07-2025, 02:19 PM
» Replies: 1
» Views: 160
ObiRope Mesh Renderer
Forum: Obi Rope
Last Post: quent_1982
08-07-2025, 11:27 AM
» Replies: 4
» Views: 518
How to dynamically change...
Forum: Obi Rope
Last Post: quent_1982
08-07-2025, 06:34 AM
» Replies: 6
» Views: 738
Pipeline that bends
Forum: Obi Softbody
Last Post: josemendez
04-07-2025, 09:52 AM
» Replies: 13
» Views: 1,519
How to implement/sync Obi...
Forum: Obi Rope
Last Post: quent_1982
01-07-2025, 01:48 PM
» Replies: 2
» Views: 426

 
Pregunta Obi rope with Obi sofbody
Posted by: DogukanB - 23-12-2022, 01:55 PM - Forum: Obi Rope - Replies (5)

https://drive.google.com/file/d/1WXmYkBM...sp=sharing

I use obi rope and sofbody together, for sofbody i use blueprint from 2D mesh and use 3D mesh for softbody skinner (3D mesh child of softbody)  and rope connected with particle attachment to the 2D softbodies with dynamic attachments. Obi solver set to the 2D and has 8 substeps and all constraints are 1, distance and pin are sequential.

I need to make the rope stable so how can i prevent the rope from coming out of the circle, shaking and stretching?

Print this item

  Check for collision of last particle in rope
Posted by: docgonzzo - 23-12-2022, 01:43 AM - Forum: Obi Rope - Replies (1)

Hi again,







I need a way to check if the last particle in the rope (i.e. end of the rope) has collided with an object.



I understand the last point in the rope can be obtained by elements but I'm not sure how to check for the actual particle.




If that last particle hits an object I need to assign that object as an ObiParticleAttachment.target.



Here's what I have so far.. any hints? Hoping to get this figured out before the holidays Guiño



Code:
void Solver_OnCollision(object sender, Obi.ObiSolver.ObiCollisionEventArgs e)
    {
        var world = ObiColliderWorld.GetInstance();

        //iterate over all contacts in the current frame:
        foreach (Oni.Contact contact in e.contacts)
        {
            // if this one is an actual collision:
            if (contact.distance < 0.01)
            {
                ObiColliderBase col = world.colliderHandles[contact.bodyB].owner;
                if (col != null)
                {
                    if (col.gameObject.layer == 15)
                    {
                        //if we are here we know particles are colliding with layer 15 objects.
                        //how can I know if it's the LAST PARTICLE in the rope (end of the rope) that has touched the debris?
                       
            //I know this is supposed to return the position/point of the last particle..
                        Vector4 lastPoint = solver.positions[rope.elements[rope.elements.Count - 1].particle2];

                    }

                }
            }
        }
    }

Print this item

  What things are possible for Cable Simulation
Posted by: 5G_Zendmast - 22-12-2022, 04:12 PM - Forum: Obi Rope - Replies (3)

Hi all Sonrisa

I've got a few questions regarding some possibilities and things that are not entirely clear to me.
Let me start by explaining the base of our scene:
-------------------------------------------------------------
- We are trying to simulate a cable that's hanging in a crane and moves from point A to point B. 
- The cable has a max length of 190m
- The cable has a min bending diameter of 1.2m
- The cable has a bundled mass of 288 kg/m
-------------------------------------------------------------
I've created the base scene and the cable is attached to a base shape that should act as the starting point of the cable (ObiAttachment) and the end of the cable is attached to its dedicated object (ObiAttachment)
In between this long cable there are support saddles where the cable will rest on, so there is some slack in the cable during the movements. 
At first I made ObiAttachments on these saddles, but after some testing I don't think this will give a good representation of the cable as it will always be pinned to it. 
I'm also not sure how to make sure the minimum bending diameter of the cable is 1.2m, is there any way to control this?

Is there a way we can incorporate the mass of the cable in ObiRope?
I see that we can appoint a mass to each control point of the rope but what does this exactly mean?
If I'm correct, mass in Unity is in kilo's. So if the control points mass is set to 288, does the cable behave as it actually would?

Is there a way to determine the length of a section of the rope?
For instance the part from start to the first saddle, this would be very helpful to the team.
Mabey this is possible if the Saddles are actual control points as well? then there's a reference from point a to b?


Using Unity as a tool for this work is new to us, as you can probably see based on my questions haha. 
But we see good value in it, if we can understand a bit better how to use it for these kinds of situations. 

Thank you in advance for your reply and if you need any additional information please let me know Sonrisa

Kind regards

Print this item

  Cloth Jumps at Start
Posted by: brootas - 22-12-2022, 04:01 AM - Forum: Obi Cloth - Replies (5)

Hello!

When I hit play to simulate, the cloth jumps the moment it starts playing. It starts it out at an incorrect spot.

I followed the steps from the 'ObiCloth en capa' video.

What could I do to prevent the jumping?

Thank you!

Print this item

  Obi rope collision stops working after loading scene
Posted by: Zombie1111 - 22-12-2022, 12:53 AM - Forum: Obi Rope - Replies (2)

Hi, this is what I do...
I have a rope in Scene A.
Then I put that rope in DontDestroyOnLoad.
Then I load scene B.

After I have done that the rope does not collide with any obi collider in scene B! Opening the ropes path editor and changing something then closing it fixes the issue.
Enabling and disabling the rope also fixes the issue but sometimes completely breaks the rope so it aint reliable at all. 
So I guess there is a function that I need to call after the scene has finished loading to like update all obi colliders. But I dont know what the function is called.
I have tried [solver].updateBackend

Print this item

  IndexOutOfRangeException
Posted by: SimonP - 21-12-2022, 11:26 PM - Forum: Obi Softbody - Replies (3)

Hello! I just bought the asset. When I try to add the skeleton in the blueprint it gives me this error.
If I generate it without skeleton it works fine.

Any suggestions?

P/d: Unity 2021.3.9f clean project



IndexOutOfRangeException: Index was outside the bounds of the array.
Obi.GraphColoring.AddConstraint (System.Int32[] particles) (at Assets/Obi/Scripts/Common/Blueprints/GraphColoring.cs:44)
Obi.ObiSoftbodySurfaceBlueprint+<CreateClustersFromSkeleton>d__51.MoveNext () (at Assets/Obi/Scripts/Softbody/Actors/ObiSoftbodySurfaceBlueprint.cs:618)
Obi.ObiSoftbodySurfaceBlueprint+<Initialize>d__37.MoveNext () (at Assets/Obi/Scripts/Softbody/Actors/ObiSoftbodySurfaceBlueprint.cs:215)
Obi.ObiActorBlueprint+<Generate>d__59.MoveNext () (at Assets/Obi/Scripts/Common/Blueprints/ObiActorBlueprint.cs:282)
Obi.CoroutineJob+<Start>d__15.MoveNext () (at Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs:99)
UnityEngine.Debug:LogException(Exception)
Obi.<Start>d__15:MoveNext() (at Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs:108)
Obi.EditorCoroutine:ShowCoroutineProgressBar(String, IEnumerator&) (at Assets/Obi/Scripts/Common/Utils/Coroutines/EditorCoroutine.cs:21)
Obi.ObiActorBlueprintEditor:Generate() (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:131)
Obi.ObiActorBlueprintEditor:OnInspectorGUI() (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:163)
UnityEngine.GUIUtilityLenguarocessEvent(Int32, IntPtr, Boolean&)

Print this item

  Odd collision detection behaviour for objects at non 90 degree angle
Posted by: Moon_Hermit - 20-12-2022, 06:34 PM - Forum: Obi Softbody - Replies (2)

Hello

I'm trying to use a script to detect when the gameobject the player gameobject has collided with and then run another line of code once detected.

The issue I am having is the player detects the other gameobject without physically touching it if the other gameobject is rotated at an angle that is not a multiple of 90. What seems to be happening is the other gameobject has an area around it with a rotation of 0-degrees. When the player enters this area it detects the other gameobject. In the screenshot below the white cube is the object I want to detect rotated to a 45-degree angle and the red cube is the area the player is detecting rotated 0-degrees.

   

I've also included a screenshot of the white cube's collider setup.

   

I want to fix this issue so the player only detects the other gameobject when physically colliding with it.

I'm not an experienced programmer and am at a loss for what to do so any help would be greatly appreciated. 

Thank you.

Below is the code I'm using to detect the object the player is colliding with.

Code:
private void Solver_OnCollision(ObiSolver solver, ObiSolver.ObiCollisionEventArgs e)
    {    
        foreach (Oni.Contact contact in e.contacts)
        {
            ObiColliderBase collider = ObiColliderWorld.GetInstance().colliderHandles[contact.bodyB].owner;

            print(collider.transform.gameObject);

Print this item

  Softbody broken with URP?
Posted by: softphysics - 18-12-2022, 05:24 AM - Forum: Obi Softbody - Replies (1)

[Image: Screenshot%202022-12-17%20212121.png?dl=1]

Hi, I just added the softbody asset to a URP project for the first time and tried some of the demo scenes and they all seem broken. See above image with mesh not deforming correctly. Is the asset compatible with URP?

Print this item

  Overwriting Particles As Capacity Reached
Posted by: mapleleaf4evr - 18-12-2022, 02:04 AM - Forum: Obi Fluid - Replies (1)

Hi there,

I am trying to implement a use of Obi Fluid where bleeding is simulated and remains on the ground.  I would like to use an emitter that continually emits particles even once the particle limit (capacity) for the blueprint is reached.  I only want particles to be destroyed/recycled after the maximum amount of particles have been spawned so that there is a continuous emission.  Once the emission stops, I would like the particles that have already been spawned and are sitting on the floor to remain there indefinitely or as long as possible.

Basically I don't want the particles to die until particle capacity is reached and then I only want them to die at a rate that is needed to continue emission.

From reading through these forums, I think this would be possible through emitter.KillParticle and setting lifespan to infinity.  Is this the correct/most performance efficient way to implement this?  I'm imagining that I would just write a script that checks if the number of particles is nearing max capacity and then starts to kill the oldest particles at the same rate they are being emitted.  Can this just go in any old Update() function or is there a better place to put it?

Thank you

Print this item

  softbody cut
Posted by: Seahorse - 15-12-2022, 05:16 AM - Forum: Obi Softbody - Replies (11)

First of all, thanks to OBI, this is the best pbd physics engine I've ever used.

I have a few questions about softbody cut:
1. Is there a plan to support cutting and tearing?
2. I implemented the method described in this post.
http://obi.virtualmethodstudio.com/forum...-3561.html
This should be the easiest way. However, there are too many problems, such as the performance, recalculation of the attachment and stitcher brought by the new softbody objects, and the continuation of collision posture, which are all troublesome

3. Can i reframe the softbody by redividing the particle and Constraints just as you did with rope cutting?

4. I do not understand the relationship between softbody Constraint, ConstraintBatch and Particle. Could you explain it?
http://obi.virtualmethodstudio.com/manua...aints.html
Only rope and cloth are available here


Thanks a lot in advance Gran sonrisa

Print this item