Search Forums

(Advanced Search)

Latest Threads
Obi 8: what's coming up
Forum: Announcements
Last Post: Qriva0
26-06-2026, 09:23 AM
» Replies: 13
» Views: 5,956
Integrating Soft Bodies w...
Forum: Obi Softbody
Last Post: josemendez
25-06-2026, 08:22 AM
» Replies: 2
» Views: 562
Missing Ref Exception on ...
Forum: Obi Rope
Last Post: YouKou
21-06-2026, 10:35 AM
» Replies: 4
» Views: 779
Wade - A Fly Fishing simu...
Forum: Made with Obi
Last Post: josemendez
18-06-2026, 08:04 AM
» Replies: 1
» Views: 608
Color Weave - A GameJam P...
Forum: Made with Obi
Last Post: josemendez
18-06-2026, 08:00 AM
» Replies: 1
» Views: 685
Stitcher breaks simulatio...
Forum: General
Last Post: Qriva0
13-06-2026, 02:41 PM
» Replies: 5
» Views: 3,977
Suture issues between rop...
Forum: Obi Softbody
Last Post: josemendez
10-06-2026, 02:36 PM
» Replies: 1
» Views: 658
Oculus and Softbodies
Forum: Obi Softbody
Last Post: Trogdor
28-05-2026, 09:28 AM
» Replies: 4
» Views: 1,253
Jittery edges on softbody
Forum: Obi Softbody
Last Post: Matthias
27-05-2026, 04:06 PM
» Replies: 8
» Views: 1,687
Looking for suggestions o...
Forum: Obi Rope
Last Post: trentthebaker
25-05-2026, 06:16 PM
» Replies: 3
» Views: 1,025

 
  Physically accurate closed pulley system
Posted by: M. Hanssen - 08-01-2018, 12:18 PM - Forum: Obi Rope - Replies (3)

I would like to make a physically accurate closed pulley system with 2 pulleys and one closed rope.
All physics and colliders are working except that I cannot get the rope to react to the pulley rotation.
Is this even possible with Obi Rope and/or how should I approach this?

[Image: 1ii445dNDDSzaQWcR00kG_scJbCijUBoMfrU2AW4...17-h337-no]

Print this item

  playableGraph Error
Posted by: Shreeya - 05-01-2018, 08:07 AM - Forum: Obi Cloth - Replies (2)

ERROR>>>>>Assets/Obi/Scripts/Solver/ObiAnimatorController.cs(38,14): error CS1061: Type `UnityEngine.Animator' does not contain a definition for `playableGraph' and no extension method `playableGraph' of type `UnityEngine.Animator' could be found. Are you missing an assembly reference?


How to resolve this?

Print this item

  AfterShadowMapPass
Posted by: Shreeya - 05-01-2018, 07:15 AM - Forum: Obi Cloth - Replies (2)

Error message >> Assets/Obi/Rendering/ShadowmapExposer.cs(21,38): error CS0117: `UnityEngine.Rendering.LightEvent' does not contain a definition for `AfterShadowMapPass'

How to correct this error?

Print this item

  Obi Fluid Setup - Beginner Question
Posted by: hmhmhm - 03-01-2018, 08:26 AM - Forum: Obi Fluid - Replies (6)

Hello,

I'm new to Obi Fluid and in the process of getting familiar with it.
I'm trying to have a very simple 2D scene, similar to 'Simple Fluid' in the Sample Scene folder.

I start a new scene, add an Obi Emitter (with solver), and turn it 90 degrees on the x-axis so it emits downward.
I then add an empty Game Object, and add 'Rigidbody 2D', 'Box Collider 2D' and 'Obi Collider 2D (Script)' to that object. As per the instructions, I make sure the emitter and game object are in different layers.

When I run the scene, two unexpected things happen:

1. The Obi particles 'enter' the object, i.e. they don't bounce off the surface, some of them even 'fall through' the object.

[Image: 5rJWiwA.png]

2. When I switch to 3D view, and have a look from the side, I can see the particles are not remaining in the 2D plane (z=0), i.e. they move backwards and/or forward once they hit the object.

[Image: qTYuXhm.png]

Eventually I would like to create a simple bucket and fill it with fluid in 2D. How do I best go about this, so the fluid stays a) in the 2D plane, and b) in the bucket. Also, is there an easy way to fill the bucket when the scene gets executed, i.e. without having to 'emit' the fluid into it first, which takes a while?

Thank you!

Print this item

Sonrisa Export Obi Cloth Simulation / Baked Simulation to Blendshapes/3D Packages like Maya?
Posted by: gstudio - 03-01-2018, 02:46 AM - Forum: Obi Cloth - Replies (2)

Hi Obi Support team,

Wishing you a Happy New Year!

Our small team has recently purchased your Obi cloth plugin as we hope to implement the goal net animation of our soccer project.  Since the project is targeted on the mobile device, we have tested the baked simulation & it is running much more efficient on both high / low end mobile devices. 

However, we noticed the baked simulation couldn't work on the Samsung S3 & iOS with the Bitcode support.  We're uncertain whether this could be due to the hardware / software (e.g. Unity compatibility, Android & iOS C++) issues.

Hence, we are thinking whether the Obi Cloth simulation / baked simulation is possible to be converted to Blendshape animation that can be used in Unity or simply exported to 3D packages like Maya for editing & re-importing back to Unity later as this way can streamline the process to support more existing high / low platforms.

Looking forward to hearing from you Sonrisa

Thanks & Regards,
Peter

Print this item

  Mobile Optimizations
Posted by: pstudios - 02-01-2018, 06:31 PM - Forum: Obi Fluid - Replies (9)

Hi, I love the fluid plugin and it works great on my computer. However, on my android device which is pretty new is struggling to get through the basics of my small scale fluid animation, I would appreciate it if anyone could tell me as many steps as possible to optimize the efficiency on mobile devices (im fine with a reduction in quality as i want my project to work on as many devices as possible) any and all tips would be greatly appreciated. Thanks!

Print this item

Exclamación ObiColliderGroup missing
Posted by: Wilbert - 02-01-2018, 03:06 PM - Forum: Obi Rope - Replies (1)

Just upgraded my project to ObiRope 3.2.
But in this version ObiColliderGroup is missing.

Now my project is messed up  Enfadado
- There is no ObiColliderGroup parameter in ObiSolver:[Image: view]
https://drive.google.com/file/d/1RRyZ-Lf...oI7Tg/view
- Pin constraints are gone
- Add Pin Constraint button does not work (clicking does nothing)
- Edit particles gives an error:
NullReferenceException: Object reference not set to an instance of an object
Obi.ObiParticleActorEditor.DrawParticles () (at Assets/_Tools/Obi/Editor/ObiParticleActorEditor.cs:332)
Obi.ObiParticleActorEditor.DrawActorInfo () (at Assets/_Tools/Obi/Editor/ObiParticleActorEditor.cs:598)
Obi.ObiParticleActorEditor.OnSceneGUI () (at Assets/_Tools/Obi/Editor/ObiParticleActorEditor.cs:262)

How do I fix this ?

Print this item

  Problem with Final IK
Posted by: Deschanna - 29-12-2017, 08:35 AM - Forum: Obi Cloth - Replies (15)

Hi!

I read 'somewhere' earlier, before buying Obi Cloth, that it should work with Final IK. However, I cannot get it to work.

I am running the solver in LateUpdate.

I have a character, wearing a sash, which I'm trying to animate with Obi Cloth. It works, but problematically. With no Final IK enabled, it works as should. 
However, when Final IK is enabled, the part of the sash that is tied around the character's waist and should stay under his armour, constantly jumps (shows) above the armour in parts. Sometimes more, sometimes less. And when the character is going down a hill, for example, the part that should stay in place shows above armour and noticeably jumps up and down. 

Umm... some idea? Thanks.

Best regards, Laura

Print this item

  scripting ropes with pin constraints & tethers
Posted by: phoberman - 26-12-2017, 07:43 PM - Forum: Obi Rope - Replies (6)

Hi –

I’m working on a scene made up of hanging chains of objects, each connected by a short rope: the first particle of each rope is pinned to an object at the top, and the last particle is pinned to an object at the bottom. The first object of the first rope is set to kinematic (to anchor the whole chain at the top). It’s all working pretty well, but I have a few questions.

The final scene will have lots of ropes; each chain contains about 6 ropes, and there will be more than 20 chains in total, so that means more than 100 ropes. Putting all of this together in the editor was impractical, so I’ve written a script (based on ObiRopeHelper.cs) to help automate the process. Script included below.

When the simulation starts, the rope springs like a rubber band that’s just been let go and then settles down. I'd like to have everything begin in a resting state (unmoving). In this thread: http://obi.virtualmethodstudio.com/forum...hp?tid=175 the solution suggested is disable the rope and wait for the next FixedUpdate before reenabling. I’ve tried to implement that in my script, but it doesn’t seem to be having any effect.

Next, I would like the ropes to be as non-elastic as possible. I realize that the recommended way of doing this is via tethers, but because my ropes aren’t fixed, tethers wouldn’t seem to be an option. However, in this thread: http://obi.virtualmethodstudio.com/forum....php?tid=6 there’s a method described in which the rope is fixed, tethers are generated, then the rope is unfixed. Once again, I’ve tried to implement this in my script, but it doesn’t seem to be having any effect.

I’ve therefore tried to set the rope length by using reduced values for stretchingScale (in ObiDistanceConstraints). I’m sure this isn’t ideal, but it basically seems to work (but maybe this is causing the initial rubber band behavior?)

Finally, I’ve found that each individual rope has to have its own dedicated solver; if I try to share a single solver across multiple ropes, Unity immediately crashes. I’m guessing this has something to do with removing and adding multiple pin constraints from the solver simultaneously/asynchronously? (Just a guess). Anyway, my question is whether there will be any problems (like a performance hit) by having upwards of 100 solvers in a single scene.


Code:
using UnityEngine;
using System.Collections;

namespace Obi {
    [RequireComponent(typeof(ObiRope))]
    [RequireComponent(typeof(ObiCatmullRomCurve))]
    [RequireComponent(typeof(ObiPinConstraints))]
    [RequireComponent(typeof(ObiDistanceConstraints))]
    [RequireComponent(typeof(ObiTetherConstraints))]

    public class ObiConnectorRope : MonoBehaviour {

        public ObiSolver solver;
        public ObiActor actor;
        
        public ObiRopeSection section;
        public Material material;
        
        public float ropeLength = 1.0f; // desired rope length
        public float uvYMult = 2.5f; // keep UVScale Y consistent across rope lengths
        
        public ObiCollider upperPinObject;
        public ObiCollider lowerPinObject;
        
        private Transform point1; // offset at top of object
        private Transform point2; // offset at bottom of object
        
        private ObiRope rope;
        private ObiCatmullRomCurve path;
        
        private ObiPinConstraints pinConstraints;
        private ObiPinConstraintBatch constraintsBatch;
        private ObiDistanceConstraints distanceConstraints;
    
        void Start () {
            
            actor.enabled = false;
            
            // move rope position to match upper pinned object
            transform.position = upperPinObject.transform.position;
            
            // Get all needed components and interconnect them:
            rope = GetComponent<ObiRope>();
            path = GetComponent<ObiCatmullRomCurve>();
            rope.Solver = solver;
            rope.ropePath = path;    
            rope.Section = section;
            GetComponent<MeshRenderer>().material = material;
            
            // use stretching scale to set approximate rope length & UVScale Y
            distanceConstraints = rope.GetComponent<ObiDistanceConstraints>();
            distanceConstraints.stretchingScale = (ropeLength * 0.14f) - 0.05f; // ad hoc formula
            rope.UVScale = new Vector2(1.0f, ropeLength * uvYMult);
            
            // register offsets
            point1 = upperPinObject.transform.Find("pinPointB").gameObject.transform;
            point2 = lowerPinObject.transform.Find("pinPointA").gameObject.transform;
            
            // Calculate rope start/end and direction in local space:
            Vector3 localStart = transform.InverseTransformPoint(upperPinObject.transform.position);
            Vector3 localEnd = transform.InverseTransformPoint(lowerPinObject.transform.position);
            Vector3 direction = (localEnd-localStart).normalized;
            // Add control points
            path.controlPoints.Add(localStart-direction);
            path.controlPoints.Add(localStart);
            path.controlPoints.Add(localEnd);
            path.controlPoints.Add(localEnd+direction);

            // Setup the simulation:
            StartCoroutine(Setup());
            
            // Wait for next FixedUpdate
            StartCoroutine(WaitOne());
            
            actor.enabled = true;
        }

        IEnumerator Setup(){
            
            // Generate particles and add them to solver:        
            yield return StartCoroutine(rope.GeneratePhysicRepresentationForMesh());
            
            rope.AddToSolver(null);
            
            // Generate tethers
            // Fix first particle:
            float tempMass = rope.invMasses[0];
            rope.invMasses[0] = 0;
            Oni.SetParticleInverseMasses(solver.OniSolver,new float[]{0},1,rope.particleIndices[0]);
            rope.GenerateTethers(ObiActor.TetherType.AnchorToFixed);
            // Unfix first particle:
            rope.invMasses[0] = tempMass;
            Oni.SetParticleInverseMasses(solver.OniSolver,new float[]{0},1,rope.particleIndices[0]);
            actor.PushDataToSolver(ParticleData.INV_MASSES);
            
            // Set pin constraints    
            pinConstraints = rope.GetComponent<ObiPinConstraints> ();
            constraintsBatch = (ObiPinConstraintBatch)pinConstraints.GetBatches() [0];
            pinConstraints.RemoveFromSolver(null);    
            // Add top pin constraint
            constraintsBatch.AddConstraint(rope.particleIndices[rope.particleIndices[0]], upperPinObject.GetComponent<ObiCollider>(), point1.localPosition, 0f);
            // Add bottom pin constraint
            constraintsBatch.AddConstraint(rope.particleIndices[rope.UsedParticles-1], lowerPinObject.GetComponent<ObiCollider>(), point2.localPosition, 0f);

            pinConstraints.AddToSolver(null);
            
            pinConstraints.PushDataToSolver();
        }    
        
        IEnumerator WaitOne(){
            yield return new WaitForFixedUpdate();
        }    
    }
}

Print this item

  Help with Grappling Hook Implementation
Posted by: Cyric - 25-12-2017, 06:25 AM - Forum: Obi Rope - Replies (1)

Hello, first off, I want to say how impressed I am with Obi Rope's performance, stability, and looks. You're doing a great job!

So I'm *attempting* to use it in a less traditional fashion to create something similar to a Grappling Hook Gun. The player fires a projectile which attaches to other objects in the scene, and the player then swings around (in 3D) using Obi Rope rigid body physics.

I'm currently stuck at even getting the projectile to fire from the "gun" with the rope attached to behave properly. I've pinned the ends of the rope to the projectile (rigidbody) and the player (rigidbody) and added a cursor to the players side.

I've done basically what's in the code below and was hoping it would do the trick, but the projectile seems to just spring back and act unpredictably. Not to mention the cursor length extension doesn't seem to keep up when used this way.

Code:
bool fired = false;

void Fire()
{
  fired = true;
  // Add force to projectile's rigidbody
}

void FixedUpdate()
{
   if(fired)
     cursor.ChangeLength((gunBarrel.position - projectile.position).magnitude);
}
Before using a fired projectile, I had used similar code to create a dynamic length rope between two objects that I moved by hand in the editor and it seemed to work well enough.
Any tips on how I should go about implementing this?

Print this item