Search Forums

(Advanced Search)

Latest Threads
Broken scripts with updat...
Forum: Obi Rope
Last Post: hariedo
Yesterday, 10:35 AM
» Replies: 0
» Views: 34
Garment explodes on Andro...
Forum: Obi Cloth
Last Post: CptnFabulous
19-12-2024, 07:16 AM
» Replies: 4
» Views: 661
Calculating and Reproduci...
Forum: Obi Fluid
Last Post: ZacharyP
18-12-2024, 05:49 PM
» Replies: 2
» Views: 759
Null Reference, actor not...
Forum: Obi Rope
Last Post: josemendez
13-12-2024, 12:39 PM
» Replies: 1
» Views: 151
Issue with Grasping ObiRo...
Forum: Obi Rope
Last Post: josemendez
12-12-2024, 12:00 PM
» Replies: 5
» Views: 437
Changing extruded rendere...
Forum: Obi Rope
Last Post: aderae
10-12-2024, 07:35 PM
» Replies: 2
» Views: 231
Baking a rope is causing ...
Forum: Obi Rope
Last Post: josemendez
10-12-2024, 11:06 AM
» Replies: 6
» Views: 633
Barrier belt - changing l...
Forum: Obi Rope
Last Post: josemendez
10-12-2024, 10:42 AM
» Replies: 1
» Views: 207
Path editor gizmo's appea...
Forum: Obi Rope
Last Post: josemendez
10-12-2024, 09:50 AM
» Replies: 1
» Views: 206
Problems when using multi...
Forum: Obi Cloth
Last Post: Cat3Man
09-12-2024, 03:17 AM
» Replies: 2
» Views: 279

 
  Dynamic Attachment Often Displaced
Posted by: vrtraining - 07-08-2024, 04:17 AM - Forum: Obi Rope - Replies (5)

Hi,

Its my 3rd post but I'm having some troubles since the upgrade so I'll be really glad if anyone can help me out.
My dynamic rope attachment since the upgrade often gets displaced from actual position 8 out of 10 times. Like a little offset above and then it sticks to it for the rest of the scene. At start the hook with all four chains is like below in image. All four corner hinge hooks have rigidbody and they are attached with chain (obi rope). As the hooks fall down due to gravity at start the chains also fall.

[Image: S.png]

The next image is expected behaviour that usually happens 80% of the time.

[Image: 1.jpg]

But problem is some times it is displaced a little as it falls down (I tried holding it still for 1 second before turning on its gravity so that it can bind itself as correct position but it didnt worked). Next image shows the problem.

[Image: image.jpg]

Now it uses the wrong position as attachment and as I lift the hook the chains are not attached to hooks anymore, But a little higher.

Print this item

  Resetting Rope causing Error
Posted by: vrtraining - 06-08-2024, 06:33 PM - Forum: Obi Rope - Replies (10)

Hi,

This is my old code that I got from this forum to reset the rope back to its original state.

Code:
float initialLength = 0.88f
ObiRopeCursor ropeCursor;
ObiRope rope;

public void ResetRope()
    {
        rope.RemoveFromSolver();
        rope.ClearState();
        rope.AddToSolver();
        ropeCursor.ChangeLength(initialLength);
    }


Now since the new update has changed the ChangeLength() method my new code becomes.

Code:
public void ResetRope()
    {
        rope.RemoveFromSolver();
        rope.ClearState();
        rope.AddToSolver();
        ropeCursor.ChangeLength(initialLength - rope.restLength);
    }

But its causing error, rope disappears and I get

Code:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <bae5e84a08394aad9eb61062d3ccb3ca>:0)
Obi.ObiPathSmootherRenderSystem.Setup () (at Assets/Obi/Scripts/RopeAndRod/Rendering/ObiPathSmootherRenderSystem.cs:163)
Obi.ObiRenderSystemStack.Setup (System.Int32 dirtyFlags) (at Assets/Obi/Scripts/Common/Solver/ObiRenderSystemStack.cs:27)
Obi.ObiSolver.Render (System.Single unsimulatedTime) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1784)
Obi.ObiSolver.LateUpdate () (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1163)

If I remove 

Code:
rope.RemoveFromSolver();
rope.ClearState();
rope.AddToSolver();

Then error goes away but I dont get starting initial state like before

Print this item

  Strange Behaviour in Editor for V7
Posted by: vrtraining - 06-08-2024, 04:42 PM - Forum: Obi Rope - Replies (2)

Hi,

I upgraded to Version 7 and I have noticed something strange in editor, whenever I select in play mode runtime inside editor the object of Obi Rope, it instantly reflects and rope does some movement. Like for example if an object is hanging by rope its oscillates a little up an down. Similarly I have also noticed that when scene is started the same object oscillates up and down a lot more than before (I kept the parameters same like in version 6), why change in behaviour? It oscillates for about 2 seconds whereas before it was just 0.1 second.

Print this item

  New Obi Rope Chain Renderer URP version 7
Posted by: vrtraining - 06-08-2024, 08:48 AM - Forum: Obi Rope - Replies (2)

Hi,

I'm unable to get any visuals of the chain in New Obi Rope Chain Renderer in URP. Even the sample demo that came with the project only works with Built-In pipeline, it does not work in URP even I don't see any pink shader for the chain, when I upgrade its materials to URP I still don't see any chain, not even a pink error shader. Its just blank. I have tried everything including GPU Instancing. I'm on Android Platform for Quest 2. Using Unity 2023.2.19f.

Step to reproduce

Create a new URP Project (2023.2.19f)
Import OBI version 7
Open Chains Demo from OBI
(upgrade pink shaders to URP)

Print this item

  Obi7 | Fluid collision with skinned mesh
Posted by: yunayuna64 - 06-08-2024, 04:06 AM - Forum: Obi Fluid - Replies (11)

Hello.

Using Obi Softbody I could make the Obi Fluid particle to collide with a skinned mesh deformed by its bone transform.
I wonder if there is a way to implement fluid collision with such a deformed mesh without using Softbody.
Please tell me if there is a method.

Thanks.

Print this item

  Obi 7:Modify Constraints / Reset skinned cloth in runtime
Posted by: calvantsang - 05-08-2024, 09:00 PM - Forum: Obi Cloth - Replies (1)

So I have updated to Obi7,I used to modify skinned cloth constraints to 0 and set back to blueprint's data in runtime to reset cloth,
Just like the example:

var cloth = GetComponent<ObiSkinnedCloth>();

// get constraints stored in the actor:
var actorConstraints = cloth.GetConstraintsByType(Oni.ConstraintType.Skin)
as ObiConstraints<ObiSkinConstraintsBatch>;

// get runtime constraints in the solver:
var solverConstraints = cloth.solver.GetConstraintsByType(Oni.ConstraintType.Skin)
as ObiConstraints<ObiSkinConstraintsBatch>;

// there's only one skin constraint per particle,
// so particleIndex == constraintIndex,
// and there is only need for one skin constraints batch:
var actorSkinBatch = actorConstraints.batches[0];
var solverSkinBatch = solverConstraints.batches[0];

// get the offset of our first -and only- skin batch in the solver:
int offset = cloth.solverBatchOffsets[(int)Oni.ConstraintType.Skin][0];

// iterate over all active skin constraints in the batch,
// setting their properties:
for (int i = 0; i < actorSkinBatch.activeConstraintCount; ++i)
{
int index = i + offset;

// skin radius
solverSkinBatch.skinRadiiBackstop[index * 3] = 0.05f;

// backstop sphere radius
solverSkinBatch.skinRadiiBackstop[index * 3 + 1] = 0.1f;

// backstop sphere distance
solverSkinBatch.skinRadiiBackstop[index * 3 + 2] = 0;

}

So the problem is this method can only use in CPU backend,
Can anyone tell me with out this method, Is there an easy way to reset skinned cloth with GPU backend?

Print this item

  Edit Path mode not working
Posted by: steelroach - 05-08-2024, 06:17 PM - Forum: Obi Rope - Replies (4)

I'm on 2022.3.27f1. 

I added blueprint

I reset the layout

Re-import all

still no edit path. 


I got "Failed loading overlay Obi Path Editor" error message on console but forgot to take screenshot of it

Print this item

  ChangeLength in Version 7
Posted by: vrtraining - 05-08-2024, 04:50 AM - Forum: Obi Rope - Replies (1)

It says in new documentation

Quote:ObiCursor.ChangeLength() no longer takes an absolute length as parameter, but a change in length.

So my app is using ChangeLength a lot and its designed in old way where it takes the absolute value. Is there any method that still uses the old way? What if we really want to set the length to a specific absolute value instead of change in length. For example I want rope length to be 5, now with this new method I have to calculate current length and provide an offset to bring it to 5 or I can still do it with any other method?

Print this item

  How to Pause or Freeze Rope?
Posted by: vrtraining - 02-08-2024, 08:12 AM - Forum: Obi Rope - Replies (3)

Hi,

I am using obi rope version 7, I have one solver at the root and multiple ropes in hierarchy downwards. I need to freeze or pause the rope in some cases like its rendered but freezed and not moving even if its parent object is moving too. Is it possible to achieve that? Is it also possible to do it for only one rope explicitly even if one solver is controlling multiple ropes?

Also can I extract a mesh in editor and may be replace it with a rope at runtime to depict a freeze?

Print this item

  Camera, lights and export question
Posted by: troys - 01-08-2024, 03:48 PM - Forum: Obi Rope - Replies (4)

Hi, there are some things I wonder about. I use Unity 22.3.9, Obi 7 and default renderer.

1. When editing control points the camera controls become weird. If you middle click the camera jumps an odd distance and it's not possible to drag and move it like usual. Also the rotation is disabled. I have to turn off control points if I want to move the camera and it's really annoying. Is that how it's supposed to work?

2. Using chain renderer, the chain meshes only receives light from directional lights, not spot or point. I don't use directional lights so the chain is unlit. How do I make it work with spots point lights?

3. I want to export the finished chain as a FBX file, but Unitys FBX export tool does not work. Is there a way to do this?

Print this item