Search Forums

(Advanced Search)

Latest Threads
Stretching verts uniforml...
Forum: Obi Softbody
Last Post: josemendez
Yesterday, 04:32 PM
» Replies: 1
» Views: 180
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
11-09-2025, 01:15 PM
» Replies: 25
» Views: 3,063
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 271
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 541
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 787
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 858
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 594
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 558
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 1,061
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 904

 
  Sporadic Performance Drops
Posted by: salvetori - 30-01-2018, 05:44 PM - Forum: Obi Cloth - Replies (12)

Hello,

I've been having an issue where every few seconds I will encounter a massive momentary drop in performance. In this scenario the cloth I am simulating is following the character cloth setup from the documentation, and is currently not colliding with anything. The solver is using the default settings save for having the simulation space set to local and having the simulation order set to late update. The cloth being simulated has thickness, with self collisions enabled. However, enabling a cloth proxy or not didn't seem to have an effect on this performance spike happening. I also tested simply disabling every single constraint and that also did not seem to have an effect.

[attachment=70]

I followed some of the pointers found in this thread: http://obi.virtualmethodstudio.com/forum...d-200.html
Unfortunately these didn't change the outcome.

The demo scenes that come with obi cloth perform fine and I don't encounter this issue in those demo scenes, particularly in the character cloth scene that I am trying to emulate.
I am not really sure what is going on so I'd appreciate some help. Let me know if you guys need more info.

[attachment=69]

Edit:

So, I was incorrect in saying that the performance spikes don't happen in the different demo scenes. This is the benchmark scene profile:

[attachment=71]

Is this just a symptom of having a weak processor?
I have a AMD 6300 Six-Core Processor
I am also using Unity 2017.3.0f3

Is there some other way to prevent these performance spikes from happening? Or am I out of luck?

Print this item

  ParticleCollisionEvent OnParticleCollision
Posted by: UTFLuke - 29-01-2018, 03:46 PM - Forum: Obi Fluid - Replies (5)

Hi there,

i was wondering, how to create an ParticleCollisionEvent in a OnParticleCollision function. 
I can get the Particle collision via this function.
But i am not sure, how to build an ParticleCollisionEvent from this. Or how to get the Info from the collision from the code below.

My goal is to get aVector3 Intersection of the Collision, and the normal Sonrisa

void Solver_OnCollision(object sender, Obi.ObiSolver.ObiCollisionEventArgs e)
    {
        for (int i = 0; i < e.contacts.Length; ++i)
        {
            if (e.contacts[i].distance < 0.001f)
            {
                Component collider;
                if (ObiCollider.idToCollider.TryGetValue(e.contacts[i].other, out collider))
                {
                }
 
            }
        }
    }

thx for any help Sonrisa


I actually got that to work, I used 
e.contacts[i].point as the intersect Point
e.contacts[i].normal as the normal
(pretty obvious Lengua)

Now i just ran into another Problem. The OnParticleCollision triggers quite often, but I would rather like it to trigger it only on the first collision. What would be a good approach to achieve that behaviour?

Thx in regards,
A ObiFluid - Noob

Print this item

  Firehose
Posted by: moXier - 29-01-2018, 03:33 PM - Forum: Obi Rope - Replies (3)

How can I simulate a fire hose.
Right now one of the  ends are stuck to a nozzle, but when I walk away it is very weird, I want it to become longer and not glide around XD.

Print this item

  Large Radius Liquid Transfer Pipe that can be picked up at any point for HTC Vive
Posted by: AccqwTit - 29-01-2018, 08:16 AM - Forum: Obi Rope - No Replies

Good day,

I am building a program the simulate a fuel plant, for HTC Vive. 

I have several issues that I am experiencing:

1. Large radius pipe that transfers fuel from the plant to the truck: When I attach SteamVR throwable script to the object attached to the end-point of the rope, the whole rope malfunctions.

2. Collision effect seems not to work on SteamVR teleportation platforms. The rope cannot detect colliders.

3. Fuel Transfer pipe seems not to have weight, and it stretches. I applied the distance constraint, but I am not winning.

4. I also want to be able to pick the pipe from any point of the rope. Including the object attached at the end of the rope.

Print this item

  Bug + fix: IndexInActor not updated in solver after a particle kill
Posted by: tooomg - 28-01-2018, 05:34 AM - Forum: General - Replies (3)

Hi there!

I was doing some kind of fancy particle management when I came across a bug preventing me to delete the last particle of an emitter if another particle from the same emitter has been killed before. (Note: I've been killing it the "proper" way, setting its life to zero)
The bug was due to the fact that the IndexInActor field from the ParticleInActor class in the solver is not updated when a particle is killed by the Emitter. The consequence is that when deleting my 2nd particle, its IndexInActor still "pointed" to the particle I just killed before and was moved to inactive particles group at the end of the list.
I took a quick look and it seems that there's nowhere where IndexInActor is updated, so the fix boils down to doing it in KillParticle:

Code:
       public bool KillParticle(int index){

           if (activeParticleCount == 0 || index >= activeParticleCount) return false;

           // reduce amount of active particles:
           activeParticleCount--;
           active[activeParticleCount] = false;

           // swap solver particle indices:
           int temp = particleIndices[activeParticleCount];
           particleIndices[activeParticleCount] = particleIndices[index];
           particleIndices[index] = temp;
           // FIX BEGIN
           solver.particleToActor[particleIndices[index]].indexInActor = activeParticleCount;
           solver.particleToActor[temp].indexInActor = index;
           // FIX END

I tried it on my scene and if fixes the problem wonderfully!
I guess this was the intent of the existing swap in particleIndices above (cf the comment), but the change is not deep enough in the system for it to work correctly.
Unless the bug was due to me using the system in the wrong way, I guess it would be good to have this extra piece of logic integrated in the next release.

Cheers!

Print this item

  Simultaneous cloth collision with terrain and character
Posted by: a12345 - 27-01-2018, 11:49 PM - Forum: Obi Cloth - Replies (1)

Hi,

Is it possible to create a cloth that can detect collisions both with a terrain collider as well as the character that is wearing the cloth? Essentially I have a character wearing a trench coat that at some point will begin crawling on the floor. The cloth now needs to collide with both the character and the terrain and not disappear into the terrain.

How would I achieve this with Obi Cloth?

Print this item

  Callback for particle-particle collision
Posted by: tooomg - 26-01-2018, 10:44 PM - Forum: Obi Fluid - Replies (2)

Hi there!

I'm looking for a way to know when particles from different phases are colliding, in order to do some custom logic for each collision. The collision physics itself is working so I guess there's nothing wrong with my setup, but it might be the case, I'm fairly new with Obi Fluid.
I've looked into the ObiSolver.OnCollision callback, but it seems that it only provides data for the collisions against the Colliders of my scene!
Is there a way of achieving this particle-against-particle detection? Maybe directly through the Oni API? I don't know if that's realistically feasible in terms of performance, but let's try hehehe


Cheers and thanks for this great plugin!
Tom

Print this item

  Using Obi Cloth With Blend Shapes
Posted by: JoeParente34 - 24-01-2018, 11:30 PM - Forum: Obi Cloth - Replies (2)

Hi, I'm running into an issue with Obi cloth, that I can't seem to figure out.  The cloth simulation is working great on any given mesh, until one of the blend shapes is activated.  Then it seems like the cloth simulation is turned off.  For example, I have the cloth simulation on some hair.  There's a blend shape associated with the hair model to make it shorter, once this is turned on the cloth simulation stops.  Is it not possible to have both working on a model at the same time?  Am I doing something wrong settings wise?  

Hope to hear from you soon, Thanks!

Print this item

  Performance issues
Posted by: khalvr - 24-01-2018, 04:00 PM - Forum: Obi Rope - Replies (12)

I'm using Obi Rope to simulate cords and wires in a VR truck service simulator. Since it was extremely unpractical and unstable to let Obi manage the rope length constraints, i decided to make all rigidbodies kinematicForParticles and use spring joints between the plugs (and dummy rigidbodies pinning the ropes together at all junctions) to keep them connected, just using ObiRope to simulate the aesthetics of the cords with pin constraints. The results are not 100% accurate, but it looks good enough for my purposes. Despite this, and despite rendering over 30 million triangles in the scene, ObiRope still stands for over 60% of the CPU load. This is despite the fact that i only use 2 solvers (one in each sub-scene), each with all constraints except pin, stitch, distance and collision disabled, and iteration counts set to 3 and below. There are maybe around 50 obi colliders in the scene. I also have a resolution of below 0.2 on all my ropes - in total, there are roughly 700 particles simulating. If i hang ropes on the wall (by attaching a fixed joint to one of the plug ends), obi will eventually even crash unity very suddenly and without warning. I have changed it so that the solvers run in LateUpdate, and reduced the advection radius to 0.05, but the performance is still utter crap. Am i doing something wrong, or does it simply not get better than this?

EDIT: Before Unity crashes, i get a huge wave of errors starting with:

Assertion failed: Assertion failed on expression: 'CompareApproximately(det, 1.0F, .005f)'
UnityEngine.Quaternion:FromToRotation(Vector3, Vector3)
Obi.CurveFrame:Transport(Vector3, Vector3, Single) (at Assets/Obi/Scripts/Actors/ObiRope.cs:61)
Obi.ObiRope:UpdateRopeMesh() (at Assets/Obi/Scripts/Actors/ObiRope.cs:962)
Obi.ObiRope:UpdateProceduralRopeMesh() (at Assets/Obi/Scripts/Actors/ObiRope.cs:892)
Obi.ObiRope:UpdateVisualRepresentation() (at Assets/Obi/Scripts/Actors/ObiRope.cs:590)
Obi.ObiRope:OnSolverFrameEnd() (at Assets/Obi/Scripts/Actors/ObiRope.cs:365)
Obi.ObiSolver:EndFrame(Single) (at Assets/Obi/Scripts/Solver/ObiSolver.cs:536)
Obi.ObiSolver:LateUpdate() (at Assets/Obi/Scripts/Solver/ObiSolver.cs:665)


Eventually i get this:

rigidbody.velocity assign attempt for 'Breakout Box' is not valid. Input velocity is { NaN, NaN, NaN }.
UnityEngine.RigidbodyConfundidoet_velocity(Vector3)
Obi.ObiRigidbody:UpdateVelocities() (at Assets/Obi/Scripts/Collisions/ObiRigidbody.cs:68)
Obi.ObiColliderBase:UpdateRigidbody(Object, EventArgs) (at Assets/Obi/Scripts/Collisions/ObiColliderBase.cs:262)
Obi.ObiArbiter:WaitForAllSolvers() (at Assets/Obi/Scripts/Solver/ObiArbiter.cs:82)
Obi.ObiSolver:SimulateStep(Single) (at Assets/Obi/Scripts/Solver/ObiSolver.cs:499)
Obi.ObiSolver:LateUpdate() (at Assets/Obi/Scripts/Solver/ObiSolver.cs:659)

Assertion failed: Assertion failed on expression: 'fRoot >= Vector3f::epsilon'
UnityEngine.Quaternion:FromToRotation(Vector3, Vector3)
Obi.CurveFrame:Transport(Vector3, Vector3, Single) (at Assets/Obi/Scripts/Actors/ObiRope.cs:61)
Obi.ObiRope:UpdateRopeMesh() (at Assets/Obi/Scripts/Actors/ObiRope.cs:962)
Obi.ObiRope:UpdateProceduralRopeMesh() (at Assets/Obi/Scripts/Actors/ObiRope.cs:892)
Obi.ObiRope:UpdateVisualRepresentation() (at Assets/Obi/Scripts/Actors/ObiRope.cs:590)
Obi.ObiRope:OnSolverFrameEnd() (at Assets/Obi/Scripts/Actors/ObiRope.cs:365)
Obi.ObiSolver:EndFrame(Single) (at Assets/Obi/Scripts/Solver/ObiSolver.cs:536)
Obi.ObiSolver:LateUpdate() (at Assets/Obi/Scripts/Solver/ObiSolver.cs:665)

And also this:

Assertion failed: Invalid worldAABB. Object is too large or too far away from the origin.

The way i interpret it, a rounding error propagates in the quaternion calculations causing forces to be scaled high enough to instantly propel objects out of the scene. It's just a qualified guess, though, and i'm not sure why forces would be applied anyway since the objects are all kinematic as far as Obi is concerned. In this particular case, the crash only occurs when the cord is hanging against the wall, but i've had it before as well in various situations (Always the AABB error).

EDIT2: Some more of the errors:

Assertion failed: Converting invalid MinMaxAABB
UnityEngine.Mesh:SetTriangles(List`1, Int32, Boolean)
Obi.ObiRope:CommitMeshData() (at Assets/Obi/Scripts/Actors/ObiRope.cs:911)
Obi.ObiRope:UpdateRopeMesh() (at Assets/Obi/Scripts/Actors/ObiRope.cs:1037)
Obi.ObiRope:UpdateProceduralRopeMesh() (at Assets/Obi/Scripts/Actors/ObiRope.cs:892)
Obi.ObiRope:UpdateVisualRepresentation() (at Assets/Obi/Scripts/Actors/ObiRope.cs:590)
Obi.ObiRope:OnSolverFrameEnd() (at Assets/Obi/Scripts/Actors/ObiRope.cs:365)
Obi.ObiSolver:EndFrame(Single) (at Assets/Obi/Scripts/Solver/ObiSolver.cs:536)
Obi.ObiSolver:LateUpdate() (at Assets/Obi/Scripts/Solver/ObiSolver.cs:665)

Mesh '': abnormal mesh bounds - most likely it has some invalid vertices (+/-inifinity or NANs) due to errors exporting.
Mesh bounds min=(-1.#J, -1.#J, -1.#J), max=(-1.#J, -1.#J, -1.#J). Please make sure the mesh is exported without any errors.

Assertion failed: Invalid worldAABB. Object is too large or too far away from the origin.

It seems to be triggered primarily by collisions between ObiColliders with an attached ObiRigidbody.

Print this item

  Earlier Versions of Obi Rope
Posted by: binhong87 - 24-01-2018, 11:04 AM - Forum: Obi Rope - Replies (2)

Hello,

Can you provide a earlier version of Obi Rope?
I want to use it on Unity 5.4.x.
I have already purchased this plugin, with order #12369623925197

Thanks,
Bin

Print this item