Search Forums

(Advanced Search)

Latest Threads
Non destructive blueprint...
Forum: General
Last Post: Qriva0
Yesterday, 02:40 PM
» Replies: 5
» Views: 131
How did they do with with...
Forum: Obi Cloth
Last Post: josemendez
Yesterday, 09:04 AM
» Replies: 1
» Views: 62
Anisotropic Particle Dens...
Forum: Obi Softbody
Last Post: josemendez
03-03-2026, 08:22 AM
» Replies: 1
» Views: 119
Alternative methods to an...
Forum: Obi Softbody
Last Post: midivagrant
27-02-2026, 04:50 PM
» Replies: 2
» Views: 377
Burst job schedule overhe...
Forum: General
Last Post: Qriva0
23-02-2026, 02:23 PM
» Replies: 4
» Views: 627
Trying to make obi fluids...
Forum: Obi Fluid
Last Post: josemendez
20-02-2026, 03:55 PM
» Replies: 5
» Views: 855
VR Fishing Project
Forum: Made with Obi
Last Post: astro.domine
19-02-2026, 07:49 PM
» Replies: 0
» Views: 172
Emit rope like silly stri...
Forum: Obi Rope
Last Post: josemendez
19-02-2026, 12:01 PM
» Replies: 18
» Views: 3,218
Procedurally applying dif...
Forum: Obi Cloth
Last Post: josemendez
18-02-2026, 11:50 AM
» Replies: 1
» Views: 301
Softbody High Particle Co...
Forum: Obi Softbody
Last Post: Eritar
13-02-2026, 02:15 PM
» Replies: 6
» Views: 918

 
  Mixing 2D and 3D Physics results in Obi MissingReferenceException:
Posted by: this_guy - 17-10-2025, 03:44 PM - Forum: General - Replies (1)

The Problem

After upgrading to Obi Cloth 7.1, my project suddenly produced the error

"MissingReferenceException: The object of type 'ObiRigidbody2D' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object."

This error was happening everywhere and on every frame!


The Solution

My project mixes 2D and 3D physics on purpose. The cause of the error was this snippet of gameobject hierarchy

> Rigidbody 2D
  > Box Collider 2D
  ...
  > Box Collider (i.e. a 3D collider)
    Obi Collider (i.e. the 3D version of ObiCollider

Notice the 2D Unity Rigidbody mixed with the 3D Unity Box Collider and 3D Obi Collider. 

The fix is to insert a 3D Unity Rigidbody below the 2D Unity Rigidbody like

> Rigidbody 2D
  > Box Collider 2D
  ...

  > Rigidbody (i.e. Unity's 3D Rigidbody component) 
    Box Collider (i.e. a 3D collider)
    Obi Collider (i.e. the 3D version of ObiCollider

I also marked the (3D) Rigidbody as "Is Kinematic" so that the 2D Box Collider and the 3D Box Collider would behave as if they are part of the same Rigidbody (which is the behavior I'm looking for).


Explanation

In the editor, Obi thought that everything was fine with the original hierarchy. ObiCollider was happy because there was a 3D Unity Collider on the same gameobject that the ObiCollider was attached to. And at runtime, just as the online documentation says, Obi "look[ed] for the first Rigidbody component up its hierarchy and attach[ed] an ObiRigidbody component to it." Since the first Rigidbody component Obi encountered was the Rigidbody2D, Obi added an ObiRigidbody2D component to the hierarchy like this

> Rigidbody 2D 
  Obi Rigidbody 2D

  > Box Collider2D
  ...
  > Box Collider (i.e. a 3D collider)
    Obi Collider (i.e. the 3D version of ObiCollider



But then Obi threw the above MissingReferenceException. 

I traced the Obi code a bit. The error is thrown from ObiRigidbody2D.CacheVelocities() where it turns out that this is null!! I didn't know that was possible Sonrisa . I think it has something to do with parallelization. One thread deleted the ObiRigidbody2D (I'm not exactly sure where in the code the deletion happens), but there was still a reference to the obiRigidbody2D in memory that is able to be called??

At any rate, by removing more and more of the gameobjects in my scene I eventually whittled the object hierarchy down to the above original tree and noticed the mixing of 2D and 3D components and then remembered that it was an ObiRigidbody2D that was being deleted and throwing the error. On a whim, I modified the hierarchy to be:

> Rigidbody 2D
  > Box Collider 2D
  ...

  > Rigidbody (i.e. Unity's 3D Rigidbody component) 
    Box Collider (i.e. a 3D collider)
    Obi Collider (i.e. the 3D version of ObiCollider

At runtime, Obi now adds an ObiRigidbody(2D) to both the upper and the lower gameobject. But I guess that's just what is supposed to happen(?)

> Rigidbody2D
  ObiRigidBody2D
  > Box Collider 2D
  ...

  > Rigidbody (i.e. Unity's 3D Rigidbody component) 
    ObiRigidbody (i.e. the 3D version of ObiRigidbody)
    Box Collider (i.e. a 3D collider)
    Obi Collider (i.e. the 3D version of ObiCollider

But most importantly... All the errors go away!

Print this item

  Built in renderer: fluid texture missing
Posted by: AnupamSingh - 10-10-2025, 09:42 AM - Forum: Obi Fluid - Replies (2)

Hi, I am using Obi Fluid 7.1 in built in pipeline. The textures come fine in scene view but not in game view. Obi Fluid Built In Renderer Feature' component is added to camera. How can i fixed this? Thanks!

Print this item

  How to get collision impulse properly
Posted by: Qriva0 - 09-10-2025, 01:34 PM - Forum: General - Replies (3)

I read collision normal impulse, it's said that unit is newtons x time x time, however I am unable to get timestep independent force.
I tried to divide that force by substep time squared or timestep squared, but the value I get is not similar - I would expect to get very similar force whatever the substep count is 4 or 8.
The goal is to detect if I push against something with force greater than X.

Also is tangent impulse never set? Or it's set only for particles or mesh colliders (I use SDF)?

Print this item

  SDF interpolation
Posted by: Qriva0 - 07-10-2025, 01:09 PM - Forum: General - Replies (7)

Hi, I wonder what would be a good way to modify distance field during runtime.
In my case there are several distance fields, we can treat them as animation keyframes to make this example simple -I want to interpolate between them over time and use it for collision.
The problem with ASDF is those trees have got different number of nodes and it's not trivial to generate new interpolated SDF. What would be good way to tackle this problem?

The best way would be to generate SDF for every update and just swap current nodes in distance field (note I use burst backend), I guess another option is to just sample both an interpolate result, but I would need to modify obi sagnificantly.

Furthermore main question is if such a collision is going to work properly when it comes to simulations itself, I did test with hard swapping colliders and without interpolation it jumps, because of depenetration, so I am not even sure if this would work for normal timesteps (50-60).

Print this item

  Constrain two rods into each other
Posted by: Qriva0 - 26-09-2025, 04:12 PM - Forum: Obi Rope - Replies (3)

I would like to constrain rod by another one and align them to each other.
The way how I want this to work could be compared to putting one rod into another one, like into pipe.

   

I managed to write some script that maps particles from first rod to target position on another second rod (based on displacement), but this method fails to create stable alignment.
That script uses end of simulation to run constraint for both rods on each other. Position is casted and delta is based on nearest particle weights, but I guess because I don't mix orientations it fails to keep shape properly or it's caused by the fact it runs after simulation, but I hope I am wrong. Current result is some kind of broke, because outside of constraint particles "break" into their prefered direction, it's more like teleportation of common part, than physical constraint.

   

My question is - what things I need to take into account to make it work (even if not perfect), and is it actually possible at all without modification of Obi itself?
I also tried to pin particles of inner rod by setting invMass to 0, it kind of works better, but the problem is that it's one sided and first rod does not influence second one.
I wish there was way to kind of "blend" shapes of both rods into each other and make forces to work properly.

Print this item

  Stitcher breaks simulation
Posted by: Qriva0 - 19-09-2025, 11:47 AM - Forum: General - Replies (3)

Enabling or disabling ObiStitcher does not work properly, because simulation is running, error is logged to console.
However deactivation of gameobject with stitcher actually breaks solver in some way and simulation does not work anymore - unity must be restarted.



Attached Files Thumbnail(s)
   
Print this item

  Error building Player: Shader error in 'FluidFoamCollisions'
Posted by: chenji - 18-09-2025, 05:51 PM - Forum: Obi Rope - Replies (2)

I'm not sure how to reproduce in a demo project but my main project now often get this error when I "build and run" (target platform is Android, Obi Rope 7.1):

Error building Player: Shader error in 'FluidFoamCollisions': Buffer count exceeding hard limit. No known hw supports this shader. Consider combining separate buffers into one containing struct elements. at kernel SolveDiffuseContacts (on gles3)


Is there a way to eliminate this problem? I'm only using Obi Rope and this component looks is not related to Obi Rope so maybe I can just do some delete work to work around?

Print this item

  Stretching verts uniformly
Posted by: Aroosh - 13-09-2025, 05:32 AM - Forum: Obi Softbody - Replies (3)

Hello

I have a softbody that looks like a block of iron which has about the same number of particles and vertices.
I noticed that when I stretch either of the sides the vertices do not stretch uniformly.
Can you point me in the right direction as to what parameters I should tweak in order to make this stretching uniform?

Thanks
Aroosh

Print this item

  Burst error causing crash on ROG Ally
Posted by: goldfire - 09-09-2025, 09:16 PM - Forum: Obi Rope - Replies (1)

We've got a reviewer playing our game right now and they're having an issue where the game freezes/crashes as soon as they get to a spot where there's a particular rope that loads in. We got this stack trace, but since it only happens on their machine and nobody else has had this problem I'm not sure what to do about it. I haven't delved into collections/burst too much, so this stack trace doesn't tell me much, but maybe you have some better idea what might be happening?

System.NullReferenceException: Object reference not set to an instance of an object.
  at Unity.Collections.LowLevel.Unsafe.UnsafeParallelHashMapData.GetCount() in il2cpp-codegen-il2cpp.h:line 303
  at Unity.Collections.LowLevel.Unsafe.UnsafeParallelHashMapData.GetCount() in UnsafeParallelHashMap.cs:line 271
  at Unity.Collections.LowLevel.Unsafe.UnsafeParallelHashMap`2.GetKeyArray() in UnsafeParallelHashMap.cs:line 1319
  at Unity.Collections.NativeParallelHashMap`2.GetKeyArray() in Generics__171.cpp:line 4735
  at Unity.Collections.NativeParallelHashMap`2.GetKeyArray() in NativeParallelHashMap.cs:line 346
  at Obi.BurstColliderWorld.GenerateContacts() in Obi.cpp:line 3796
  at Obi.BurstColliderWorld.GenerateContacts() in BurstColliderWorld.cs:line 596
  at Obi.BurstSolverImpl.GenerateContacts() in BurstSolverImpl.cs:line 585
  at Obi.BurstSolverImpl.CollisionDetection() in BurstSolverImpl.cs:line 529
  at Obi.ObiSolver.StartSimulation() in ObiSolver.cs:line 1768
  at Obi.ObiSolver.FixedUpdate() in ObiSolver.cs:line 1184


Edit: I had thought it was their specific device, but we now have 3 different devices all sending the same error/stack trace. We haven't been able to get it to happen on our end, so not sure what triggers it still.

Print this item

  Controlling speed of emitter particles
Posted by: Aroosh - 06-09-2025, 12:41 AM - Forum: Obi Fluid - Replies (1)

Hello

I am using Disk with ObiEmitter to emit particles and I see that speed and amount of particles spawned are correlated in Stream mode. 
Is there any easy way to change velocity of emitted particles and amount of emitted particles separately such that we can get slow moving fluid stream that is still contiguous and not a sequence of drops?

Thanks
Aroosh

Print this item