Search Forums

(Advanced Search)

Latest Threads
Animating rod rest positi...
Forum: Obi Rope
Last Post: marzand
Yesterday, 08:26 PM
» Replies: 42
» Views: 44,823
Shader Error in Obi Fluid...
Forum: Obi Fluid
Last Post: josemendez
Yesterday, 10:26 AM
» Replies: 1
» Views: 63
Destroy particle on colli...
Forum: Obi Fluid
Last Post: Cat3Man
21-02-2025, 09:14 AM
» Replies: 15
» Views: 31,883
Interaction Obi fluid/clo...
Forum: Obi Cloth
Last Post: josemendez
19-02-2025, 08:55 PM
» Replies: 1
» Views: 109
Fluid ignores colliders o...
Forum: Obi Fluid
Last Post: josemendez
18-02-2025, 09:03 AM
» Replies: 2
» Views: 179
Particle attachments dont...
Forum: Obi Rope
Last Post: josemendez
13-02-2025, 03:09 PM
» Replies: 1
» Views: 195
Dynamic attachment to fix...
Forum: Obi Rope
Last Post: josemendez
12-02-2025, 02:52 PM
» Replies: 9
» Views: 573
Changing rope lenth creat...
Forum: Obi Rope
Last Post: josemendez
11-02-2025, 08:35 PM
» Replies: 3
» Views: 309
Preventing fabric from vi...
Forum: Obi Cloth
Last Post: josemendez
10-02-2025, 12:36 PM
» Replies: 1
» Views: 216
Trouble with Attachments
Forum: Obi Softbody
Last Post: beegon
07-02-2025, 08:29 PM
» Replies: 3
» Views: 319

 
Triste Shader Error in Obi Fluid 7.0.4 with Unity 2023.1.3f1 (URP 2D)
Posted by: robertye - Yesterday, 09:43 AM - Forum: Obi Fluid - Replies (1)

Hi,

I am using Obi Fluid 7.0.4 in Unity 2023.1.3f1 with Universal 2D, and I encountered the following error message:


Code:
Shader error in 'Shader Graphs/IndirectTransparent': 'OUTPUT_SH': Too few arguments to a macro call. 

at Assets/Obi/Resources/ObiMaterials/Fluid/ObiLightingURP.cginc(79)


This causes the transparent fluid to not display correctly.

If I comment out the code, the fluid seems to display correctly, but something appears to be missing.
However, in the RollingFriction example, the stone becomes invisible after commenting it out.

Before commenting:

[Image: 1ALR-cbfyiQtxfQIttlQl9XNj0B_glag9]

After commenting:

[Image: 1xew-Xbj2OkhccoQQHU1_Pet6sLSFZTtN]
[Image: 1xVASWuV7mlT75j3JQeXWXZidO70CZBtY]

Any insights or solutions would be greatly appreciated.

Thank you!

Print this item

  Interaction Obi fluid/cloth
Posted by: cliv3dev - 19-02-2025, 06:47 PM - Forum: Obi Cloth - Replies (1)

Hi,

I am testing collision between Fluid and cloth. 
Works fine between ObiCloth and ObiFluid, but when switching to ObiTearableCloth, fluid doesn't collide anymore with Tearable cloth. Do I need extra setup for collision to work ?

thanks,
Diego

Print this item

  Fluid ignores colliders on certain amount of particles (compute backend)
Posted by: JulijaF - 17-02-2025, 03:00 PM - Forum: Obi Fluid - Replies (2)

First off, I just want to say how amazing Obi Fluid is! I've had so much fun creating various liquids for my projects—huge thanks for the fantastic work. Keep it up!  Sonrisa

The Issue:
I initially ran into an issue with the compute backend struggling when handling a large number of colliders in the scene. The fluid wouldn't collide with anything, but I found a fix on the forum by adjusting:

Code:
#define MAX_CONTACTS_PER_SIMPLEX 32 → 512
This resolved the problem, but only up to a certain number of particles.

My Setup:
  • Colliders: ~150 (mostly Box Colliders), positioned close together.
  • Fluid Resolution: 3
  • Particle Count: Around 185k particles—at this point, the fluid starts ignoring colliders and becomes jittery.
The Problems:
  1. Instability at High Particle Count
    • Even with a high-end GPU, the compute backend becomes unpredictable when the particle count increases.
    • Reducing the resolution only delays the breaking point.
  2. Collisions Causing Jitter
    • The fluid behaves erratically when colliding with many objects, even with particle count around 100k.
    • This jitteriness leads to excessive foam generation.
Example Demos:
  1. Jittering Fluid at High Particle Count 
    demo
  2. Fluid Passing Through Multiple Colliders
    demo
Would love any insights on improving stability and handling high particle counts effectively. Thanks in advance! ?

Print this item

  Particle attachments dont attach correctly on quest2
Posted by: drone - 13-02-2025, 02:49 PM - Forum: Obi Rope - Replies (1)

Hi, in my company we have Obirope asset and i have a few problems setting it up.

We have overcomplicated vr setup using MetaXR sdk. Obirope 7.0.3, burst solver. 
There is image limit on forum so i uploaded it here. In Editor it looks ok (attachment 1. Cables in editor image),
but when app is built and run on quest2 cables are not snapped in place(attachment 2. Cables on the device).

Attachments 3-7 show my in editor setup. On image 4 control points on the edges collide with noting. Image 7 shows attachments that are set up on both sides of rope.
Stuff is connected to each other using meta SnapInteractable to SnapInteractor connection creating ”chains” of objects (they must be coupled/decoupled dynamically).
I also tried to write custom script for forcing renderable position into target Transform position. Sadly there is no visible change on the device.

Another issue is that I have problems with setting up rope as cable so it will behave more like cable, not like rope. Any suggestions?
And fps drop (-20fps) but I assume it's caused by multiple ropes, for now I just want rope endings to attach. 

Please let me know if I can specify something more or you need any additional information regarding my setup.

Print this item

Pregunta Dynamic attachment to fixed object with hinge component
Posted by: NoahAtlas - 12-02-2025, 09:34 AM - Forum: Obi Rope - Replies (9)

I'm working on this scene where I have a chain that is connected to 2 hooks. Both particle attachments are set to static. In the first attached image "Editor Setup" you can see how the setup looks in the editor. When I run this scene, the green mesh rotates downwards (due to the rigidody and hinge components) and we get the second image "Scene Running (Static)". Up until now everything is behaving as expected. 

Since I want the amount of strain on the chain to influence the rotation of the bottom hook (green mesh) I make the bottom particle attachment dynamic (and add the needed obi collider and rigidbody components to the bottom hook). When I don't change the settings of the chain, running the scene will lead to very erratic behavior: The chain immediately disconnects and all the components just start shaking uncontrollably (seen in image 3 "Dynamic No Changes").

I then tried modifying the chain constraints but it always results in a chain that doesn't have enough strain on it and that doesn't connect to the the mesh properly (as seen in image 4 "Dynamic With Stretch Compliance").

In the fifth attachment "Constraints" I have the constraints I used for the static image and the dynamic one + the Obi Solver settings. I tried tweaking every possible constraint to get a working dynamic attachment but nothing has worked. Any ideas what I could possibly be doing wrong?

Thanks in advance!



Attached Files Thumbnail(s)
                   
Print this item

  Changing rope lenth creates erratic behaviour
Posted by: VAbert - 10-02-2025, 09:46 AM - Forum: Obi Rope - Replies (3)

Hello!

Using Obi Rope, I'm trying to make a simple system where a rope is connected to a wall (attachment pin), and to an object that the player can control (another attachment pin); both of those static. I want to make sure that when the object moves away from the wall attachment, the rope gets longer, and when it gets closer, the rope gets shorter. I'm using a cursor, and I tried a few different solutions, but I couldn't get it to work. Here is the current code:

Code:
float dist = Vector3.Distance(obj.position, wallAttachment.position) * 1.2f;
if(dist - rope.restLength > 0.1f)
{
      objCursor.ChangeLength(Time.deltaTime * ropeSpoolSpeed);
}
else if(dist - rope.restLength < -0.1f)
{
      objCursor.ChangeLength(Time.deltaTime * -ropeSpoolSpeed);
}


The result is extremely chaotic, as you can see in this video : 

Am I missing something?

Also, along my experiences, I managed to make the rope shorter than zero, which results in an error spamming (in my opinion, it should not be possible), and also to crash Unity, probably by making it too long ? (I feel like there should also be a failsafe there).

Thank you!

Print this item

  Preventing fabric from vibrating and drooping
Posted by: CptnFabulous - 09-02-2025, 04:22 AM - Forum: Obi Cloth - Replies (1)

We have a system where a virtual garment is procedurally generated, consisting of multiple fabric shapes stitched and stretched around the character model. I’ve noticed an issue where the fabric vibrates and sometimes clips through the model, and I think this is because of the fabric being stretched too tight.

I tried loosening the stretch scale and stretch compliance (they’re normally at 1 and 0 respectively), but any value loose enough to stop the vibrating also resulted in the fabric drooping and losing its shape (more than it already does). I compensated by increasing the particle inverse mass (to try and decrease the mass and make the fabric less likely to droop down), but this makes it start vibrating again.

Another solution I thought of was to directly modify the mesh before generating. The cloth has two halves, front and back, which are initially flat meshes. I made some code that uses raycast checks to manually modify each vertex, to make the mesh wrap more closely around the body. This reduces some of the vibration, but still has some jittering and causes the fabric to droop (albeit in a slightly more crinkly and polygonal way).


I've been thinking about making a system to have most of the garment non-simulated. so it conforms to the model and doesn't move about in ways it doesn't need to, but since the garment is procedurally generated I'm not sure yet how to differentiate between the bits that need to simulate realistically and the bits that can stay in place.

What other methods could I try to reduce jittering?

Thanks!

Print this item

  Collider interactions
Posted by: AnupamSingh - 07-02-2025, 09:26 AM - Forum: Obi Softbody - Replies (1)

Is it possible for a Unity (non-Obi) collider to detect interaction events with Obi colliders? Do Obi colliders adapt according to the shape of a deformed object? I intend to use it for haptic feel so shape of colliders is important. I added a Unity mesh collider with softbody and that does not appear to deform with particles. Kindly suggest any possible approach.

Print this item

  Trouble with Attachments
Posted by: beegon - 06-02-2025, 11:31 PM - Forum: Obi Softbody - Replies (3)

I'm trying to attach some objects to a softbody via Obi Particle Attachments. 

I created some particle groups in the blueprint and assigned the objects to their respective particle group in the attachments. I want the objects to maintain their orientations relative to their particle group and I don't want the attached objects to influence the softbody if possible. I've tried every option and configuration I can think of, but the behavior is always undesirable or unstable.

   
I want the spikes to stick out of the ball like this and maintain their relative positions and rotations as the ball rolls around.


.gif   SoftbodyAttachments.gif (Size: 787.22 KB / Downloads: 10)
Instead the objects drift away from the surface or roll around their local axis. They also seem to pull the softbody around a bit instead of just going along for the ride, which is undesirable.

Is there a way to achieve the behavior I'm looking for? Or maybe I'm missing something with my setup? Any thoughts are appreciated. I can link you this project if you'd like to see my setup. Thanks!

Print this item

  RuntimeRopeGenerator basic questions
Posted by: ayoci - 04-02-2025, 04:30 PM - Forum: Obi Rope - No Replies

Hi! 

I had to upgrade Obi Rope from version 3 to 7 because I bought Obi SoftBody as well, and unfortunately, they don't work on separate versions. 

I’m not quite familiar with this version yet. 

How can I generate a ropes that always has the same length? 
Currently, it generates the rope based on the distance between the Start and End points, but I don’t want that. I tried using "controlPoints.Add(Vector3.down * ropeLength);" like in the old version but it's does not work anymore. 

Code:
public Transform startp;
public Transform endp;

public Material material;

private ObiRope rope;
public ObiSolver solver;
public ObiRopeBlueprint ropeBlueprint;
private ObiRopeCursor cursor;

public void createropeline()

  {

      solver = GameObject.Find("Obi Solver").GetComponent<ObiSolver>();    
      GameObject ropeObject = new GameObject("ObiRope");
      ropeObject.transform.SetParent(solver.transform);   
      rope = ropeObject.AddComponent<ObiRope>();

      var pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints<ObiPinConstraintsBatch>;
      pinConstraints.Clear();
     
      var ropeRenderer = ropeObject.AddComponent<ObiRopeLineRenderer>();
      ropeRenderer.uvScale = new Vector2(1, 5);
      ropeRenderer.material = material;

     
      rope.bendConstraintsEnabled = false;
      rope.stretchingScale = 0.5f;
      rope.aerodynamicsEnabled = false;

     
      int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0);


      ropeBlueprint.path.Clear();
      ropeBlueprint.path.AddControlPoint(startp.position, Vector3.zero, Vector3.zero, Vector3.zero, 0.05f, 0.05f, 0.3f, filter, Color.white, "Start");
      ropeBlueprint.path.AddControlPoint(endp.position, Vector3.zero, Vector3.zero, Vector3.zero, 0.05f, 0.05f, 0.3f, filter, Color.white, "End");
      ropeBlueprint.path.FlushEvents();

     
      rope.ropeBlueprint = ropeBlueprint;
     
    
      AttachRopeEnds();

     
  }
  public void AttachRopeEnds()
  {
      if (rope == null || ropeBlueprint == null)
          return;

      var attachmentA = rope.gameObject.AddComponent<ObiParticleAttachment>();
      attachmentA.target = startp;
      attachmentA.particleGroup = ropeBlueprint.groups[0];
      attachmentA.attachmentType = ObiParticleAttachment.AttachmentType.Dynamic;

      var attachmentB = rope.gameObject.AddComponent<ObiParticleAttachment>();
      attachmentB.target = endp;
      attachmentB.particleGroup = ropeBlueprint.groups[ropeBlueprint.groups.Count - 1];
      attachmentB.attachmentType = ObiParticleAttachment.AttachmentType.Dynamic;

   
     
  }

If i switch startp.position, endp.position to Vector3.zero, Vector3.one Then nothing happens when i create the rope.

This is the script I’m currently using, and it works well, but compared to the ExtendableGrapplingHook.cs, it seems quite incomplete.
Could it cause any issues that I’m not using a Coroutine or that "var batch = new ObiPinConstraintsBatch();" section?

Or could it be that the missing parts are exactly why my rope isn't generating properly when I use Vector3.zero, Vector3.one instead of my Transforms?

I know my questions are very basic but i didn't find a normal "Runtime Rope Generator" example.   Indeciso

Thank you in advance. Sonrisa

Print this item