Search Forums

(Advanced Search)

Latest Threads
Changing the rope's posit...
Forum: Obi Rope
Last Post: Crystalius
4 hours ago
» Replies: 3
» Views: 46
RESET Obi Softbody
Forum: Obi Softbody
Last Post: spikebor
7 hours ago
» Replies: 11
» Views: 2,768
Obi7 | Fluid granular can...
Forum: Obi Fluid
Last Post: spikebor
Yesterday, 06:17 PM
» Replies: 0
» Views: 45
Bigger foam with Alpha di...
Forum: Obi Fluid
Last Post: spikebor
Yesterday, 03:56 PM
» Replies: 10
» Views: 267
Can ObiBone work with Sof...
Forum: Obi Softbody
Last Post: spikebor
Yesterday, 03:36 PM
» Replies: 0
» Views: 24
(7.0) Still confused abou...
Forum: General
Last Post: kodra
07-05-2024, 03:13 PM
» Replies: 4
» Views: 93
question of the ObiRope l...
Forum: Obi Rope
Last Post: rinrin
07-05-2024, 02:33 PM
» Replies: 0
» Views: 87
Obi7 | I made a pool
Forum: Obi Fluid
Last Post: josemendez
07-05-2024, 02:03 PM
» Replies: 5
» Views: 166
Frequent crash after assi...
Forum: Obi Fluid
Last Post: spikebor
07-05-2024, 11:33 AM
» Replies: 2
» Views: 79
[FIXED] Dispose of atomic...
Forum: Obi Cloth
Last Post: imtzo
06-05-2024, 08:28 PM
» Replies: 11
» Views: 2,343

 
  Is there a way to query collisions with Obi Bone?
Posted by: spikebor - 06-05-2024, 12:00 PM - Forum: Obi Rope - Replies (5)

I want to detect collisions with this character (which has nothing on him other than Obi bone)
Can it be done, or he should have Collider? I think Obi Bone or not, it has particles under it as all Obi things, so I can query its collisions with my character (my character has Obi Collider)
I want to debug the impulse.

[Image: AfR6o6v.png]

The Golem can contact and push my character back, but this code (subscribed to character's solver.OnCollision event) returns no collisions.

Code:
        void Solver_OnCollision(object sender, ObiSolver.ObiCollisionEventArgs e)
        {
            foreach (Oni.Contact contact in e.contacts)
            {
                collisionsImpulse += contact.normalImpulse;
            }
        }

Even though I enable Collision and Particle Collision collision / Queries on my character.

Print this item

  Compatibility with magicacloth2
Posted by: etemaru - 04-05-2024, 12:16 PM - Forum: Obi Fluid - Replies (3)

An error occurs when magicacloth2 and obi fluid are used together, and the error continues even if magicacloth2 is removed.

What should I do?

Print this item

  Rope Jittering/ Stuttering
Posted by: Nixon - 03-05-2024, 12:46 PM - Forum: Obi Rope - Replies (3)

Good Day, 

thank you for your time! 
I am currently experiencing rope stuttering in my VR Game. I have made a small video demostration, where you can have a look at how it is experiecned:

https://drive.google.com/uc?id=171SoEWaf...t=download

Then after watching the video, heres some screenshots from the Components!

I have attatched two screenshots to this, one is the Solver Inspector + Hierarchy and one is one of the Ropes Inspector


Again, thank you so much in advance!
Best,
Nixon Sonrisa

Print this item

Exclamación Advection but for a mesh.
Posted by: spikebor - 03-05-2024, 09:28 AM - Forum: Obi Fluid - Replies (2)

I'm thinking about this idea for a while.
We got: 
-Obi Fluid which is limited in particle count, making something like a pool will be hard on the GPU.
-Obi fluid can advect things near it, like shuriken particles.

So why can't we apply the same advection idea, but instead of shurikens, we apply it to the nearby mesh vertex?

So the idea is we have a pool of Obi fluid particles, which having very large particle scale, and not rendered.
With this we can have any object that jump into the pool will be physics collide and have buoyancy force to pull it up but with low particle count.
And on top we have a plane mesh for the surface, which advected by the Obi Fluid. This way the mesh can have deformation, this mesh can be Fluxy mesh which have 2.5D sim on top to give us detailed waves simulation, while the Obi Fuild give it bigger wave advection.

Isn't this a best of both world? You can make a bridge asset that have 2 requirements that are Fluxy and Obi Fluid. If you can add underwater rendering for it, it will sell like hot cakes.

Print this item

Pregunta Tips for optimization using many characters with softbody?
Posted by: spikebor - 03-05-2024, 09:14 AM - Forum: Obi Softbody - Replies (2)

I've done all I can in the setting: enable Burst, solver set fixed sub step to 1 and all the constraint to 1, only update when looking at, generate low-res blueprint.

This is 8 Slime characters Result:

Fixed Update enabled: When look at: 250 fps, when look away: 320 fps.

Fixed Update disabled: 450 fps (I'm curious about this part, why is it greater than the look-away option while Simulate When Invisible is off? I expect it would be the same, is there still some calculation not eliminated here?)

250-320 fps is very good not gonna lie. I would not target greater than 60 fps though, just wanna ask to further optimize it because I want to have some spare fps for other Obi sim like cloth rope water etc.

One note: before going with this good range 250-320 fps, I'm at 60 fps just because the blueprint resolution kinda detailed. Just making it low-res get me to this point so I wanna point out this important info for anyone who happen to see this. Gran sonrisa

Print this item

  Obi Fluid 6 not render on Window build
Posted by: spikebor - 02-05-2024, 05:07 PM - Forum: Obi Fluid - Replies (3)

Hi, I have this bug when test build on PC Window the Obi Fluid
Obi Fluid 6.5.4, works well on Editor using the Obi/URP/Particles.shader, but not work on PC build (x64 window).
Unity URP 2022.3.16f1
Do I miss any setup step?

Log:

Code:
Particle rendering shader not suported.
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
Obi.ObiParticleRenderer:CreateMaterialIfNeeded()
Obi.ObiParticleRenderer:DrawParticles(ObiActor)
Obi.ObiActor:Interpolate()
Obi.ObiSolver:Interpolate(Single, Single)
Obi.ObiUpdater:Interpolate(Single, Single)
Obi.ObiFixedUpdater:Update()

--Stack Trace--
Obi Fluid Renderer not supported in this platform.
UnityEngine.Debug:LogWarning(Object)
Obi.ObiFluidRendererFeature:AddRenderPasses(ScriptableRenderer, RenderingData&)
UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal(RenderPipelineAsset, IntPtr, Object)

Print this item

Pregunta I've made a bounce script, but don't know how to optimize
Posted by: spikebor - 01-05-2024, 12:35 PM - Forum: Obi Softbody - Replies (3)

Hi, the idea is simple, to improve the game feel when character make contact with the softbody.
I would like to have softbody handle OnContact by iterate the contacts and add the incoming contact impulse with a mult value,
so that we can have a squashed feel when character step on a slime.
When it works, it is very cool to look at Gran sonrisa !

But eventually it can be very easy to spiral into a dead performance degradation, since each time you got contact, you have to iterate the contacts, and then iterate the particles to detect which particle is near to add the bounce force.

For example: 10 contact, 1000 particles, that is 10000 iterations each time we got contact. Wow!
How can I optimize this?

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

namespace SPIKE.kIntegration
{
    //when got some contact, be squashed by that contact in normal direction
    [RequireComponent(typeof(ObiActor))]
    public class ObiBouncer : MonoBehaviour
    {
        [SerializeField] ObiSolver _solver;
        [SerializeField] float _propagate = 0.5f, _bounceForceMult = 10,_clampBounceForce=10;
        [SerializeField] bool _debug;

        ObiActor actor;

        void Awake()
        {
            actor = GetComponent<ObiActor>();
        }

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

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

        void Solver_OnCollision(object sender, ObiSolver.ObiCollisionEventArgs e)
        {
            var world = ObiColliderWorld.GetInstance();

            // just iterate over all contacts in the current frame:
            foreach (Oni.Contact contact in e.contacts)
            {
                // if this one is an actual collision:
                if (contact.distance < 0.01)
                {
                    Vector3 contactOnCollider = contact.pointB;
                    contactOnCollider = _solver.transform.TransformPoint(contactOnCollider);
                    Vector3 contactNm = contact.normal;

#if UNITY_EDITOR
                    if (_debug)
                    {
                        Debug.DrawLine(contactOnCollider, contactOnCollider + contactNm, Color.yellow, 2f);
                    }
#endif
                    //iterate the particles
                    for (int i = 0; i < actor.solverIndices.Length; ++i)
                    {
                        int solverIndex = actor.solverIndices[i];
                        //add bounce force based on the propagate distance
                        if (Vector3.Distance(actor.GetParticlePosition(solverIndex), contactOnCollider)
                            < _propagate)
                        {
                            var squashForce = contact.normal * math.min( contact.normalImpulse * _bounceForceMult,_clampBounceForce);
                            actor.solver.velocities[solverIndex] += squashForce;
                        }
                    }                   
                }
            }
        }
    }
}

Print this item

  Error: Particle that does not exist in the actor
Posted by: Sky d - 01-05-2024, 10:30 AM - Forum: Obi Rope - Replies (1)

Hi.  

 I am getting an error saying that my particle attachment is not recognized.  Any advice appreciated please?

Quote:The particle group 'Receiver' references a particle that does not exist in the actor 'Obi Rope'.

UnityEngine.Debug:LogError (object)
Obi.ObiParticleAttachment:Bind () (at Assets/Obi/Scripts/Common/Utils/ObiParticleAttachment.cs:237)
Obi.ObiParticleAttachment:Actor_OnBlueprintLoaded (Obi.ObiActor,Obi.ObiActorBlueprint) (at Assets/Obi/Scripts/Common/Utils/ObiParticleAttachment.cs:198)
Obi.ObiParticleAttachment:OnEnable () (at Assets/Obi/Scripts/Common/Utils/ObiParticleAttachment.cs:172)
UnityEditor.EditorApplication:Internal_RestoreLastOpenedScenes ()

Thanks for your time.  Here's a screenshot.  In the image, I had clearly renamed my control points.  So I'm not sure how to fix.  At first, it was working fine, but then I switched to Dynamic because I wanted to have the pin constraint function active. That's when the error started to appear.
[Image: Obi-Error.png?rlkey=pia214odw0w66qvsjy2l...0ic2j&dl=1]

Print this item

  Prefab Creation & Cable Length with Rigidbodies
Posted by: Sky d - 01-05-2024, 10:21 AM - Forum: Obi Rope - Replies (5)

Hello. I'm creating audio cables with physics and connectors for my XR project. Thanks for the amazing tool. 

I have  2 questions. 

1.  I already attached my rigidbodies on each end of the rope, but now I realize I need to make the rope longer.  How can I do that without needing to reposition and attach the precisely placed rigidbody cable connectors?

2. After I make my master cable which has the two connectors, how can I safely create a prefab that I can re-use over and over?  The cables I'm making also have custom snap functions that connect them to other gameobjects,  so it's important that both ends are able to be freely manipulated by the player in VR.  The goal here is to have different length & color coded prefab cables for the player to use.  With each level, I hope to be able to just drop them in the heirachy going forward.

Print this item

Pregunta Setup Ignore Collisions between Body and Motor Colliders?
Posted by: spikebor - 30-04-2024, 10:00 AM - Forum: Obi Softbody - Replies (4)

Hi, I'm looking for a way to setup Ignore Collisions between my Character all body colliders and its Motor (a separated capsule who control the character movement)
I can setup this just fine with Unity's Physics.IgnoreCollision(a, b, ignore); for Unity Colliders.

The reason I can't use Obi layer to do this is I want all characters no matter friends or foes can consider moving on top of any other characters, so Motor can interact with other character's body colliders, but not interact with its owner's body colliders. Do Obi have this method? I've looked into the Collision page and does not see any mention.

Print this item