Search Forums

(Advanced Search)

Latest Threads
Force Zone apply differen...
Forum: Obi Rope
Last Post: chenji
2 hours ago
» Replies: 9
» Views: 117
Can I blend in and out of...
Forum: Obi Cloth
Last Post: josemendez
3 hours ago
» Replies: 3
» Views: 83
Using a rigidbody/collide...
Forum: Obi Cloth
Last Post: josemendez
10 hours ago
» Replies: 1
» Views: 9
Solver is too performance...
Forum: Obi Rope
Last Post: quent_1982
20-06-2025, 08:09 AM
» Replies: 40
» Views: 2,967
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: 88
Tear Rod
Forum: Obi Rope
Last Post: chenji
18-06-2025, 08:34 AM
» Replies: 2
» Views: 143
Pipeline that bends
Forum: Obi Softbody
Last Post: josemendez
17-06-2025, 02:07 PM
» Replies: 11
» Views: 428
Memory Leaks?
Forum: General
Last Post: josemendez
16-06-2025, 08:45 PM
» Replies: 3
» Views: 256
Obi 7.0 ParticleAPI
Forum: Obi Rope
Last Post: alicecatalano
12-06-2025, 09:19 AM
» Replies: 12
» Views: 1,996

 
  "Heavier" Cloth
Posted by: Elliot - 04-10-2019, 01:00 AM - Forum: Obi Cloth - Replies (1)

Hey all,

Just started using Obi Cloth, and I'm loving it - it's working wonders. That said, I'm having trouble simulating what I would describe as a thicker/heavier cloth. Basically, even my big thick coats float around like tissues. Is there a way to make them feel like they have more weight and are thicker? I've tried:

- Playing with the weights of the points
- Playing with Aerodynamic Constraints (these have gotten me the closest so far, but everything still crumples to easily, and also if the settings are too high there's an increased likelyhood that the cloth just kind of goes nuts and explodes about).
- Playing with Bending Constraints (these don't seem to do anything at all).

Thanks!

Print this item

Exclamación LWRP issues
Posted by: MasterGeneralB - 03-10-2019, 09:24 PM - Forum: Obi Fluid - Replies (1)

So I'm trying to use a simple 2d fluid with the LW rendering pipeline and nothing I try is working...

I'm trying to get the basic obi particle renderer to work and show the fluid particles so I can at least see what I am doing. I found a previous thread about changing the tags in the shader.. but that didn't seem to do the trick.

The simpleparticleshader.shader file looks something like this at the moment:


Code:
Shader "Obi/Simple Particles" {

Properties {
    _Color         ("Particle color", Color) = (1,1,1,1)
}

    SubShader {

        Pass {

            Name "ParticleFwdBase"
            Tags {"LightMode" = "LightweightForward" "RenderType" = "Opaque" "RenderPipeline" = "LightweightPipeline" "IgnoreProjector" = "True"}
            Blend SrcAlpha OneMinusSrcAlpha  
            
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            #pragma fragmentoption ARB_precision_hint_fastest

            #pragma multi_compile_fwdbase nolightmap

            #include "ObiParticles.cginc"

            fixed4 _Color;
            fixed4 _LightColor0;

            struct vin{
                float4 vertex   : POSITION;
                float3 corner   : NORMAL;
                fixed4 color    : COLOR;
                float4 t0 : TEXCOORD0; // ellipsoid t1 vector
            };

            struct v2f
            {
                float4 pos   : POSITION;
                fixed4 color    : COLOR;
                float2 texcoord  : TEXCOORD0;
                float3 lightDir : TEXCOORD1;
                LIGHTING_COORDS(3,4)
            };

            v2f vert(vin v)
            {
                v2f o;
        
                // particle positions are passed in world space, no need to use modelview matrix, just view.
                float radius = v.t0.w * _RadiusScale;
                float4 viewpos = mul(UNITY_MATRIX_V, v.vertex) + float4(v.corner.x, v.corner.y, 0, 0) * radius; // multiply by size.
                o.pos = mul(UNITY_MATRIX_P, viewpos);
                o.texcoord = float3(v.corner.x*0.5+0.5, v.corner.y*0.5+0.5, radius);
                o.color = v.color * _Color;

                o.lightDir = UnityObjectToViewPos(ObjSpaceLightDir(v.vertex));

                TRANSFER_VERTEX_TO_FRAGMENT(o);

                return o;
            }

            fixed4 frag(v2f i) : SV_Target
            {
                // generate sphere normals:
                float3 n = BillboardSphereNormals(i.texcoord);

                // simple lighting: diffuse
                    float ndotl = saturate( dot( n, normalize(i.lightDir) ) );

                // final lit color:
                return fixed4(i.color.rgb * (_LightColor0 * ndotl + UNITY_LIGHTMODEL_AMBIENT),i.color.a);
            }
            
            ENDCG

        }

        Pass {
           Name "ShadowCaster"
                Tags { "LightMode" = "LightweightForward" }
                Offset 1, 1
              
                Fog {Mode Off}
                ZWrite On ZTest LEqual
        
                CGPROGRAM
                #pragma vertex vert
                #pragma fragment frag
                #pragma fragmentoption ARB_precision_hint_fastest

                #pragma multi_compile_shadowcaster nolightmap

                #include "ObiParticles.cginc"
                
                struct vin{
                    float4 vertex   : POSITION;
                    float3 corner   : NORMAL;
                    float4 t0 : TEXCOORD0; // ellipsoid t1 vector
                };

                struct v2f {
                    float4 pos   : POSITION;
                    float3 texcoord : TEXCOORD0;
                };
                
                v2f vert( vin v )
                {
                    v2f o;

                    float radius = v.t0.w * _RadiusScale;
                    float4 viewpos = mul(UNITY_MATRIX_V, v.vertex) + float4(v.corner.x, v.corner.y, 0, 0) * radius;
                    o.pos = mul(UNITY_MATRIX_P, viewpos);
                    o.texcoord = float3(v.corner.x*0.5+0.5, v.corner.y*0.5+0.5, radius);
                    return o;
                }
                
                fixed4 frag( v2f i ) : SV_Target
                {
                    float3 n = BillboardSphereNormals(i.texcoord);

                    return fixed4(0,0,0,0);
                }
                ENDCG
        
            }

    }
FallBack "Diffuse"
}


I believe I added the right tags to both passes.. and changed the line
Code:
o.lightDir = UnityObjectToViewPos(ObjSpaceLightDir(v.vertex));

as Unity was screaming a warning log at me about using Matrix_MV. I'm not entirely sure if that's how it should look as I am a newb with shaders... But I can definitely tell you that it still does not work. I don't see anything on my camera screen. That said, the simulation DOES work, but for me to see the particles (and only with the editor camera during playmode) I need to press the edit particles button on the obi emitter component.

Also, I am getting a log "Material Property is found in another cbuffer than 'UnityPerMaterial' (_Color)". Googling about, I found that to get it working with the SRP Batcher it needs to be in a CBUFFER_START(UnityPerMaterial) CBUFFER_END block... but I don't know how to implement that either... if anyone knows how, that would be great.

Print this item

Triste Obi Fluid Collision Callback never ending
Posted by: RjcArci - 29-09-2019, 11:40 PM - Forum: Obi Fluid - Replies (1)

Im new to Obi and i have a problem with the collisions.

I have a flask which is generating a liquid(Obi Emiiter) and a floor (Obi Collider) that interacts with that liquid.
I made different floors each one with the PhLandController script that i only want to call when the liquid collides  with the floor
I also have an (Obi Solver) which have the following script.



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

[RequireComponent(typeof(ObiSolver))]
public class FluidPhCollisionHandler : MonoBehaviour {

    ObiSolver solver;
    PhLandController phController;

    void Awake(){
        solver = GetComponent<Obi.ObiSolver>();
    }

    void OnEnable () {
        solver.OnCollision += Solver_OnCollision;
    }

    void OnDisable(){
        solver.OnCollision -= Solver_OnCollision;
    }

    void Solver_OnCollision (object sender, Obi.ObiSolver.ObiCollisionEventArgs e)
    {
        Oni.Contact contact = e.contacts[0];

        Component collider;
        if (ObiCollider.idToCollider.TryGetValue(contact.other,out collider)){
            phController = collider.GetComponent<PhLandController>();
            phController.increasePHLevel();
        }
    }



}

The problems is that after i remove the liquid from colliding to the floor the method increasePHLevel() is call infinitly.
The only way to stop it is that the liquid begins a new collision with a different floor but the problem is now pass to the new floor method is call infinitly.


Any suggestion how i could fix this ?

Thanks

Print this item

  Addforce to rigidbody
Posted by: Kostik3000 - 29-09-2019, 01:26 PM - Forum: Obi Softbody - Replies (1)

Hi,

is there a possibility to add a force to a obiSoftbody-Gameobject with a rigidbody on it?

Thanks!

Print this item

  Is this asset viable for this?
Posted by: wojwen - 28-09-2019, 05:49 PM - Forum: Obi Softbody - Replies (1)

I'm thinking about using this asset for my next project, a blacksmith game. Would this asset be viable for simulating a pliable metal? What I mean precisely is whether the deformations this asset provides are physically correct (enough) to allow for predictable manipulation (for example a metal rod that could be flattened and its volume wouldn't change in the process). The other aspect is changing the properties of the softbody in runtime to make it more/less pliable. The last thing is the max "resolution" of the softbody. Could I make it very precise and realistic or are there limits when it comes to changing the particle size?

Print this item

  Mobile Suggestions + Help
Posted by: neecko - 26-09-2019, 10:17 PM - Forum: Obi Fluid - Replies (4)

I've read all over your forums and website that the regular Obi Fluid Rendered is too much for mobile devices. 

Seems like 3d would really useful for mobile devices, but I can make 2d work for what I need if I can address these issues.

I don't know shaders that well at all, but if I use the simple renderer I need to add depth or the particles will get drawn over objects.  I haven't the faintest idea on how to do this. Any help?

-

The Raclette demo is perfect for what I'm going for, but that doesn't seem to work in 2D. Basically I have lava that "cools" and turns black as it stops moving. What would be my best option to do that? Any way I can detect this is happening so I can spawn smoke from these areas?

Thanks for your help.

Print this item

Triste Rope in 2D display?
Posted by: danielp - 26-09-2019, 08:46 PM - Forum: Obi Rope - Replies (1)

Hi,

First of all, I just purchased this asset today!
Let me appreciate the beauty of the rope physics and really love it.

Now I came across a scenario where I need to use the rope simulation in my 2D project.

I tried with the 2D mode and it simulate physics correctly with position fixed in z-axis, and rotation in one direction.

The problem I am encountering is the twisting / rolling / whatever rotation it happened within the rope chain itself.

Simply put, I am having a 2D flat image as a rope, and it is rolling / twisting internally which looks bad.

Is there any remedy around this? 


Thanks Sonrisa

Print this item

  planes clipping!
Posted by: graciapples - 26-09-2019, 11:24 AM - Forum: Obi Cloth - Replies (3)

Hi, we're trying to make a simulation for book pages blown by the wind. We've been using the inter-collision example by obicloth for reference, but it appears that the planes/pages will clip into each other if they're too close, even if their particles aren't touching. I turned on obi particle render in the pic below - when we press play, the planes just sink. Inter-collision only works if the gaps between the planes are huge, but we do need to keep the form of a book. New to unity here, please help! 
Huh Lengua

Print this item

  Initialize rope with very short length
Posted by: Lokeyyyy - 26-09-2019, 08:33 AM - Forum: Obi Rope - Replies (2)

Hi there, I am trying to create a rope start with very short length / zero length, then control the length by using rope cursor. However when I edit the rope curve so the first and last control points are very close, the rope shape is not shorten but instead shrink up. How should I correctly initialize it? There is a screenshot for illustration, the first one is the normal rope and the second one is the rope when i move up the end control point very close to the start control point.

Print this item

  How to lock obi rope axis?
Posted by: Jhulse - 24-09-2019, 10:40 AM - Forum: Obi Rope - Replies (1)

Hey, I've set up a rope using the grappling hook template as a base, however, I need to lock the Z axis of the rope's movement. I can't see anywhere on the forums or in the inspector where I can do this. Any help would be greatly appreciated! Thanks.

Print this item