Search Forums

(Advanced Search)

Latest Threads
Using a rigidbody/collide...
Forum: Obi Cloth
Last Post: josemendez
1 hour ago
» Replies: 1
» Views: 5
Can I blend in and out of...
Forum: Obi Cloth
Last Post: josemendez
20-06-2025, 04:32 PM
» Replies: 1
» Views: 71
Solver is too performance...
Forum: Obi Rope
Last Post: quent_1982
20-06-2025, 08:09 AM
» Replies: 40
» Views: 2,927
Obi 7 Model Scaling
Forum: Obi Cloth
Last Post: alkis
19-06-2025, 02:37 PM
» Replies: 2
» Views: 173
Obi Softbody instability?
Forum: Obi Softbody
Last Post: Aroosh
18-06-2025, 06:35 PM
» Replies: 0
» Views: 83
Tear Rod
Forum: Obi Rope
Last Post: chenji
18-06-2025, 08:34 AM
» Replies: 2
» Views: 141
Pipeline that bends
Forum: Obi Softbody
Last Post: josemendez
17-06-2025, 02:07 PM
» Replies: 11
» Views: 417
Memory Leaks?
Forum: General
Last Post: josemendez
16-06-2025, 08:45 PM
» Replies: 3
» Views: 246
Obi 7.0 ParticleAPI
Forum: Obi Rope
Last Post: alicecatalano
12-06-2025, 09:19 AM
» Replies: 12
» Views: 1,984
Is it possible to simulat...
Forum: Obi Fluid
Last Post: josemendez
09-06-2025, 08:21 AM
» Replies: 1
» Views: 193

 
  Distance Fields not working
Posted by: jaysama - 16-09-2019, 05:37 AM - Forum: Obi Fluid - Replies (3)

Hi Obi,

I just purchased Obi Fluid yesterday to make my game. But I experienced difficulty in implementing it, and currently I'm stuck in Distance Fields.
Referring to this thread, that has resolved my initial issues so far (the lag for using raw mesh collider), I am now able to create Distance Field for my fbx glass mesh.
However, when implementing it on sample scene FaucetAndBucket, it seems that the Distance Field doesn't work at all.
The water seems to just went through the mesh.

Pic:
[attachment=401]

Distance Field:
   

Mesh:
   

How do I resolve this?

Print this item

  Is it able to move softbody with script?
Posted by: harapeco - 16-09-2019, 01:47 AM - Forum: Obi Softbody - Replies (16)

Hello.

I'd like to move softbody object with script.
for example, attach above code to softbody object.


Code:
using UnityEngine;
using System.Collections;

public class Gravity : MonoBehaviour {
   public GameObject planet;      
   public float accelerationScale;
    
    void FixedUpdate () {
        
        var direction = planet.transform.position - transform.position;
        direction.Normalize();

        GetComponent<Rigidbody>().AddForce(accelerationScale * direction, ForceMode.Acceleration);
    }
}


Is it able to  do this?

or if not, how can i do like this.

Print this item

  Make Fluid Less "Jello-like" / Liquid Escapes Container
Posted by: justintsai01 - 15-09-2019, 01:34 AM - Forum: Obi Fluid - No Replies

I have some problems with the ObiFluid. I want a beaker to contain the liquid, and move it around to dump. Can anyone help me if they've run into these problems and solved them?
1. Some drops of liquid "phase" through the beaker. The beaker has the KinematicVelocities, ObiRigidBody, and ObiCollider scripts.
2. The liquid is "jello-like" when I move the beaker with the liquid. Is there some settings I could do to make it not like jelly/honey? I've played around with the emitter material values but nothing works yet.

Any help/suggestions is well appreciated, thanks!

Print this item

  A few technical questions
Posted by: Adrian_GSO - 12-09-2019, 10:39 AM - Forum: Obi Rope - Replies (2)

Hi, great asset btw. 

Is there a way to programmatically calculate the points of the rope? I wish for the rope to curl around a cylindrical object much like a firehose. 
And is there a way to programmatically force the rope to be a fixed length during set up?

Thank you so much.

Print this item

  Obi Handle and fixing particles at runtime
Posted by: msw201089 - 10-09-2019, 09:33 PM - Forum: Obi Softbody - Replies (5)

I am running into an interesting problem. I am trying to create a new gameobject, attach an Obi Particle Handle component to it, set a particles mass and velocity to 0, then add that particle to the handle. I have tried to do this in almost every order possible by creating the gameobject first, adding the particle first, zeroing out mass and velocity first, and no matter what order the operations are done in inevitably the model freaks out and disappears, or only the particle itself freaks out. I have also tried to setup the handle in the editor and then disable and enable it at runtime but this also causes weird behavior.

Code sample:

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

public class ObiSoftBodyTester : MonoBehaviour
{
    ObiActor actor;

    public GameObject runtimeHandleGO;
    public ObiParticleHandle newHandle;
    public ObiSolver mySolver;

    // Start is called before the first frame update
    void Start()
    {
        actor = GetComponent<ObiActor>();
        Debug.Log(actor);
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.A))
        {
            RunInit();
        }
    }

    public void RunInit()
    {
        runtimeHandleGO = new GameObject();

        newHandle = runtimeHandleGO.AddComponent<ObiParticleHandle>();
        newHandle.Actor = actor;

        newHandle.transform.position = actor.GetParticlePosition(actor.particleIndices[0]);

        /*
        mySolver.velocities[0] = Vector3.zero;
        mySolver.invMasses[0] = 0;
        */

        /*
        actor.velocities[0] = Vector3.zero;
        actor.invMasses[0] = 0;
        actor.PushDataToSolver(ParticleData.INV_MASSES | ParticleData.VELOCITIES);
        */

        newHandle.AddParticle(0, actor.GetParticlePosition(actor.particleIndices[0]), Quaternion.identity, actor.invMasses[0], 0.0f);

        /*
        mySolver.velocities[0] = Vector3.zero;
        mySolver.invMasses[0] = 0;
        */

        actor.velocities[0] = Vector3.zero;
        actor.invMasses[0] = 0;
        actor.PushDataToSolver(ParticleData.INV_MASSES | ParticleData.VELOCITIES);

        Debug.Log(newHandle.ParticleCount);
    }
}

I have this script attached to the dragon in the sample scene from the Obi softbody asset.

Basically, I'm not sure if my code is causing the problems, I'm going about this the wrong way, or if I've found a bug.

Any help would be appreciated.

Unity version 2019.2.0f1

Print this item

  Particle editor not working at all Unity 2018.4
Posted by: Ian_W - 09-09-2019, 08:34 PM - Forum: Obi Rope - Replies (2)

I'm on unity 2018.4 and all the rope components seem to work, however, none of the inspector widgets seem to be working. Whenever I hit the edit particle button I get a couple of hundred errors about a null reference exception in the ObiParticleActorEditor script on lines 332 598 and 262. I can sort of click around and eventually find spots where I can add pins but things aren't quite working and it makes it nearly impossible to set up ropes.

Print this item

  Extreme elasticity on cloth
Posted by: manusense - 09-09-2019, 10:49 AM - Forum: Obi Cloth - Replies (2)

Hi, i just purchased ObiCloth 4 and i am still learning how to use it. After viewing the sample scenes, I have created a new obi cloth with a custom mesh with a simple setup (curtain like), using a sample cloth (CollisionCloth in ClothRigidBodyInteraction sample scene) as a reference. I have generated the new obi topology from a tie shaped mesh and linked it in the obi cloth component. But while the sample cloth behave really well, my tie cloth present an extreme elasticity (the length of the tie almost double), even with the same parameters in the constrain components as the sample cloth. I tried to tune the distance constraint without success. Also, when enabling the tether constraints the mesh shrink itself no matter how the tether scale is setup. The obi solver is the same for both cloths. Am i doing something wrong? I tried to tune all the constraints parameter for days without any success. In the screenshot attached there is the tie without and with the tethers enabled (tether scale at 1, stiffness at 1).

Print this item

  GeneratePhysicRepresentationForMesh causing slow down
Posted by: BetaJester - 09-09-2019, 07:45 AM - Forum: Obi Cloth - Replies (4)

Hi there

I've got a simulation where we create Obi Cloth balloons which move around the screen. However, whenever we spawn a new bubble and use GeneratePhysicRepresentationForMesh we're getting significant slow down. 

For reference we call:  

Code:
yield return balloon.GetComponent<ObiCloth>().GeneratePhysicRepresentationForMesh();
inside the spawn coroutine. 

I've tried threading the code, but GeneratePhysicRepresentationForMesh needs to be on the main thread. Is there a way it is meant to be used which means it has a minimal performance hit? 

- BetaJester

Print this item

  Linking Stitches for two adjadcents softbodies
Posted by: parsec3d - 08-09-2019, 05:31 PM - Forum: Obi Softbody - No Replies

Hi, is it possible to have a way to link vertexes of two different softbodies so I can unstitch them partially or completely 
by passing a collider between them?

Print this item

  Particles ignore collisions
Posted by: neecko - 06-09-2019, 11:55 PM - Forum: Obi Cloth - Replies (1)

Hello again,

Any way to have certain particles ignore a collision with a sticky object? 

for example, if the particle is removed from a collider it will ignore all future collisions?
or like if the ball gets stuck on cloth and the ball is then removed, the particles on the cloth that the ball interacted with, will no longer be "sticky"


I tried playing around with stick impulse, but no luck.

Thanks

Print this item