Search Forums

(Advanced Search)

Latest Threads
Stretching verts uniforml...
Forum: Obi Softbody
Last Post: Aroosh
Yesterday, 05:32 AM
» Replies: 0
» Views: 66
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
11-09-2025, 01:15 PM
» Replies: 25
» Views: 2,753
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 183
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 433
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 685
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 773
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 516
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 489
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 984
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 831

 
Pregunta Knot in suturing simulator
Posted by: Portz - 18-03-2022, 04:26 PM - Forum: Obi Rope - Replies (10)

Hi!
I'm currently developing a suturing simulator for medicine students, and I'm having big trouble finding a way to replicate this exercise in my app (https://www.youtube.com/watch?v=DIUy3jeM6sY). As you can see from this second video (https://www.youtube.com/watch?v=5ZXG9LiYFdc), even with self and surface-based collisions activated and using only distance fields for collisions, the rope passes through itself and objects, making creating a knot impossible. Do you have any suggestions to solve or "bypass" (IDK, maybe dynamically substituting the rope blueprint with a "baked knot" by hitting a controller button at the right time?) this problem?
In the attachment, you can find screenshots of the solver and rope parameters.
Thank you for your attention!



Attached Files Thumbnail(s)
                   
Print this item

  Newby lost, Trying to make a robe bridge
Posted by: oppay - 18-03-2022, 04:04 PM - Forum: Obi Rope - Replies (7)

Hi,
Sorry for my bad english, it's not my first language.

I'm new to using obi rope and rod, so the solution is probably simple, but i can't figure it out despite looking at the video and reading the manual.

I'm tryinig to make a simple rope bridge, with a couple plank pin to two ropes. Before i use a static 3D model (see image model), but I would like to recreate those model with obi rope so they react to the player passing on them.
   

I wasn't sure if i should use robe or Rod so i try to set up both to see what would work the best (i don't need them to move much). In Red plank is the rope and in green the rod. Both use the same solver value, but i have 2 solver in my scene (one for each).I added a particule renderer on all the rope and rod and 2 particule attachement to pin the rope/rod to the plank on each side. The attachement are in static, but changing them to dynamic don't change anything to the result. They also have similar path with a little down curve. They also have a resolution of .5 thickness of 0.1

If they stay about as such, it would be fine for me, but when i press play...

   

they get all twisted in the middle and i don't understand what's causing this and with this happening when i just try to link a rope to 2 fix plank, i worry about what it will be when i try to add plank to this bridge.

Please help, i'm at a lost.



Attached Files Thumbnail(s)
       
Print this item

  Particle Collision Not Working On Instantiated Rope
Posted by: VirtualCucumber - 18-03-2022, 03:42 AM - Forum: Obi Rope - Replies (6)

Hi, 

When I instantiate a prefab consisting of ropes (that then get reparented to ObiSolver object in OnEnable), the OnCollision seems to not catch any collision events with the targeted particle (beginning of rope) but when the prefab is already in the scene, OnCollision is detecting collision events with that particle. Its only with that particle, it seems to throw events with other particles along that rope when instantiated.

It working, this is with the prefab placed in the scene from the start:
[Image: giphy.gif?cid=790b7611ce3aac377c22c6242e...y.gif&ct=g]

When the prefab is instantiated, no collisions events detected from that particle:
[Image: giphy.gif?cid=790b76112f9596c9ab90c9faef...y.gif&ct=g]

OnCollision:

Code:
// Just iterate over all contacts in the current frame
foreach (Oni.Contact contact in handCollision.contacts)
{
    // This one is an actual collision
    if (contact.distance > 0.01) return;

    // Get the particle index directly, as all simplices are guaranteed to have size 1:
    int particleIndex = hand.Solver.simplices[contact.bodyA];

    // This is not the particle you are looking for - Obi Wan
    if (particleIndex != hand.SolverIndex) return;

    // Retrieve collider
    ObiColliderBase collider = ObiColliderWorld.GetInstance().colliderHandles[contact.bodyB].owner;

    // Attach hand and collider
    hand.Grab(collider.transform);
}

Getting the start particle:
Code:
_arm.elements[0].particle1;

The particle is still accurate to the solver indices because I am still able to add force to that specific particle. However, it is not being detected by OnCollision.

Print this item

  How do I make a collider affect particles only?
Posted by: locque - 17-03-2022, 03:43 PM - Forum: Obi Fluid - Replies (11)

Say I want to make a physics bowl containing some fluid that you can stir. I would make a bowl model, and then create a bunch of box colliders roughly tracing the shape of he the bowl since Unity only supports convex colliders for rigidbody physics.

Obi doesn't have any problems with concave colliders, looks like the convex check box on the referenced mesh collider is just ignored by the obi collider that uses it. But I still can't have my concave bowl because Obi seems to require an enabled, non-trigger Unity collider component to work. That means any mesh collider on the bowl will also inevitably affect the regular rigidbody physics, and the rigidbody will always be forced to use a convex version of the mesh collider that obi uses.

Am I missing something or is there no way to have a concave rigidbody that interacts with obi particles?

Print this item

  Unity 2021.2.14f1 .. should work?
Posted by: kreso - 17-03-2022, 01:01 AM - Forum: Obi Softbody - Replies (1)

Loading Obi Softbody into a new project warns of obsolete API.
A lot of console errors.
Running examples is possible (no breaking code) but none of the sample scenes work for me.

Getting a lot of errors of this when I run a sample scene:

Code:
DllNotFoundException: libOni assembly:<unknown assembly> type:<unknown type> member:(null)
Obi.OniColliderWorld.SetColliders (Obi.ObiNativeColliderShapeList shapes, Obi.ObiNativeAabbList bounds, Obi.ObiNativeAffineTransformList transforms, System.Int32 count) (at Assets/Obi/Scripts/Common/Backends/Oni/OniColliderWorld.cs:40)
Obi.ObiColliderWorld.UpdateWorld (System.Single deltaTime) (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:388)
Obi.ObiUpdater.BeginStep (System.Single stepDeltaTime) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:56)
Obi.ObiFixedUpdater.FixedUpdate () (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:46)

I am on a M1 Mac if that matters.

Is Obi softbody expected to run in Unity 2021.2?

Kind regards

Print this item

  Is obi rope/bone a good solution for active ragdoll implementation?
Posted by: thetrapman - 17-03-2022, 12:15 AM - Forum: Obi Rope - Replies (1)

Hello, I am developing a third person game with non-humanoid players and enemies/npc: insect-like and reptile-like characters with different body structures(they can have tails, antennas and other different kind of limbs/members which will be used for attacking/defending) and complex locomotion system(they can walk on walls or upside-down, can jump, moving objects will push them away etc).
What i mostly want to achieve is to make the characters behave like active ragdolls so that the limbs mentioned above and the rest of the body will not pass through objects, and also external objects forces which should include the other enemies who attack me(for example getting hit by a tail or by throwing a rock) should make the creature react to hits by moving and rotating the hitted part of the body or the entire body depending on the hit force. 
Also most of the animation will be made procedural using inverse kinematics.

Now i am not here to ask how to do it Gran sonrisa but i want to know if obi rope/bone components is helpful for creating this kind of active ragdoll because browsing obi bone setup and other examples gave me the impression that it can make the tasks easier.

Print this item

  Three bugs in FluidKarmanVortex Scene
Posted by: Chua Polar - 15-03-2022, 09:17 AM - Forum: Obi Fluid - Replies (6)

Environment: Win10, Unity 2022.1.0b4.2571, Obi FLuid 6.4 with Burst Solver, FluidKarmanVortex scene.
1. Warning of setting the velocity of a kinematic body. See the file of waring1.
2. Job access out range error. See the file of error1.
3. The particle advected by the fluid will disappear a few times after the scene started. The particles will quickly disappear after being emitted. See the image.

Images: https://drive.google.com/drive/folders/1...sp=sharing

Print this item

  Deleting particles when in contact with certain objects
Posted by: fanoftoucans - 14-03-2022, 03:21 PM - Forum: Obi Fluid - Replies (2)

Hello!

Context:
I am relatively new to unity and very new to Obi Fluids. I am working on a VR project where I have an emitter for a sink that turns on if the player holds a cup under the sink. This part works fine, but because I want the particles to stay in the cup, I have set the lifespan to "infinity" for my sink emitter. This works fine when the water is in the cup, but because movement is very jumpy/sudden in VR, sometimes the particles will fly out of the cup and into the sink / on the floor.

Question:
Is there a way to make it so particles are killed (lifespan set to 0) if they touch the sink or floor (or any specific object) and still have an infinite life in the cup? The goal is to have an infinite life for the particles only while in the cup, and if the particles hit the sink or floor they are sent back to the emitter. This would mean I could theoretically fill up my cup, dump it down the sink and see the particles "drain", and fill my cup at the sink again.

Let me know if I can clarify anything. As mentioned, I'm relatively new to this, so I don't have any foundation work for this goal; I'm starting from scratch. I mostly want to know if it's possible and what I would need to do to make this happen (e.g. call a system or built in function that I am unaware of.)

Thanks!

Print this item

  ObiFluid Rendering Question(s)
Posted by: Xanduffy - 12-03-2022, 11:18 PM - Forum: Obi Fluid - Replies (4)

Hi, I've been messing around with ObiFluid the last few days and I'm starting to achieve a look I like, but I have two questions:

Firstly, how can I change the rendering order so that fluid appears behind particles from a VFX graph?
Secondly, how can I get rid of this white edge colour where the fluid contacts the ground? It is only visible in the game view(pic below), but my experimenting with the fluid renderer settings hasn't revealed the cause, this was the least obvious I could make it.

I'm using URP in 2021.2.7 and I've followed the basic setup guides but may have missed something.

As a final bonus question, are there any example shaders that allow some sort of projected texture mapping onto obi fluid, or is that a dumb question? 

Thanks in advance Jose! Gran sonrisa 

[Image: obiwhite.png]

Print this item

Pregunta (SOLVED) "ERROR: Vertex has zero weights" when scaling softbody skinner
Posted by: DGuy01 - 11-03-2022, 03:16 PM - Forum: Obi Softbody - Replies (3)

When changing the scale of a softbody skinner, I get the following error:



[Error] console:Mesh.SetBoneWeights() failed: Vertex [...] has zero weights.

The skinner appears fine in the editor, but when I press "Play", the skinner snaps back to it's original, unscaled size and the error appears (See attached GIF.)


.gif   SoftBodyScaleIssue.gif (Size: 634.4 KB / Downloads: 61)

My Obi Solver is set up as the RedDragon example, with the Softbody and Softbody skinner attached to different GameObjects.




BTW, if I set the skinner scale back to '1', re-bind and press "Play", the error message goes away.


Is this a bug or might I be doing something wrong?



Thanks,

David

Using Obi Softbody 6.4 with Unity 2020.3.30f1



BTW, here's the full stack trace:



Code:
ObiSoftbodySkinner.SetBoneWeights() at /Obi/Scripts/Softbody/Rendering/ObiSoftbodySkinner.cs:386
384:  {
385:      if (m_BoneWeights != null && m_BoneWeights.count > 0)
-->386:          m_SoftMesh.SetBoneWeights(m_BonesPerVertex.AsNativeArray<byte>(), m_BoneWeights.AsNativeArray<BoneWeight1>());
387:  }

ObiSoftbodySkinner.Setup() at /Obi/Scripts/Softbody/Rendering/ObiSoftbodySkinner.cs:135
133:  m_SoftMesh = Instantiate(m_Target.sharedMesh);
-->135:  SetBoneWeights();
136:  AppendBindposes();
137:  AppendSoftBones();

ObiSoftbodySkinner.UpdateSoftBones() at /Obi/Scripts/Softbody/Rendering/ObiSoftbodySkinner.cs:218
216:          }
217:              else
-->218:                  Setup();
219:          }

ObiActor.Interpolate() at /Obi/Scripts/Common/Actors/ObiActor.cs:1223
1222:      if (OnInterpolate != null)
-->1223:          OnInterpolate(this);
1224:  }

ObiSoftbody.Interpolate() at /Obi/Scripts/Softbody/Actors/ObiSoftbody.cs:288
286:      SetSelfCollisions(selfCollisions);
-->288:      base.Interpolate();
289:  }

ObiSolver.Interpolate() at /Obi/Scripts/Common/Solver/ObiSolver.cs:1641
1640:      foreach (ObiActor actor in actors)
-->1641:          actor.Interpolate();
1643:  }

ObiUpdater.Interpolate() at /Obi/Scripts/Common/Updaters/ObiUpdater.cs:132
130:          foreach (ObiSolver solver in solvers)
131:              if (solver != null)
-->132:                  solver.Interpolate(stepDeltaTime, accumulatedTime);
133:      }
134:  }

ObiFixedUpdater.Update() at /Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:64
62:  {
63:      ObiProfiler.EnableProfiler();
-->64:      Interpolate(Time.fixedDeltaTime, accumulatedTime);
65:      ObiProfiler.DisableProfiler();

Print this item