Search Forums

(Advanced Search)

Latest Threads
Position of Solver in Hie...
Forum: Obi Rope
Last Post: josemendez
11 hours ago
» Replies: 3
» Views: 30
particle properties at Ru...
Forum: Obi Cloth
Last Post: josemendez
11 hours ago
» Replies: 3
» Views: 29
con Obi Fluid para hacer ...
Forum: Obi Fluid
Last Post: d38u993r
25-03-2024, 11:22 PM
» Replies: 2
» Views: 66
boob physics
Forum: Obi Softbody
Last Post: TK tsk
23-03-2024, 02:11 AM
» Replies: 0
» Views: 45
Problem with movement of ...
Forum: Obi Rope
Last Post: Alnik
21-03-2024, 10:33 AM
» Replies: 2
» Views: 125
Spawning a rope along a l...
Forum: Obi Rope
Last Post: josemendez
20-03-2024, 08:10 AM
» Replies: 2
» Views: 107
Teleport() causing Argume...
Forum: Obi Softbody
Last Post: josemendez
20-03-2024, 07:00 AM
» Replies: 1
» Views: 62
Android (Pico) Virtual Re...
Forum: Obi Fluid
Last Post: ugurcamoglu35
20-03-2024, 12:08 AM
» Replies: 2
» Views: 137
Are there any examples of...
Forum: Obi Rope
Last Post: gnovos
19-03-2024, 10:49 PM
» Replies: 2
» Views: 101
License
Forum: Obi Rope
Last Post: bad.penny.games
19-03-2024, 10:31 PM
» Replies: 6
» Views: 6,805

 
  Changing Material
Posted by: AntLewis - 26-01-2024, 11:17 AM - Forum: Obi Fluid - Replies (2)

Hi there, how would I go about changing the material of the fluid so that it's unlit?
Thanks

Print this item

  Manual fluid emission throw exception with Compute backend
Posted by: turkugamelabdev - 25-01-2024, 12:37 PM - Forum: Obi Fluid - Replies (1)

Hi,

I received the latest ObiFluid 7 beta on 24/1/2024. I want to manually emit particle by setting emitter.speed = 0 and then call emitter.EmitParticle() instead. However, the emitter.EmitParticle() on Compute backend caused this exception:

Code:
ArgumentNullException: Value cannot be null.
Parameter name: buffer
UnityEngine.ComputeShader.SetBuffer (System.Int32 kernelIndex, System.Int32 nameID, UnityEngine.GraphicsBuffer buffer) (at <f7237cf7abef49bfbb552d7eb076e422>:0)
UnityEngine.ComputeShader.SetBuffer (System.Int32 kernelIndex, System.String name, UnityEngine.GraphicsBuffer buffer) (at <f7237cf7abef49bfbb552d7eb076e422>:0)
Obi.ComputeFluidMesherSystem.Render () (at Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Fluid/ComputeFluidMesherSystem.cs:406)
Obi.ObiRenderSystemStack.Render () (at Assets/Obi/Scripts/Common/Solver/ObiRenderSystemStack.cs:41)
Obi.ObiSolver.Render (System.Single unsimulatedTime) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1527)
Obi.ObiSolver.LateUpdate () (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:970)

This does not happen on Burst backend.
Here is simple code to replicate the error:
Code:
public class EmitManually : MonoBehaviour
{
    [SerializeField] private ObiEmitter emitter;
    [Range(1, 100)]
    [SerializeField] private uint particlesPerEmission = 1;

    private void Awake()
    {
        emitter.speed = 0;
        emitter.minPoolSize = 0;
    }

    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            for (uint i = 0; i < particlesPerEmission; i++)
                emitter.EmitParticle(0);
        }
    }
}

Print this item

  How to teleport a rope
Posted by: HPx___ - 23-01-2024, 06:37 PM - Forum: Obi Rope - Replies (5)

Hi,

I would like to teleport a rope in Unity.

Teleport method move only one end of the rope.

How to move the whole rope in one time, without streching it ?

Thanks,

Print this item

  SpatialQuery with ComputeBackend in Obi Fluid 7 Beta
Posted by: turkugamelabdev - 20-01-2024, 09:12 PM - Forum: Obi Fluid - Replies (3)

Hi,

I was trying to do spatial querying in Obi Fluid 7. Based on the documentation, there are EnqueueSpatialQueries() method and solver.OnSpatialQueryResults event to get the result asynchronously from ComputeBackend. However, I could not find those in current beta package. I received ObiFluid_7.0b package on 9/1/2024. Is this package up-to-date with the documentation?

Print this item

Triste Obi Particle Renderer not working on Rope in URP
Posted by: Memenaar - 19-01-2024, 01:03 AM - Forum: Obi Rope - Replies (2)

Hi, new user here.

I've been following along with the video tutorials to integrate ObiRope into my project, and everything was going fine up until I went to attach the Obi Particle Renderer component to my rope, as per video 2.

Adding this component had no visible effect, and my rope's particles remained invisible.

As mentioned in the title, I'm using URP. I tried changing the shader used by the Particle Renderer to the Particle Shader found in Assets/Obi/Resources/ObiMaterials/URP/, but this likewise had no effect.

Sorry if this is a common problem, but I attempted to search the forum and didn't find anything. If anyone can help tell me what I'm doing wrong, or suggest something that might help fix this, I would greatly appreciate it. I've attached screenshots of the inspector for my various components.

Blueprint:
   

Solver:
   

Rope:
   
   

Scene View:
   

Print this item

  Best way to pre-bend this rod?
Posted by: bad.penny.games - 15-01-2024, 07:17 PM - Forum: Obi Rope - Replies (4)

I am using a rod as the hose on this vacuum cleaner. I want it to be curled like below when the scene loads. When I try to "pre-bend" the control points it goes wrong one way or another, usually by falling off the "start" transform.

Overall I would prefer to just snapshot the hose and current state in some way without having to edit control points (basically the way we do for physics objects in the scene, we hit Play, then we copy the transforms, then we "Paste -> component values" to have the object settle where it should be). So is there a one-or-two click way way to do this for an Obi Rod object?   thanks in advance -- ian



Attached Files Thumbnail(s)
   
Print this item

  Issue with Softbody Simulation for Vascular Modeling
Posted by: W_chack - 10-01-2024, 07:37 AM - Forum: Obi Softbody - Replies (4)

Hi,
I am writing to ask for help.I'm currently working on simulating a vascular wall using a model of blood vessels with Blender's softbody physics. However, I'm facing some problem with the particle not conforming well to the vascular walls.
When generating the blueprint for the entire vascular model, the particles do not adhere properly to the vascular walls. Even when I import individual sections of the model into the softbody blueprint, the issue persists.
I tried dividing the model using Blender, and interestingly, using the bottom four vessels produces better-fitting particles. However, as I increase the length of the divided vessels, the simulation quality deteriorates(the number of particles reduced).
On further inspection, I noticed that when I isolate a portion of the top vessels and attempt to generate particles, they consistently fail to conform to the vascular walls.

I've attached images illustrating these issues.
[color=var(--tw-prose-bold)]My question is: How can I modify either the model or the settings during blueprint generation to address these issues? [/color]
Thanks in advice for any help.

Print this item

  OBI Performance degradation over time
Posted by: michendo - 09-01-2024, 09:55 AM - Forum: General - Replies (3)

Hi,

I have a collection of issues relating to performance degradation over time in the scene when using Obi Cloth on relatively complex 2-manifold meshes. I am creating a game where you inflate objects (such as life rafts, balls, Santas, snowmen, etc). The inflation mechanic works pretty well. However, on some meshes, there are odd performance issues. Apologies, this is going to be a couple of odd observations that may or may not be related.

I have noticed that as the scene is running, increasing calls are being made to ObiFixedUpdator.FixedUpdate/Substep. It increases from 5 (which is what I expect) and then after a minute can increase to 20 or 25 which is where the issues start. Even if there is no action in the game, this number starts increasing.

Some odd things I have noticed...

Once the issue starts, it persists even after I reload the same scene (like in a replay game). In fact, it can be even worse when I reload the scene. However, if I reload the scene quickly a few times, it seems to reset the calls back to a low number, and it behaves normally. 

Even more oddly, if I destroy the object that has the obi solver and the obi actor, then wait a few seconds, reloading the scene will result in disastrous performance. Performance is good when I have destroyed the object before I reload the scene, but then the number of calls immediately goes to 30+ on the next scene when the OBI object returns. It's almost like there is a leak somewhere, and reloading the scene doesn't fix it (though reloading it frequently in quick succession does). Note, I destroy the object when the inflatable object has "exploded" due to over-inflation (my own mechanic). Is it wrong to destroy the OBI Solver and Actor?

The mesh with the problem has 2362 triangles and is the only OBI actor in the scene. I also have an OBI Collider, an OBI rigid body, and an Obi Particle attachment on it.

I have tried both Oni and Burst and the problem occurs with both, though I think Oni is a little better. With Burst, I have safety checks switched off of course.

Thanks in advance.

michael.

Print this item

  Copy ropes in play mode
Posted by: Alexander34 - 08-01-2024, 03:53 PM - Forum: Obi Rope - Replies (5)

Greetings. I have not found a normal and stable way to copy ropes. I need to have two ropes in the same solver, one of them is always on. When I turn off one and turn on the other, I need to copy the position and number of particles. Visually it should look like one rope is replaced by another, but remains in the same state as the previous one. I don't want to use the ObiParticleRenderer solution, I want to copy all positions of the previous rope to the one we are going to turn on. As far as I know, the positions are accessed via solver.positions, but if I understand correctly, these are the positions of both ropes being simulated.


Code:
public void AttachRope()
        {
            _blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
            var fatherConnectionPoint = _playersContainer[PlayerCharacter.Father].ConnectionPoint;
            var sonConnectionPoint = _playersContainer[PlayerCharacter.Son].ConnectionPoint;
            Vector3 father = ObiRope.transform.InverseTransformPoint(fatherConnectionPoint.position);
            Vector3 son = ObiRope.transform.InverseTransformPoint(sonConnectionPoint.position);
            int allLayers = (1 << 16) - 1;
            int excludeLayer15 = ~(1 << 15);
            int finalMask = allLayers & excludeLayer15;

            int filter = ObiUtils.MakeFilter(finalMask, 1);

            _blueprint.path.Clear();
            _blueprint.path.AddControlPoint(father, -father.normalized, father.normalized, Vector3.zero, 0.1f, 0.1f, 1, filter, Color.white, "start");
            _blueprint.path.AddControlPoint(son, -son.normalized, son.normalized, Vector3.zero, 0.1f, 0.1f, 1, filter, Color.white, "end");
            _blueprint.path.FlushEvents();
            _blueprint.Generate();
            ObiRope.ropeBlueprint = _blueprint;

            var pinConstraints = ObiRope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints<ObiPinConstraintsBatch>;
            pinConstraints.Clear();
            var batch = new ObiPinConstraintsBatch();
            batch.AddConstraint(ObiRope.solverIndices[0], _fatherConnectionPointObiCollider, Vector3.zero, Quaternion.identity, 0, 0, float.PositiveInfinity);
            batch.AddConstraint(ObiRope.solverIndices[_blueprint.activeParticleCount - 1], _sonConnectionPointObiCollider, Vector3.zero, Quaternion.identity, 0, 0, float.PositiveInfinity);
            batch.activeConstraintCount = 2;
            pinConstraints.AddBatch(batch);
            ObiRope.SetConstraintsDirty(Oni.ConstraintType.Pin);
        }
Here's the code I use to create a rope between father and son in real time. It is created in a straight line from son to father. I also have a second rope with a different physical behavior that gravitates to points of interest in zero gravity. At some point I turn off the zero gravity thread and load other settings into solver, while turning on the second thread. I need in some cases for the thread with gravity to replicate the thread without gravity, but at the same time, sometimes I need it the way it already works.

Print this item

  Help: Making a cable with plug on each end?
Posted by: qualar - 02-01-2024, 01:05 PM - Forum: Obi Rope - Replies (3)

I am trying to make a cable with a plug on each end of the cable.  I have attached the plugs to each end using an attachment.  However, when i drag one of the plugs in the application rather than the plug at the other end been dragged along with the rope the rope just stretches and the plug at the end remains in the same place.

How can i get it so that when i pull plug at the start the plug at the end drags.  I want the cable to remain a fixed length.

Thanks in advance.

Print this item