Search Forums

(Advanced Search)

Latest Threads
Burst Error
Forum: Obi Cloth
Last Post: Cat3Man
17 minutes ago
» Replies: 0
» Views: 3
Fluid emitter stuttering ...
Forum: Obi Fluid
Last Post: josemendez
4 hours ago
» Replies: 2
» Views: 58
Obi with Polyspatial for ...
Forum: Obi Softbody
Last Post: josemendez
8 hours ago
» Replies: 1
» Views: 28
Reduce oscillation or bou...
Forum: Obi Rope
Last Post: vrtraining
20-09-2024, 11:25 AM
» Replies: 2
» Views: 46
Can I attach particeattac...
Forum: Obi Cloth
Last Post: josemendez
20-09-2024, 09:47 AM
» Replies: 11
» Views: 492
Fixed timestepping
Forum: Announcements
Last Post: josemendez
18-09-2024, 01:39 PM
» Replies: 0
» Views: 52
contact.stickImpulse alwa...
Forum: Obi Rope
Last Post: josemendez
18-09-2024, 11:24 AM
» Replies: 4
» Views: 226
Obi Cloth Renderer Layer
Forum: Obi Cloth
Last Post: josemendez
18-09-2024, 11:06 AM
» Replies: 4
» Views: 160
Cloth material change on ...
Forum: Obi Cloth
Last Post: petera3d
17-09-2024, 07:18 PM
» Replies: 1
» Views: 92
Destroying GameObjects im...
Forum: Obi Rope
Last Post: josemendez
17-09-2024, 02:25 PM
» Replies: 5
» Views: 191

 
  Multiple Obi Solver problem & Build problem (Oni.dll)
Posted by: Piolols - 03-03-2019, 12:35 PM - Forum: Obi Rope - Replies (1)

Hi friends, 
I have a two problem with Obi Rope. 

1) When I put two Obi Solvers on scene in different objects with checked "Simulate in Local Space",  work only one Obi Solver in one time, in second Obi Solver Ropes are frozen.

2) In Complicated game all Ropes not work, Game looking for "Oni.dll" in the "NameOfGame_Data/Mono/", but Oni.dll is in the "NameOfGame_Data/Plugin/Oni.dll". Creating the "Mono" folder in "NameOfGame_Data/" folder and put "Oni.dll", solves this problem.

I use Unity 2018.3.3

Sorry for my bad english :>

Print this item

  size of obi cloth and its clothing
Posted by: Richard - 01-03-2019, 04:04 PM - Forum: Obi Cloth - Replies (1)

Hello.
I set obi cloth for a clothing, but the particles became 10 times bigger than the clothing, why?

Print this item

  Obi Rope v/s Obi Rod Handle and "Fix Translation and Rotation" Button
Posted by: Jeffix73 - 28-02-2019, 04:08 PM - Forum: Obi Rope - Replies (1)

First, thanks for your GREAT ASSET!! I'm getting an issue trying to setup handles with ropes...

I using Unity 2018.3.2f1 and Obi Rope. First your example scene does not work as far as the handle are concern, I've noticed that and it is may be linked to my problem :

When I setup a Rod I get all the button to fix particle and create an handle.
When I setup a Rope, the button "fix translation and orientation" is not active and the Handle setup does not work

I'm then not able to make Handle working with Ropes. I made many many trials and I pretty sure it is not a setting problem...

Any ideas?
Thanks a lot!
JF

Print this item

  bend in a circle without resistence
Posted by: frg_kova - 28-02-2019, 01:39 PM - Forum: Obi Rope - Replies (2)

Hello.

If I just have an extended rope 1m long, when I try to bend it in a circle, it resists it like a spring or elastic. I've disabled the Bend Twist constraint, in fact disabled all the constraints other then Distance, Particle Collision, Collision and Pin and still I can't get it to just coil in the game. When I coil it it really wants to force itself out of it, and if I let both ends go, it will jump away from the force as it's trying to uncoil.

My question, how do I enable it to bend without inner tension, without resistance? Is this some specific combination of constraints?

Print this item

  How to set Obi Shape Matching Constraints
Posted by: suntabu - 28-02-2019, 11:02 AM - Forum: Obi Cloth - Replies (4)

Hi, as said in title.

Is there any demo scene to show me how to use this constraint?

I've tested many times, but it did not work at all.

I just wanna use it at the Sample Scene - ClothSoftBody on a ball.

Print this item

  Is there a way to pause simulation?
Posted by: mmortall - 27-02-2019, 06:55 PM - Forum: Obi Cloth - Replies (3)

Is there a way to pause/continue simulation for particluar ObiActor?

Currently, I use RemoteFromSolver to stop simulation and AddToSolver to restart simulation.
AddToSolver() just restart simulation from start by using mesh in the actor topology.

Is there a way to Pause simulation for a particular actor and then Continue so it will continue to simulate this actor?
After I pause actor I can move it or rotate. So after continue it will continue simulation by having new orientation. 

I was trying to recreate topology from simulated result after last RemoteFromSolver call.
It is working but mesh is already deformed during past simulation and is not looks like it should. 
Thanks.

Print this item

  Obi collider
Posted by: Richard - 27-02-2019, 02:37 PM - Forum: Obi Cloth - Replies (2)

I am using obi collider, but the collider seem not to work correctly. What is wrong?

Print this item

  Loosing Shadow....
Posted by: gabibouty - 26-02-2019, 04:13 PM - Forum: Obi Fluid - Replies (2)

Hello everyone, I have a small question ... I could not have shadows of my fluid. After fex times of tests, I did a final test in a demo scene, and there, I saw that if we simply duplicate the original emitter, we lost  the shadow of the fluid there too ! Someone has a solution?

Thanks !

Print this item

  App crash after RemoveFromSolver called [4.0.2 and older]
Posted by: mmortall - 26-02-2019, 01:40 PM - Forum: Obi Cloth - Replies (7)

I had the same crash on older versions. And I already posted information about it in other my threads. But finally I was able to reproduce crash with 80-100% repo rate and I've found the source of it. 

To reproduce open your example RuntimeCloth.scene. Replace SackGenerator.cs content with code in this post below.

This code just call RemoveFromSolver for all generated cloth after 2 seconds and you can add unlimited amount of cloth when press SPACE button.
Crash occurs after RemoveFromSolver called with some delay (1-5 sec) but you have to do it a couple of time to get crash 100%. On my PC it takes 1-4 tries. 
Sometimes you will have some Unity errors popping up in random places. And then you get crash. Also occurs in standalone version. On Mac OS and Windows. My Unity is 2018.3.0f2
This is a very big blocker for us currently. Because we create lots of objects in runtime and we need to remove them from solver and add again for resimulation.
I am also not able to resimulate ObiActor in 4.0.2 using same solver but I will try some other ways and open a new thread about it if I fail. But first this issue need to be handled.

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

/**
* Generates a fully procedural cloth sack at runtime. This is done by generating two meshes
* and using RuntimeClothGenerator to create cloth out of both of them. Then they are sewn together using
* the ObiStitcher component.
*/
public class SackGenerator : MonoBehaviour {

    public ObiSolver solver;                /**< solver to add the sack to.*/
    public ObiMeshTopology topology;        /**< empty topology asset used to store sack mesh information.*/
    public Material outsideMaterial;                /**< material used for rendering the sack.*/
    public Material insideMaterial;                /**< material used for rendering the sack.*/
    public float sackSize = 1;                 /**< size of the sack in world units.*/
    public int resolution = 10;           /**< resolution of sack mesh in quads per side.*/
    
    
    private List<ObiCloth> _GeneratedActors = new List<ObiCloth>();

    /**
    * Generates and returns procedural tesselated square mesh.
    */
    private Mesh GenerateSheetMesh(){

        // create a new mesh:
        Mesh mesh = new Mesh();
        mesh.name = "sack_sheet";

        float quadSize = sackSize/resolution;
        
        int vertexCount = (resolution + 1) * (resolution + 1);
        int triangleCount = resolution * resolution * 2;
        Vector3[] vertices = new Vector3[vertexCount];
        Vector3[] normals = new Vector3[vertexCount];
        Vector4[] tangents = new Vector4[vertexCount];
        Vector2[] uvs = new Vector2[vertexCount];
        int[] triangles = new int[triangleCount * 3];
        
        // generate vertices:
        // for each row:
        for (int y = 0; y < resolution+1; ++y){
            // for each column:
            for (int x = 0; x < resolution+1; ++x){
                int v = y*(resolution+1)+x;
                vertices[v] = new Vector3(quadSize*x,quadSize*y,0);
                normals[v] = Vector3.forward;
                tangents[v] = new Vector4(1,0,0,1);
                uvs[v] = new Vector3(x/(float)resolution,y/(float)resolution);
            }
        }

        // generate triangle faces:
        for (int y = 0; y < resolution; ++y){
            // for each column:
            for (int x = 0; x < resolution; ++x){

                int face = (y*(resolution+1)+x);
                int t = (y*resolution+x)*6;

                triangles[t] = face;
                triangles[t+1] = face+1;
                triangles[t+2] = face+resolution+1;
        
                triangles[t+3] = face+resolution+1;
                triangles[t+4] = face+1;
                triangles[t+5] = face+resolution+2;
            }
        }
    
        mesh.vertices = vertices;
        mesh.normals = normals;
        mesh.tangents = tangents;
        mesh.uv = uvs;
        mesh.triangles = triangles;
        mesh.RecalculateBounds();
        return mesh;
    }

    private void GenerateSack(){

        Mesh mesh = GenerateSheetMesh();

        // create and give a material to both sides of the sack:
        GameObject sheet1 = new GameObject("sack_side1",typeof(MeshFilter),typeof(MeshRenderer));
        sheet1.GetComponent<MeshRenderer>().materials = new Material[]{outsideMaterial,insideMaterial};

        GameObject sheet2 = new GameObject("sack_side2",typeof(MeshFilter),typeof(MeshRenderer));
        sheet2.GetComponent<MeshRenderer>().materials = new Material[]{outsideMaterial,insideMaterial};

        // position both sheets around the center of this object:
        sheet1.transform.parent = transform;
        sheet2.transform.parent = transform;
        sheet1.transform.localPosition = Vector3.forward;
        sheet2.transform.localPosition = -Vector3.forward;

        // generate cloth for both of them:
        RuntimeClothGenerator generator1 = sheet1.AddComponent<RuntimeClothGenerator>();
        generator1.solver = solver;
        generator1.topology = topology;
        generator1.mesh = mesh;

        RuntimeClothGenerator generator2 = sheet2.AddComponent<RuntimeClothGenerator>();
        generator2.solver = solver;
        generator2.topology = topology;
        generator2.mesh = mesh;

        // sew both sides together:
        ObiStitcher stitcher = gameObject.AddComponent<ObiStitcher>();
        stitcher.Actor1 = sheet1.GetComponent<ObiCloth>();
        stitcher.Actor2 = sheet2.GetComponent<ObiCloth>();

        // add stitches: top and bottom edges:
        for (int i = 1; i < resolution; ++i){
            stitcher.AddStitch(i,i);
            stitcher.AddStitch((resolution+1)*resolution + i,(resolution+1)*resolution + i);
        }

        // sides:
        for (int i = 0; i <= (resolution+1)*resolution; i+=resolution+1){
            stitcher.AddStitch(i,i);
            stitcher.AddStitch(i + resolution ,i + resolution );
        }

        // adjust bending constraints to obtain a little less rigid fabric:
        ObiCloth cloth1 = sheet1.GetComponent<ObiCloth>();
        ObiCloth cloth2 = sheet2.GetComponent<ObiCloth>();

        cloth1.BendingConstraints.maxBending = 0.02f;
        cloth2.BendingConstraints.maxBending = 0.02f;

        cloth1.BendingConstraints.PushDataToSolver(ParticleData.NONE);
        cloth2.BendingConstraints.PushDataToSolver(ParticleData.NONE);

        _GeneratedActors.Add(cloth1);
        _GeneratedActors.Add(cloth2);
    }

    public void Update(){

        if (Input.GetKeyDown(KeyCode.Space))
        {
            GenerateSack();
            
            Invoke("RemoveAllGenerated", 2.0f);
        }
    }

    public void RemoveAllGenerated()
    {
        foreach (var actor in _GeneratedActors)
        {
            actor.RemoveFromSolver(null);
        }
    }
}

I am not attaching a Crash Log because all times it is different because of memory corruption. But it happens 100% after RemoveFromSolver was called.

Print this item

  Normalized rope position?
Posted by: camirving - 25-02-2019, 09:29 PM - Forum: Obi Rope - Replies (1)

Hi there!

I have a rope and i've expanded its length.

I want to get the position of the particle that sits in the very middle of the rope, in normalized 0.5.

How can I retrieve a particle position via normalized value?

Print this item