Search Forums

(Advanced Search)

Latest Threads
Problems deleting obi col...
Forum: Obi Rope
Last Post: btduser
3 hours ago
» Replies: 2
» Views: 34
Frequent crash after assi...
Forum: Obi Fluid
Last Post: spikebor
Yesterday, 09:59 AM
» Replies: 4
» Views: 144
Softbody for head Model s...
Forum: Obi Softbody
Last Post: josemendez
11-05-2024, 07:52 AM
» Replies: 1
» Views: 25
Bigger foam with Alpha di...
Forum: Obi Fluid
Last Post: spikebor
10-05-2024, 08:57 AM
» Replies: 12
» Views: 402
Changing the rope's posit...
Forum: Obi Rope
Last Post: Crystalius
09-05-2024, 08:54 AM
» Replies: 3
» Views: 103
RESET Obi Softbody
Forum: Obi Softbody
Last Post: spikebor
09-05-2024, 06:12 AM
» Replies: 11
» Views: 2,872
Obi7 | Fluid granular can...
Forum: Obi Fluid
Last Post: spikebor
08-05-2024, 06:17 PM
» Replies: 0
» Views: 63
Can ObiBone work with Sof...
Forum: Obi Softbody
Last Post: spikebor
08-05-2024, 03:36 PM
» Replies: 0
» Views: 42
(7.0) Still confused abou...
Forum: General
Last Post: kodra
07-05-2024, 03:13 PM
» Replies: 4
» Views: 170
Question of the ObiRope l...
Forum: Obi Rope
Last Post: rinrin
07-05-2024, 02:33 PM
» Replies: 0
» Views: 117

 
  When the rope in the GameObject is animating,it looks delayed. please see those movie
Posted by: wagomu - 12-03-2019, 02:24 AM - Forum: Obi Rope - No Replies

This problem occurred After update to latest version . (3.x to 4.2)

The Rope with handle  is delayed .

movie :
https://gyazo.com/3197b06f23f9669f04d9daab7c76600d

obi solver and obi rope settings in those versions are almost same.

Here is the setting images.
https://gyazo.com/4d7f8079c615a85c0da138b4861a098d
https://gyazo.com/79be1c1f8ca8bd51a16daa800e5c9069

Could you please tell me how to solve this problem.

Print this item

  Did ObiCloth support 3rd party mesh collider script?
Posted by: akuei2 - 11-03-2019, 03:48 PM - Forum: Obi Cloth - Replies (1)

https://assetstore.unity.com/packages/to...der-134833

This stuff can generate mesh collider in run-time.
So, did it compatible with obi cloth( obi collider )?
If yes, it's so wonderful to create accurate simulation.

Print this item

  How to fasten trousers
Posted by: Richard - 09-03-2019, 11:33 PM - Forum: Obi Cloth - No Replies

Hello. 
I would like to fasten trousers to fit human body. I thought using direction vector. Is there another better way?

Print this item

  How to destroy particle from it's position
Posted by: anonymous - 09-03-2019, 03:48 PM - Forum: Obi Fluid - Replies (3)

Hi.

I need particles to be killed once they are below a given position.y
In my situation, the particles should live as long as they don't fall below some position. Once enough are killed, new ones would be emitted.

Here's my code for now but something is not right. It finds the particle pos but the kill part does not seem to work because my active particle number (in the emitter inspector)  stays the same when running. If possible, I would like also something less demanding than having to regularly loop through the array to do the pos check. 

Code:
  IEnumerator PurgeParticlesTooLow()
   {
       while(true)
       {
           yield return new WaitForSeconds(5);

           Vector4 v4;
           for (int i = 0; i < obiSolver.positions.Length; ++i)
           {
               v4 = obiSolver.positions[i];
               print("pos particle: " + v4);
               if (v4.y <= GlobalVars.cstBallBreakPointY)
               {
                   obiEmitter.life[obiSolver.particleToActor[i].indexInActor] = 0;
                   print("killed particle at pos: " + v4);
               }
           }

       }
   }

Print this item

  Flickering - solvers effect each other
Posted by: shayk - 09-03-2019, 11:11 AM - Forum: Obi Fluid - Replies (2)

Hi All,
First of all - I have to say that i really like this product, simulations are very realistic, fast, configurable - well done! (documentation could be improvedSonrisa

using unity 2018.2.1f1 
using Obi 4.0.2

My real scene is a little complex with many moving solvers/emitters, so I built a simple demo scene to demonstrate the problem.
In general: fluid stream collide with a sphere, collided particles are being killed, and for every killed particle a new particle is emitted from a local emitter on the sphere

The demo scene includes the following GameObjects/Components:
1)MainSolver - Empty with a solver (global space) and a script MainCollisionDetection(described bellow)
(solver constraints copied from Obi sample scene "FluidViscosity")
2)MainEmitter - Empty with an ObiEmitter (that uses MainSolver as its solver) and particle renderer
  emitter properties: speed: 5, emitter material: Honey, collision material :very sticky
3)Sphere - unity sphere with ObiCollider ,RB, and ObiRB
  a)SphereSolver - child of Sphere - Empty with a solver (local space)
    (solver constraints copied from Obi sample scene "FluidViscosity")
    1. SphereEmitter - child of SphereSolver - empty with an ObiEmitter (that uses SphereSolver as its solver) and particle renderer
       emitter properties: speed: controlled by script SphereEmitionControl (described bellow), emitter material: Honey, collision material :very sticky 

4)MainCollisionDetection script detects collisions (on MainSolver), kills the hitting particle, and adds the particle collision data to a queue in the SphereEmitionControl script

Code:
using System.Collections.Generic;
using UnityEngine;
using Obi;

public class MainCollisionDetection : MonoBehaviour {

   public ObiEmitter mainEmitter;
   ObiSolver solver;

   Obi.ObiSolver.ObiCollisionEventArgs frame;
   List<int> allreadyEmittedParticles;

   void Awake()
   {
       solver = GetComponent<Obi.ObiSolver>();
   }

   void OnEnable()
   {
       solver.OnCollision += Solver_OnCollision;
   }

   void OnDisable()
   {
       solver.OnCollision -= Solver_OnCollision;
   }
   
   void Solver_OnCollision(object sender, Obi.ObiSolver.ObiCollisionEventArgs e)
   {
       frame = e;
       if (solver == null || frame == null || frame.contacts == null) return;

       allreadyEmittedParticles = new List<int>();
       int closeContacts = 0;

       for (int i = 0; i < frame.contacts.Count; ++i)
       {
           
           if (frame.contacts[i].distance < 0.001f)
           {
               Component contactColl;
               ObiCollider.idToCollider.TryGetValue(frame.contacts[i].other, out contactColl);

               if (contactColl != null)
               {
                   ObiSolver.ParticleInActor pa = solver.particleToActor[frame.contacts[i].particle];
                   ObiEmitter emtr = pa.actor as ObiEmitter;
                   int particleIndexInEmitter = pa.indexInActor;

                   if (!allreadyEmittedParticles.Contains(particleIndexInEmitter))
                   {
                       allreadyEmittedParticles.Add(particleIndexInEmitter);
                       closeContacts++;

                       Vector3 point = frame.contacts[i].point;
                       Vector3 normal = frame.contacts[i].normal;

                       //kill hit particle in the main emitter
                       emtr.life[particleIndexInEmitter] = 0;

                       //look for the hitted collider emitter
                       ObiEmitter colliderEmitter = contactColl.GetComponentInChildren<ObiEmitter>();
                       
                       if (colliderEmitter != null)
                       {
                           SphereEmitionControl sphereEmitionControl = colliderEmitter.GetComponent<SphereEmitionControl>();

                           //add particle to collider emitter queue
                           sphereEmitionControl.AddParticleToEmit(point, Quaternion.Euler(normal));
                       }
                   }
               }  
           }
       }
   }
}

5)SphereEmitionControl script has a queue of particles positions/normals, it is filled only by data from MainCollisionDetection script.  The script repeatedly checks if the queue is not empty, it dequeues the data, move its transform to the stored position/normal and emit for a short while (i didn't know how to emit one particle so i timed the emittion with a coroutine)
Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;


public class ParticleToEmit
{
   public Vector3 pos;
   public Quaternion localRot;
}

public class SphereEmitionControl : MonoBehaviour {

   ObiEmitter m_emitter;
   bool emitting;
   Queue<ParticleToEmit> particlesToEmit;

   void Start()
   {
       m_emitter = GetComponent<ObiEmitter>();
       m_emitter.speed = 0f;
       particlesToEmit = new Queue<ParticleToEmit>();
   }

   void LateUpdate()
   {
       if (particlesToEmit.Count > 0 && !emitting)
       {
           ParticleToEmit par = particlesToEmit.Dequeue();
           transform.position = par.pos;
           transform.localRotation = par.localRot;
           StartCoroutine(ColliderEmitterEmit());
       }
   }

   //add a particle data to queue
   public void AddParticleToEmit(Vector3 pos, Quaternion localRot)
   {
       ParticleToEmit newParticle = new ParticleToEmit();
       newParticle.pos = pos;
       newParticle.localRot = localRot;
       particlesToEmit.Enqueue(newParticle);
   }

   //emit particle
   public IEnumerator ColliderEmitterEmit()
   {
       emitting = true;
       
       m_emitter.speed = 1f;
       m_emitter.EmitParticle(0);

       yield return null;
       
       m_emitter.speed = 0f;

       emitting = false;
   }
}


Regarding the collisions the scripts run OK , the problem is : the particles (emitted from SphereEmitter) are flickering.
I did some testing and found that:
case a: while running - if i disable the MainSolver (in the editor) the flickering stops (strange, it should not effect the scene because the particles belong to the SphereSolver)
case b: while running - if the MainSolver is enabled, and i disable and than enable the SphereSolver - flickering stops, and everything works well as expected, but now if i disable and than enable the MainSolver, flickering starts again

why does the flickering happen?
how to prevent it?

thanks,
shayk

Print this item

  liboni can't be found in linux editor [solved]
Posted by: captainboothat - 09-03-2019, 02:37 AM - Forum: Obi Rope - No Replies

I'm using the linux version of unity and it keeps having problems finding liboni.  The .dll and .so are in obi->plugins->x86_64

[Solved]
Seems unity is expecting to find this lib in /home/$user/Unity/Hub/Editor/2018.3.5f1/Editor/Data/Mono/lib/. Once liboni.so was placed in there it stopped complaining and obi now works.  You'll also have to remove obi/plugin/x86_64/liboni.so or it bitches there's two versions of the lib.  Not sure yet if this effects building the game or not.

Plopping this thread so future users can find it.

Print this item

  Extending rope in a particular way
Posted by: TaliaKuznetsova - 07-03-2019, 06:22 PM - Forum: Obi Rope - No Replies

Ao I recently got obi-rope and so far like what I see but I'm not sure how to use it for what I want. One vehicle is going to have a winch and i need to have it so the player can pull the cable out via hook and carry it with them with the cable extending as they pull out and not auto feed out. My first plan was to physically wrap the cable around the drum like real life and set motor to free spool so when the player tugs the rope it unspools but that seems intensive unless obi rope can handle that no problem. 

My second solution was to attach the rope to the end of the winch body and have it extend when it's being tugged on and the player has the hook in their hand.

Any ideas on the matter? The first option would be ideal as maximum realism is my goal if there is a good way to do that without high cpu useage.

Print this item

  Could you help me? how to config this
Posted by: jirawatball - 07-03-2019, 11:10 AM - Forum: Obi Rope - No Replies

I need to do this but I don't Know how to config this

https://www.picz.in.th/image/tftWXu

https://www.picz.in.th/image/tft0zZ

Print this item

  get sign when cloth is tore
Posted by: Richard - 07-03-2019, 10:20 AM - Forum: Obi Cloth - Replies (17)

Hello.

I want to make if statement when the cloth is tore. How can I do that?

Print this item

Lengua Are Obi products going to be updated soon?
Posted by: StudioTatsu - 07-03-2019, 05:16 AM - Forum: General - Replies (5)

Hi, 

1. I'm wondering if the Obi products will be updated (with bug fixes) on the Unity Asset store soon. Several bug fixes are floating around on the forums that I constantly have to hunt down and add when creating new projects using Obi Assets. 


2. Would you create a video on how to control a softbody ball with a rigidbody - that actually collides with the floor
I think I'm doing something wrong or missing a step. Every time I attempt it, the ball simply falls thru the floor. 

Thanks

Print this item