Search Forums

(Advanced Search)

Latest Threads
Obi Softbody IndexOutOfRa...
Forum: Obi Softbody
Last Post: Aroosh
11-05-2025, 11:37 AM
» Replies: 2
» Views: 95
Rope pinned to two dynami...
Forum: Obi Rope
Last Post: Crimson1462
09-05-2025, 07:51 PM
» Replies: 2
» Views: 160
Unity 6 Console Spam abou...
Forum: Obi Fluid
Last Post: josemendez
09-05-2025, 08:03 AM
» Replies: 3
» Views: 1,121
the Obi cloth has some co...
Forum: Obi Cloth
Last Post: josemendez
09-05-2025, 08:00 AM
» Replies: 2
» Views: 91
Hard crash in build after...
Forum: Obi Rope
Last Post: goldfire
04-05-2025, 10:10 PM
» Replies: 2
» Views: 231
Particle collision with s...
Forum: Obi Softbody
Last Post: Duncano
03-05-2025, 02:07 PM
» Replies: 2
» Views: 254
Memory leak warning with ...
Forum: Obi Fluid
Last Post: Softscale
02-05-2025, 04:36 PM
» Replies: 3
» Views: 285
Rope cursor with attachme...
Forum: Obi Rope
Last Post: josemendez
01-05-2025, 07:19 PM
» Replies: 1
» Views: 197
Issue Saving/Loading Part...
Forum: Obi Rope
Last Post: josemendez
30-04-2025, 01:20 PM
» Replies: 10
» Views: 878
Rope extension, vibration...
Forum: Obi Rope
Last Post: josemendez
29-04-2025, 04:09 PM
» Replies: 26
» Views: 2,179

 
  Initializing Obi Cloth at runtime?
Posted by: aelbannan - 28-01-2019, 10:13 PM - Forum: Obi Cloth - Replies (1)

Hi,

Any way to initialize Obi Cloth at runtime via script? I am creating a mesh topology dynamically and want to initialize it at runtime.

Thanks.

Print this item

  ObiRope 2D + threaded rings
Posted by: oraspec - 28-01-2019, 07:47 PM - Forum: Obi Rope - Replies (1)

Hi guys,

I am looking for a solution to have 2D thread with rings on it. Rings should not be attached to specific particle. It should move on a thread back and forth influenced by real physics/gravity. Can you advise whether it is possible to realize it with ObiRope for 2D without programming the threaded rings physics?

Thanks in advance.

Print this item

  Instantiate Rope during Runtime
Posted by: crychair - 28-01-2019, 05:02 PM - Forum: Obi Rope - Replies (3)

Code:
    public void makeRope(Vector3 pos1, Vector3 pos2, GameObject obj1, GameObject obj2) {
        
        
        GameObject rope = Instantiate(obiRopePrefab);
        BetterRopeHelper helper = rope.GetComponent<BetterRopeHelper>();
        helper.SetPoints(pos1, pos2);
        helper.GenerateRope(obj1, obj2);

    }
Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;

[RequireComponent(typeof(ObiRope))]
[RequireComponent(typeof(ObiCatmullRomCurve))]
public class BetterRopeHelper : MonoBehaviour
{


   public ObiSolver solver;
   public ObiRopeSection section;
   public Material material;
   private ObiActor actor;
   private ObiRope rope;
   private ObiCatmullRomCurve path;

   private Vector3 start, end;

   public void SetPoints(Vector3 startpoint, Vector3 endpoint)
   {
       // Get all needed components and interconnect them:
       rope = GetComponent<ObiRope>();
       path = GetComponent<ObiCatmullRomCurve>();
       rope.Solver = solver;
       rope.ropePath = path;
       rope.section = section;
       GetComponent<MeshRenderer>().material = material;

       // Calculate rope start/end and direction in local space:
       start = startpoint;
       end = endpoint;
       Vector3 localStart = startpoint;
       Vector3 localEnd = endpoint;
       Vector3 direction = (localEnd - localStart).normalized;

       // Generate rope path:
       path.controlPoints.Clear();
       path.controlPoints.Add(localStart - direction);
       path.controlPoints.Add(localStart);
       path.controlPoints.Add(localEnd);
       path.controlPoints.Add(localEnd + direction);
   }

   public void GenerateRope(GameObject obj1, GameObject obj2)
   {
       // Setup the simulation:
       StartCoroutine(Setup(obj1, obj2));
   }

   IEnumerator Setup(GameObject obj1, GameObject obj2)
   {

       // Generate particles and add them to solver:
       yield return StartCoroutine(rope.GeneratePhysicRepresentationForMesh());
       rope.AddToSolver(null);

       // Fix first and last particle in place:
       //rope.invMasses[0] = 0;
       //rope.invMasses[rope.UsedParticles - 1] = 0;
       //Oni.SetParticleInverseMasses(solver.OniSolver, new float[] { 0 }, 1, rope.particleIndices[0]);
       //Oni.SetParticleInverseMasses(solver.OniSolver, new float[] { 0 }, 1, rope.particleIndices[rope.UsedParticles - 1]);
       //rope.PushDataToSolver(ParticleData.INV_MASSES);


       //batchConstraints = pinConstraints.GetBatches() as ObiPinConstraintBatch;
       //pinConstraints.RemoveFromSolver(null);
       //Debug.Log(obj1.name);
       //batchConstraints.AddConstraint(0, obj1.GetComponent<ObiCollider>(), Vector3.zero, 0f);
       //batchConstraints.AddConstraint(rope.UsedParticles - 1, obj2.GetComponent<ObiCollider>(), Vector3.zero, 0f);
       //pinConstraints.AddToSolver(null);
       //pinConstraints.PushDataToSolver();
       rope.PinConstraints.RemoveFromSolver(null);
       ObiPinConstraintBatch batch = (ObiPinConstraintBatch)rope.PinConstraints.GetFirstBatch();
       Vector3 offset1 = obj1.transform.InverseTransformPoint(start);
       Vector3 offset2 = obj1.transform.InverseTransformPoint(start);
       batch.AddConstraint(0, obj1.GetComponent<ObiCollider>(), offset1, 1f);
       batch.AddConstraint(rope.UsedParticles - 1, obj2.GetComponent<ObiCollider>(), offset2, 1f);
       rope.PinConstraints.AddToSolver(null);


       //actor.enabled = true;
   }
}


I have the method and helper above and it works. My issue is that I want the rope to be taught on instantiation rather than modifying it after. Is there some way to do this. currently when the rope is generated it become slack and weighs itself down. 

Any help is appreciated.

Print this item

  Trial version?
Posted by: JonesW - 28-01-2019, 04:33 PM - Forum: General - No Replies

Hi,

I'm intrigued by the assets you have created and I would like to try them out before buying.
Is there any possibility for a trial or a demo version to try out on my own?

Cheers!

Print this item

  Can you show me a boob & butt physics?
Posted by: akuei2 - 28-01-2019, 10:31 AM - Forum: Obi Softbody - Replies (2)

Hi, I'm doing a practice at whole morning ... but, I still no idea how to achieve boob & butt physics with this plugin.

Can you show me some tutorial with video style ?

Print this item

  Problem of FinalIK and 4.0 ObiAnimatorController
Posted by: yasuchiki - 28-01-2019, 02:27 AM - Forum: Obi Cloth - Replies (2)

Hello! I am using ObiCloth for normal recalculation after character bone deformation. There was no problem with the combination with FinalIK and ObiCloth so far. I think that ObiAnimatorController which can automatically do to the root of the character is absorbing the delay problem.
 
However, in the latest version 4.0, when using FinalIK, the mesh applying ObiCloth is deformed, but the mesh not using other Obi got encountered a problem that bone deformation is not done.
This phenomenon can be solved by disabling FinalIK, even if you disable ObiAnimatorController, it will be resolved.
However, in that case, we will use Unity's Animator and one frame delay will occur with the mesh applying ObiCloth and the other skinning parts.
 
There was no problem until ObiCloth 3.5, ObiAnimatorController was valid and delayed without using FinalIK.
The execution order of scripts using 3.5 and 4.0, the solver, and the update settings of Animator are the same. I tried various things, but it did not solve it.
 
I think that there is something wrong with ObiAnimatorController in this 4.0. Can you solve this problem?
As far as I'd like to use it back to 3.5,
I also want to use the 4.0 Fluid and Softbody, so I'd like to ask for a solution as soon as possible.
 
Or, will you release a new component (new asset) only with the normal recalculation function of the mesh that transforms the bone? I think that it is a very pleasing feature for users who were dissatisfied with bone deformation in Unity so far.

Print this item

  [Solved] Oni.WaitForAllTasks - Slow performance.
Posted by: Tesrym - 27-01-2019, 02:04 PM - Forum: Obi Softbody - Replies (6)

Using Unity 2018.3.3f1 + HD Render Pipeline
Softbody 4

I have low performance on most scenes.
Deep profiler image attached highlighting Oni.WaitForAllTasks.
No errors or warnings, except for Plastic Sheet scene.*

Affected scenes:
Deformable Barrels
Elastic Character
*Plastic Sheet (The wall in this scene is missing a mesh, causing NullReferenceException for ObiSoftBody.CreateBones)
Rubber Dragon
---
Ball Pool is OK

This is a clean new project.



In 2018.2.20f1, the profiler has a different look.
No HD Render Pipeline in this project.
Clean project to test the asset.

Print this item

  Changing values procedurally via code
Posted by: Lozmosis - 27-01-2019, 09:58 AM - Forum: Obi Cloth - Replies (1)

Hello devs,

Noob here,

I'm trying to set up some nice egg/yolk physics.

One of the things I'm trying to do is to have the soft body yolk inflate from the cracked egg like a balloon.

The way I've found that would work is to lerp the values:
- ObiVolumeConstraints.overpressure from 0 to 70
- ObiDistanceConstraints.stretchingScale from 0 to 4

I've tried setting this up through a co-routine, or using animations to do so but neither seem to work.

The values do change in the inspector, however it doesn't seem to affect the mesh.

When I modify these values real-time in the editor while running, the mesh responds fine (sliding the values up and down will inflate/deflate the yolk).

Any tips?

Much appreciated!
Thank you <3

Print this item

  Cutting cluster nodes is possible?
Posted by: Snail921 - 26-01-2019, 07:49 AM - Forum: Obi Softbody - Replies (2)

Hi,
In my use case, I need to cut some of cluster nodes which is automatically created for softbodies.
For example in the image, I would like to cut the nodes in the green circled area.
[attachment=229]
How can I make this happen?

Print this item

  Importing Obi Softbody to a project
Posted by: Snail921 - 26-01-2019, 02:44 AM - Forum: Obi Softbody - Replies (3)

Having small issue about importing Obi Softbody asset to a new blank project.
When I import it from asset store, I receive 44 errors. Please see the attachment for the captured log.
[attachment=228]
This can be solved by adding other Obi asset like Obi Cloth.
I checked with Unity 2018.2.19f1 and 2018.3.0f2 and the results are the same in both version.
What is wrong?

Print this item