Search Forums

(Advanced Search)

Latest Threads
Position of Solver in Hie...
Forum: Obi Rope
Last Post: josemendez
Yesterday, 10:27 AM
» Replies: 3
» Views: 30
particle properties at Ru...
Forum: Obi Cloth
Last Post: josemendez
Yesterday, 10:24 AM
» Replies: 3
» Views: 33
con Obi Fluid para hacer ...
Forum: Obi Fluid
Last Post: d38u993r
25-03-2024, 11:22 PM
» Replies: 2
» Views: 69
boob physics
Forum: Obi Softbody
Last Post: TK tsk
23-03-2024, 02:11 AM
» Replies: 0
» Views: 46
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: 109
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: 138
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,808

 
  Android (Pico) Virtual Reality and OBI Fluid
Posted by: ugurcamoglu35 - 15-03-2024, 01:38 PM - Forum: Obi Fluid - Replies (2)

Hi,

I encounter an error when I operate the obi in the container with the Pico hand controller. I put xr grab objects into the cup object. As soon as I hold the glass via the controller, the liquid disappears. When I release the controller, the fluid comes back.

Is there something I missed somewhere?

Print this item

  Problem with movement of ObiRopeAttachment
Posted by: Alnik - 13-03-2024, 02:42 PM - Forum: Obi Rope - Replies (2)

Hello everyone!

I have the following problem: I am trying to control the same crane with two clients that connect to a server via FishNet. As long as no player connects to the crane, the ObiSolver remains disabled and the spreader is simply dragged along as a child of the crane.

As soon as a player connects to the crane, the parenting of the spreader is changed and the ObiSolver is enabled so that the spreader is now only attached to the crane by the ropes. It should be noted that the ropes themselves are attached to a SpreaderAttachmentGO in a cabin GO that can be moved.

If you now move the cabin, the spreader also moves with it, as the SpreaderAttachment, just like the VCam, is attached to the cabin. If the first client now disconnects from the crane, the ObiSolver is disabled again. If the second client then connects to the crane, the VCam is packed to the position left by the first client, but the ropes spawn at the original position in the centre of the crane, i.e. as if the cabin movement had not taken place before. You can see this in the attached video.

What confuses me now is that in the SceneView (also in the video) you can see that the object on which the ropes are actually hanging is in the correct position, but for some reason the ropes themselves are hanging down vertically from the centre.

I was previously able to reproduce this behaviour independently of the network, i.e. in single player, but this was not always successful. The same behaviour can also be observed when the crane is moving. The ropes also spawn at the crane's point of origin.

Does anyone know what could be the reason for this? Does the position of the SpreaderAttachment have to be updated somehow in the ObiSolver? Could the alternating enable/disable of the ObiSolver lead to such behaviour? Originally I installed these changes because the performance was severely affected by the rendering of 60 different ObiSolvers for all cranes at once.

In the video, I also included the settings for the ObiSolver and for one ObiRope as an example.

Many thanks in advance!

Best regards,
Alexej


Print this item

  Performance with Burst on is very bad
Posted by: ShawnF - 13-03-2024, 11:19 AM - Forum: General - Replies (4)

I'm getting a major performance hit from my obi ropes, and it's significantly worse when using the Burst as the backend rather than Oni. FPS is ~75 with all ropes disabled, 30 with Burst, and 40 with Oni. 

Using Unity 2022.3.13f1

I've got 11 ropes in the scene - each has its own solver. 

So the story is...
After looking into some performance issues today, I noticed that our obi ropes were the biggest offender. I googled around and realized that I didn't have all the packages installed that I needed for it to use Burst, which should theoretically improve performance a lot. I installed what I needed and I no longer got the package dependency warning, but performance tanked badly. At that point, I was getting an error similar to the one here:
http://obi.virtualmethodstudio.com/forum...-3492.html

I do have the Jobs debugger, safety checks, and leak detection all disabled.

I've tried a few different things to improve performance. It helped a bit, but still isn't good enough. Specifically what I've done is:
- Reduced solver steps from 4->3
- Reduced rope resolution
- Increased decimation

Also tried switching to the line renderer instead of extruded mesh, but that didn't make a difference, presumably because the performance issues are coming from the simulation rather than the rendering.

I also tried installing the old Jobs package individually, but that didn't seem to make any difference either.

Let me know if you want any specific profiling info - I wasn't sure what would be useful and didn't want to flood this post with unnecessary info.

I suspect that my best bet for a big improvement is getting the Burst backend to work properly, but something is definitely wrong there. Any ideas what might be the issue and how I can solve it?

Print this item

  Using Fluid for cooking simulation?
Posted by: stepkka - 11-03-2024, 10:06 PM - Forum: Obi Fluid - Replies (4)

Thinking about purchasing Obi Fluid. I assume some soup in pot would be easy to do. But I also have an idea of making eggs. When you crack an egg the insides are liquid (though somewhat viscous). When you pour an egg into a flat surface it should behave like a normal egg, i.e. stay as a clump and not disappear. After cooking it should become more rigid (ideally increase viscosity smoothly over time). Is it possible to do using Obi Fluid?

Print this item

  Configuring a T-Shirt for Robotics Task
Posted by: thisjustin123 - 08-03-2024, 05:03 PM - Forum: Obi Cloth - Replies (1)

Hi,

I'm an undergraduate student working with a robot-assisted dressing task and am interested in using Obi to simulate the dynamics of a T-shirt. Currently, I'm aiming just to get a t-shirt cloth set up to see if Obi will give good performance/results in terms of realistic cloth simulation.

I've imported this into Unity and set up a scene with Obi. Currently, I just have the shirt falling onto itself on a hospital bed.

Some important specifications for my problem in particular are that I need to use self collisions and surface collisions simultaneously enabled, or else the cloth may phase through itself in unexpected ways. I ran previously into a problem with this causing INTENSE lag, but followed the steps in this forum post (https://obi.virtualmethodstudio.com/foru...-3994.html) to resolve this. I suppose I have one tiny question regarding that solution: 

When I limit the timestep to 0.06, which seems to give workable results, the simulation actually seems to slow down. That is, it's as if I reduced the timescale because the physics compared to real time seems to actually be slower than if I have the timestep unlimited. I assume this is because the physics timestep is limited below the timestep suggested by the FPS, meaning the physics simulates slower than expected. Is this intentional and is there any workaround I can do regarding this? It's certainly not the biggest deal and still simulates at a reasonable speed.

Secondly, more pertinently, I'm running into an issue when the cloth lays on top of itself; when the cloth should be simply at rest laying on top of itself, it seems to jitter violently due to collisions constantly happening between its particles. I attached a video of this on my Google Drive: https://drive.google.com/file/d/16GJlybl...sp=sharing

Is there any way to prevent this jitter and make the cloth behave better when at rest?

Thanks in advance for any tips and apologies if answers are already somewhere out there. I haven't seen much use of Obi Cloth (or any particle-based simulations out there) in the context of actual entire clothing meshes, so it's been hard to configure things specifically for this purpose. I suppose in that case if there are any particular resources I could consult to find more about the use of Obi for my specific purpose I would really appreciate any direction towards those resources. Sonrisa

Print this item

  Problem with RigitBody
Posted by: Alexander34 - 06-03-2024, 11:21 AM - Forum: Obi Rope - Replies (4)

[Image: 2024-03-06-111633.png]
[Image: 2024-03-06-112345.png]
The problem is as follows: I have a code that creates a control point in the middle of the rope, then I create an attachment on the rope and attach it to the attraction point inside the object that I want to move with this rope. Since the attraction point itself is attached to the main RigidBody (box) through a fixedJoint, it starts to press it into other colliders, ignoring collisions, because the weight of the ControlPoint presses from above so strongly that it ignores the mass of the main object (box). However, I need to achieve an effect where pulling the attraction object would be difficult depending on its weight, and the lighter it is, the easier it is to pull it by moving the control point on the other end of the rope.

Code:
        public void AttachRopeAtCurrentCenter(AttractionObject attractionObject)
        {
            _blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();

            var fatherConnectionPoint = _playersContainer[PlayerCharacter.Father].ConnectionPoint;
            var sonConnectionPoint = _playersContainer[PlayerCharacter.Son].ConnectionPoint;
            Vector3 father = ObiRope.transform.InverseTransformPoint(fatherConnectionPoint.position);
            Vector3 center = ObiRope.transform.InverseTransformPoint(attractionObject.AttractionPoint.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,
                _controlPointsMass,
                _controlPointsMass,
                1,
                filter,
                Color.white,
                "start");

            _blueprint.path.AddControlPoint(center,
                -center.normalized,
                center.normalized,
                Vector3.zero,
                _controlPointsMass,
                _controlPointsMass,
                1,
                filter,
                Color.white,
                "center");

            _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();
            _centerOfRopePointCollider.transform.position = attractionObject.AttractionPoint.position;

            if (attractionObject.Type == AttractionObject.AttractionPointType.Kinematic)
                _centerOfRopePointObiRigidbody.kinematicForParticles = true;


            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);

            var attachment = ObiRope.GetComponent<ObiParticleAttachment>();
            attachment.particleGroup = ObiRope.ropeBlueprint.groups[1];

            if (attractionObject.Type == AttractionObject.AttractionPointType.Kinematic)
            {
                attachment.target = attractionObject.transform;
                attachment.attachmentType = ObiParticleAttachment.AttachmentType.Static;
            }
            else
            {
                attachment.target = attractionObject.AttractionPoint;
                attachment.attachmentType = ObiParticleAttachment.AttachmentType.Dynamic;
            }
            batch.activeConstraintCount = 2;
            pinConstraints.AddBatch(batch);
            ObiRope.SetConstraintsDirty(Oni.ConstraintType.Pin);
        }

Print this item

  Raycasting rope behind an object
Posted by: Apoll0 - 05-03-2024, 10:06 AM - Forum: Obi Rope - Replies (2)

I have a rope hanging behind some objects. Objects are between the camera and the rope. 
The objects have an ObiCollider with category 0. 
The rope has category 1. 

I make a raycast from the camera towards the rope. I need the result to be returned only if it is not behind the object. 
So I am creating filter as 
int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 1);
var ray = _camera.ScreenPointToRay(Input.mousePosition);
solver.Raycast(ray, out QueryResult result, filter, 100f, 0.1f));

And unfortunately, every time I hit the rope, the result returns me the simplex of that rope. Even if she is behind an obstacle with ObiCollider. Is there a way for an obstacle to stop the raycast?

Print this item

  Rope with sharp change in thickness
Posted by: Fuzzypeg - 29-02-2024, 12:48 PM - Forum: Obi Rope - Replies (2)

Hi, I am trying to work out how to make a smoothed rope with a sharp change in thickness as shown in the attached image. 

Ideally I would like to disable smoothing between 2 control points but this does not appear to be an option. If I just set the thickness of the nodes, it is smoothed over the entire section, centered on the control point rather than starting from it and so I don't get the sharp transition I need.

I have tried adding a total of 4 control points across the area to force it, which looks visibly correct in the editor, but basically explodes at runtime, even with the nodes set to not collide with anything. I suspect it is because it is still trying to stuff 5 sections in between the control points and they are too close together.

Does anyone have any idea how this could be achieved other than having 2 ropes connected to a fixed mesh in the middle?



Attached Files Thumbnail(s)
   
Print this item

  Parent Movement
Posted by: BusraSevim - 28-02-2024, 10:07 AM - Forum: Obi Softbody - Replies (5)

Hello,

In my scene, there is a normal rotating cylinder and softbody spheres arranged around this cylinder. In order to attract the center of the cylinder, I apply a force to all spheres as follows:


Code:
var forceDirection = (spin.transform.position - transform.position).normalized;
softBall.AddForce(forceDirection * force, ForceMode.Acceleration);


But at the same time, the cylinder is the parent object of these spheres. And when I rotate the cylinder, I want these spheres to rotate with the cylinder, like normal spheres. But they don't rotate, I can only see the strain vibration. They can rotate when I turn off the softbody features, but I shouldn't turn them off.

The rotation code of the cylinder is as follows:


Code:
transform.Rotate(Vector3.forward,-_inputVector.x*spinRotateSpeed);


I use the solver and sphere softbody features in the sample scene named BallPool.

Thanks.

Print this item

  ObiCloth local space documentation is outdated?
Posted by: CptnFabulous - 28-02-2024, 07:54 AM - Forum: Obi Cloth - Replies (3)

Hi!

I have an object with an ObiSolver attached, with several ObiCloth shapes as children. The parent object needs to be moved and teleported, but this causes the rendered cloth to behave like it’s simply moving at high speeds, causing it to glitch out and behave in unnatural ways. To solve this, I’m trying to make the cloth simulation happen in the solver’s local space instead of world space, so that the parent’s movements don’t affect the cloth simulation. Not 100% realistic, but good enough for my purposes.

I've looked in the forum but haven't found a clear answer. In some posts I’ve seen people say that the simulations always occur in the local space of the solver itself, but that should mean the cloth is already operating in local space, which isn’t happening. I also found values for determining how much the local space values are affected by world space movement, but those are both set to zero.

I’m trying to make the cloth render in the solver’s local space instead of world space, and am looking at this documentation to try and figure it out: https://obi.virtualmethodstudio.com/manu...space.html
I’m currently using ObiCloth version 6.5.4, in the Unity Editor 2021.3.3f1, but the only detailed version of the documentation is for an older version. The later versions are marked red as incomplete and can’t be selected.
The documentation shows that in ObiSolver there’s a bool to enable local space simulation, but when I look at the script (both in the Inspector and at the code itself), no option exists. The two options I mentioned for determining world space influence both have comments that reference a ‘simulateInLocalSpace’ option, but returns no results when I use FindAll across the entire solution (aside from those two comments). I’ve got two images here to show how different the ObiSolver is in the inspector.

The image shown in the documentation:
[Image: local_space_inspector.png]
The way it appears in my project:
[Image: PgaTuWH.png]

So in the version I’m using, what do I need to do to ensure the cloth simulates in local space? I presume the feature must have been refactored and moved to a different section of the code, as I refuse to believe such an important feature would be outright removed.

Thanks!

Print this item