Search Forums

(Advanced Search)

Latest Threads
Broken scripts with updat...
Forum: Obi Rope
Last Post: hariedo
21-12-2024, 10:35 AM
» Replies: 0
» Views: 47
Garment explodes on Andro...
Forum: Obi Cloth
Last Post: CptnFabulous
19-12-2024, 07:16 AM
» Replies: 4
» Views: 677
Calculating and Reproduci...
Forum: Obi Fluid
Last Post: ZacharyP
18-12-2024, 05:49 PM
» Replies: 2
» Views: 773
Null Reference, actor not...
Forum: Obi Rope
Last Post: josemendez
13-12-2024, 12:39 PM
» Replies: 1
» Views: 165
Issue with Grasping ObiRo...
Forum: Obi Rope
Last Post: josemendez
12-12-2024, 12:00 PM
» Replies: 5
» Views: 472
Changing extruded rendere...
Forum: Obi Rope
Last Post: aderae
10-12-2024, 07:35 PM
» Replies: 2
» Views: 246
Baking a rope is causing ...
Forum: Obi Rope
Last Post: josemendez
10-12-2024, 11:06 AM
» Replies: 6
» Views: 665
Barrier belt - changing l...
Forum: Obi Rope
Last Post: josemendez
10-12-2024, 10:42 AM
» Replies: 1
» Views: 221
Path editor gizmo's appea...
Forum: Obi Rope
Last Post: josemendez
10-12-2024, 09:50 AM
» Replies: 1
» Views: 219
Problems when using multi...
Forum: Obi Cloth
Last Post: Cat3Man
09-12-2024, 03:17 AM
» Replies: 2
» Views: 297

 
  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

  Cloth Constraint Settings Reverting on Play [Solved]
Posted by: virtushda - 24-12-2017, 08:38 PM - Forum: Obi Cloth - Replies (1)

Title ^
I've restarted Unity, and it still will not keep any changes to my skin radius settings.

Is there anything that might cause this to happen? I don't consider redoing the whole setup to be a viable option.  Confundido

Print this item

Gran sonrisa Feature Request - Collision Enhancements
Posted by: virtushda - 24-12-2017, 02:40 PM - Forum: Obi Cloth - Replies (2)

With the Unity's Cloth component still sucking(even after the 2017.3 update), I thought I'd bring up a couple collision-related things it seems to do better, in hopes that you might be able to add them.  Gran sonrisa

From my impressions, these are two features Unity Cloth appears to have that ObiCloth appears not to have:

  1. Virtual Particles: Adds one virtual particle per-triangle to increase collision stability.
  2. Normal-based Rejection(what I'm calling it): Unity Cloth seems to handle high-speed collisions far better, especially if they screw up, particles are quickly ejected along the closest surface normal(or perhaps the last encountered surface-normal they encountered). It also appears like there may be a position bias to this function so that collider's movement in-between physics time-steps is taken into account. At least, this is my impression of what it's doing.

Edit: While trying to fix my new problem(other thread), I ran into one of Jose's old posts about how primitive colliders aren't "hollow", so my second request may be pointless as I was referring to collision with primitives. However, the PhysX-based cloth still handles collisions much better. Maybe I need more collision iterations? But then why would it take more than one iteration to "project" to the outside of the collider? Only more questions... Huh

Print this item