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: 49
ObiRope Mesh Renderer
Forum: Obi Rope
Last Post: quent_1982
08-07-2025, 11:27 AM
» Replies: 4
» Views: 214
How to dynamically change...
Forum: Obi Rope
Last Post: quent_1982
08-07-2025, 06:34 AM
» Replies: 6
» Views: 374
Pipeline that bends
Forum: Obi Softbody
Last Post: josemendez
04-07-2025, 09:52 AM
» Replies: 13
» Views: 1,095
How to implement/sync Obi...
Forum: Obi Rope
Last Post: quent_1982
01-07-2025, 01:48 PM
» Replies: 2
» Views: 274
Collisions don't work con...
Forum: Obi Rope
Last Post: chenji
27-06-2025, 03:05 AM
» Replies: 3
» Views: 368
Force Zone apply differen...
Forum: Obi Rope
Last Post: chenji
26-06-2025, 11:41 AM
» Replies: 11
» Views: 1,021
Can I blend in and out of...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 04:42 PM
» Replies: 3
» Views: 333
Using a rigidbody/collide...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 09:29 AM
» Replies: 1
» Views: 200
Solver is too performance...
Forum: Obi Rope
Last Post: quent_1982
20-06-2025, 08:09 AM
» Replies: 40
» Views: 5,041

 
  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

  Obi Rope on Unity 2017.3
Posted by: lesley - 25-01-2019, 05:43 PM - Forum: Obi Rope - Replies (5)

I was using Obi Rope 3 last night on a project that has a tight deadline and this morning I was going to re-download Obi Rope 3 at work and I noticed the upgrade happened over night.  We are still on Unity 2017.3 and Obi Rope 4 requires 2018.1.  How can I download the latest version of Obi Rope 3?  Is there a way to access previous versions through the Unity Asset store.

Print this item

  My shirt
Posted by: Richard - 25-01-2019, 12:23 PM - Forum: Obi Cloth - Replies (7)

I tried to apply obi cloth to my shirt, but it does not drop by gravity like tutorial. I want you to check what is the wrong point.


I would like you to see this too.

Print this item