Search Forums

(Advanced Search)

Latest Threads
can you remove particles ...
Forum: Obi Softbody
Last Post: aardworm
09-07-2025, 07:09 AM
» Replies: 0
» Views: 98
ObiRope Mesh Renderer
Forum: Obi Rope
Last Post: quent_1982
08-07-2025, 11:27 AM
» Replies: 4
» Views: 359
How to dynamically change...
Forum: Obi Rope
Last Post: quent_1982
08-07-2025, 06:34 AM
» Replies: 6
» Views: 505
Pipeline that bends
Forum: Obi Softbody
Last Post: josemendez
04-07-2025, 09:52 AM
» Replies: 13
» Views: 1,209
How to implement/sync Obi...
Forum: Obi Rope
Last Post: quent_1982
01-07-2025, 01:48 PM
» Replies: 2
» Views: 334
Collisions don't work con...
Forum: Obi Rope
Last Post: chenji
27-06-2025, 03:05 AM
» Replies: 3
» Views: 415
Force Zone apply differen...
Forum: Obi Rope
Last Post: chenji
26-06-2025, 11:41 AM
» Replies: 11
» Views: 1,151
Can I blend in and out of...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 04:42 PM
» Replies: 3
» Views: 400
Using a rigidbody/collide...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 09:29 AM
» Replies: 1
» Views: 236
Solver is too performance...
Forum: Obi Rope
Last Post: quent_1982
20-06-2025, 08:09 AM
» Replies: 40
» Views: 5,389

 
Pregunta Rope pinned to two dynamic attachments has a gap when physics act upon it
Posted by: Crimson1462 - 05-05-2025, 07:34 PM - Forum: Obi Rope - Replies (2)

Hi! I'm new to Obi Rope and just wanted to say—it's a fantastic asset. I really appreciate the craftsmanship behind it.

I think I'm running into a user error and could use some help troubleshooting. I’ve attached three images below, in addition, here is a link to a video of the problem.

Each of the plugs in my setup are Obi Rigidbodies connected to the rope using dynamic attachments. I believe I’ve set up the constraints correctly for my use case, and I’ve experimented with different iteration and substep values.

I’ve also tested different mass settings—for example, setting the rope and rigidbodies both to 0.1, or the rope at 0.1 and the rigidbodies at 1.0, and vice versa—but the issue still occurs.

Here’s what I’m hoping to figure out:

  1. Is there a way to prevent these gaps from forming when the rope is pulled forcefully?
  2. If the gaps are unavoidable due to physics constraints, is there a way to reset the rope when it’s stretched beyond a certain threshold?
Ultimately, I’m trying to simulate a stiff, non-stretchable wire. Ideally, users shouldn’t be able to stretch it at all or see any slack.

Thanks so much in advance!



Attached Files Thumbnail(s)
           
Print this item

  Hard crash in build after upgrading from Obi 6 to Obi 7
Posted by: goldfire - 02-05-2025, 07:31 PM - Forum: Obi Rope - Replies (2)

I'm not really sure where to even start debugging this as there's no issue in the editor (or the editor just handles it less strictly, but no error that I've seen). It doesn't happen 100% of the time either, but sometimes when testing a build as soon as the scene with the obi rope loads the whole application crashes with this stack trace:

SIGTRAP

Obi.BurstColliderWorld:UpdateWorld(Single)
Obi.ObiColliderWorld:UpdateWorld(Single)

[ line 1794985864]
> Size overflow in allocator.

It's not from one specific rope either, it happens seemingly randomly with any rope implementation anywhere in the game. This only started happening after upgrading from Obi 6 to Obi 7.0.5. I followed the upgrade guide with re-generating the blueprints, etc. We're using the Burst back-end for the ropes as we need collisions on the ropes and I couldn't figure out if there was a way to make that work with the GPU-based backend, so I haven't tested the GPU one in a build.

Any idea what could be causing this or how I could debug further?

Unity Version: 2022.3.57 (built-in renderer)

Print this item

  Particle collision with soft body
Posted by: Duncano - 02-05-2025, 10:49 AM - Forum: Obi Softbody - Replies (2)

Is there a way to enable interactions with a unity particle system and Obi Soft body?...i suspect not

I seem to suspect it shoudl be possible with an OBI partilce system....but i cant seem to find out how to create an Obi Particle emitter... ( i have Obi soft body and Cloth)

essentially i want to simulate a  ( bio science) cell being targetted by a swarm of rigid body spheres.


any advice much appreciated

thanks,
DUncan

Print this item

  Memory leak warning with GPU compute solver
Posted by: Softscale - 02-05-2025, 02:25 AM - Forum: Obi Fluid - Replies (4)

(Unity 2022.3.61f1, Obi 7.0.5, Windows 10)



Hey there, I've recently been updating my project from Obi 6 to 7, and also switching to use the GPU compute solver. I noticed in the editor after some testing and re-starting play mode, it would pop up 12 warnings with this:

Code:
GarbageCollector disposing of GraphicsBuffer. Please use GraphicsBuffer.Release() or .Dispose() to manually release the buffer.


This wasn't a major issue, however I also started to get crashes on the built version of my game when exiting, with the stack trace in the Player.log ending with:

Code:
ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFC2836FDFB)
0x00007FFC2836FDFB (UnityPlayer) (function-name not available)
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFC27DB3BAE)
0x00007FFC27DB3BAE (UnityPlayer) (function-name not available)
0x00000293A7D6D9DA (Mono JIT Code) (wrapper managed-to-native) UnityEngine.GraphicsBuffer:DestroyBuffer (UnityEngine.GraphicsBuffer)
0x00000293A7D6D8B3 (Mono JIT Code) UnityEngine.GraphicsBuffer:Dispose (bool)
0x00000293A7D6D823 (Mono JIT Code) UnityEngine.GraphicsBuffer:Dispose ()
0x00000293A6AE4D53 (Mono JIT Code) Obi.ObiNativeList`1<Obi.TriangleMeshHeader>:DisposeOfComputeBuffer ()
0x0000029665B30A63 (Mono JIT Code) Obi.ObiNativeList`1<Obi.TriangleMeshHeader>:Dispose (bool)
0x0000029665B309AB (Mono JIT Code) Obi.ObiNativeList`1<Obi.TriangleMeshHeader>:Finalize ()
0x000002937187A18C (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr)
0x00007FFC2B156F77 (mono-2.0-bdwgc) mono_callspec_cleanup
0x00007FFC2B158118 (mono-2.0-bdwgc) mono_gc_finalize_notify
0x00007FFC2B158680 (mono-2.0-bdwgc) mono_gc_finalize_notify
0x00007FFC2B0EF9AB (mono-2.0-bdwgc) mono_profiler_init_etw
0x00007FFC2B0EFBBE (mono-2.0-bdwgc) mono_profiler_init_etw
0x00007FFD51F47374 (KERNEL32) BaseThreadInitThunk
0x00007FFD521BCC91 (ntdll) RtlUserThreadStart


Doing a build with the Development Build flag did not crash on exit but also threw those GarbageCollector warnings.



After some tracing, all of the warnings were coming from ComputeColliderWorld.cs. I added Dispose()s for each of the buffers that were causing problems to the OnDestroy:


Code:
transformsBuffer?.Dispose();
aabbsBuffer?.Dispose();
materialsBuffer?.Dispose();
shapesBuffer?.Dispose();
forceZonesBuffer?.Dispose();
rigidbodiesBuffer?.Dispose();
distanceFieldHeaders?.Dispose();
bihNodes?.Dispose();
triangleMeshHeaders?.Dispose();
dfNodes?.Dispose();
triangles?.Dispose();
vertices?.Dispose();

This fixed the warnings popping up in editor, and the game no longer crashes on exit in the built version. There may be other buffers that also need to be disposed in this component but these were the ones that were causing issues for my game. Just wanted to let you know about this problem.

Print this item

Pregunta Rope cursor with attachments
Posted by: Balou - 01-05-2025, 03:09 PM - Forum: Obi Rope - Replies (1)

Hi,
Using Obi 6.3. 
Here is my setup:
3--2-----1

1,2,3 are attachment on the rope.
I'm trying to extend or rewind the rope at these two position
3--2>-----<1 where > < can be < > (cursor direction), meaning rope can extend from the two points or rewind from the two.
It works fine with the one next to 1 (the start of the rope, cursor is at 0, source at .5
But if I try to place the cursor next to the 2, something like cursor at .3 and source still at .5 it behave differently, no particle are added to the rope at this position.

Is there something I should know about cursor and attachments?
Edit: IF I understand correctly one of the issue is, when the cursor is at .75 and the rope is getting bigger, the cursor move, so I need to find a way to dynamically set it to one particle...
Thanks a lot,

Print this item

Triste Issue Saving/Loading Particle Positions in play mode using ObiRope v7.0
Posted by: ozeecode - 28-04-2025, 12:31 PM - Forum: Obi Rope - Replies (10)

Hello,
I managed to save and reload particle positions in ObiRope v6.x using code under the Copy ropes in play mode thread. However, this no longer works in ObiRope v7.x. Could you help me identify what I might be missing?

Here’s my current code:


Code:
public void Load(Vector3[] particlePositions, Vector3 lastParticlePosition)
{
    int particleCount = particlePositions.Length;
    while (rope.activeParticleCount > particleCount)
    {
        rope.elements.RemoveAt(rope.elements.Count - 1);
        rope.DeactivateParticle(rope.activeParticleCount - 1);
    }

    while (rope.activeParticleCount < particleCount)
    {
        rope.elements.Add(new ObiStructuralElement
        {
            particle1 = rope.elements[^1].particle1,
            //maybe this should be so:
            //particle2 = rope.elements[^1].particle2,
            particle2 = rope.solverIndices[rope.activeParticleCount],
            restLength = rope.interParticleDistance
        });
        rope.CopyParticle(rope.activeParticleCount - 1, rope.activeParticleCount);
        rope.ActivateParticle(); // This doesn't have an actorIndex anymore.
    }


    for (int j = 0; j < rope.elements.Count; ++j)
    {
        int firstParticle = rope.elements[j].particle1;
        rope.solver.positions[firstParticle] = particlePositions[j];
        rope.solver.velocities[firstParticle] = Vector4.zero;
        rope.solver.angularVelocities[firstParticle] = Vector4.zero;
    }

    int lastParticle = rope.elements[^1].particle2;
    rope.solver.positions[lastParticle] = lastParticlePosition;
    rope.solver.velocities[lastParticle] = Vector4.zero;
    rope.solver.angularVelocities[lastParticle] = Vector4.zero;
    rope.RebuildConstraintsFromElements();
}

The save sections look like this:
Code:
int positionCount = rope.elements.Count;
Vector3[] particlePositions = new Vector3[positionCount];
for (int j = 0; j < positionCount; ++j)
{
    particlePositions[j] = rope.solver.positions[rope.elements[j].particle1];
}

Vector3 lastParticlePosition = rope.solver.positions[rope.elements[positionCount - 1].particle2];



Thanks!

Print this item

  Attachments Not Working - Disable/Renable?
Posted by: scoull - 27-04-2025, 09:44 PM - Forum: General - Replies (2)

Hi All, thanks in advance for taking a look.

I am working with attachments for the first time using Obi Fluid. I am able to create the attachment with a proper target and particle group, but when adding particles to the particle group, nothing happens.

Additionally, if I try to disable/reenable the attachment at runtime (which I don't even think is necessary if I'm just adding/removing particles), then unity crashes and gives the GPU error "Failed to present D3D11 swapchain due to device reset/removed". I am using compute backend.


Code:
    void Solver_OnCollision (ObiSolver solver, ObiNativeContactList contacts){
        for(int i = 0;  i < contacts.count ; ++i)
        {
            //Get properies of the particle in the contact
            int particleIndex = solver.simplices[contacts[i].bodyA];
            ObiSolver.ParticleInActor pa = solver.particleToActor[particleIndex];
            ObiParticleAttachment attachment = pa.actor.gameObject.GetComponent<ObiParticleAttachment>();
            ObiParticleGroup group = attachment.particleGroup;

            //Changing the collision index of the particle so that it won't collide anymore
            //In preparation for attaching to object
            solver.filters[particleIndex]=ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, (1 << 1));

            //Add particle to attachment group between emitter and object
            if(!group.ContainsParticle(pa.indexInActor)){
                group.particleIndices.Add(pa.indexInActor);
                attachment.particleGroup=group;
                Debug.Log("Attachments count " + attachment.particleGroup.Count);
            }
        }
    }

Print this item

  Aerodynamics for non cloth
Posted by: Jawsarn - 24-04-2025, 08:41 PM - Forum: General - Replies (10)

Do I understand correctly from documentation that only cloth has simulation of aerodynamics from particle velocity?
Is there a way to enable this, or do I need to do this by code or apply fake "wind" each tick? E.g. apply aerodynamics on bones for ears when moving a character.

Print this item

  Obi Bone FixedRoot As Parent
Posted by: Jawsarn - 23-04-2025, 11:03 PM - Forum: Obi Rope - Replies (8)

Is it possible to have the root bone be part of the chain as if there was a parent transform with same position and rotation with "Fix Root" enabled?

I feel this should be a opt in to have the root bone be driven by animation or fully simualted. It is not great for workflow to have to modify existing rigs to enable this behaviour.

Print this item

  Obi 7 Questions
Posted by: MEPETAMINALS - 20-04-2025, 06:56 PM - Forum: Obi Cloth - Replies (5)

Hi, I've been heavily using Obi (cloth and rope) for several years now in the development of Following Seas. I'm quite happy with it overall, with really the biggest issue coming down to performance. Typically about 30-50% of total profiler load goes into the system -- which has been acceptable, but definitely reduces the number of runnable systems for users.

I've been looking into Obi 7, as performance seems to be a major focus, and have also split into a separate project branch to test it out -- but have a couple questions if you don't mind.

I'm struggling with the removal of Proxies -- are there any plans for a similar system, or revisions to the decimation? I like the automatic decimation, but I find that there isn't near the control that was available with proxies. For example, my cloth meshes rely on specific groups for attachment points, like the rays of a battened sail, or the corners where ropes would attach. Decimation on my more detailed meshes often causes these points to be far off from where they should be, or causes topology lines to become very wobbly due to merging inconsistently up and down when parallel lines of vertices are present. It would be nice to exclude vertex groups from decimation, or have a method of ensuring the shape of the mesh isn't overly affected.

I didn't see any method for controlling this, do you have any suggestions?

Secondly, it seems that ambient force zones have been removed -- is it preferred to have a wind force zone follow affected objects around, or to set wind directly through the solver?

I've attached a beautifully rendered version of my struggle with blueprints. The left indicates the result gained via the Obi 6 method, with the red dots representing vertices on the simplified mesh. The central black line is a group used for particle attachment, and the red corner is a point were a rope would attach.

On the right is a somewhat dramatized example of what I'm encountering through decimation.

   

Print this item