Search Forums

(Advanced Search)

Latest Threads
Can I attach particeattac...
Forum: Obi Cloth
Last Post: josemendez
Yesterday, 10:12 AM
» Replies: 9
» Views: 341
Fixed timestepping
Forum: Announcements
Last Post: josemendez
18-09-2024, 01:39 PM
» Replies: 0
» Views: 25
contact.stickImpulse alwa...
Forum: Obi Rope
Last Post: josemendez
18-09-2024, 11:24 AM
» Replies: 4
» Views: 178
Obi Cloth Renderer Layer
Forum: Obi Cloth
Last Post: josemendez
18-09-2024, 11:06 AM
» Replies: 4
» Views: 81
Cloth material change on ...
Forum: Obi Cloth
Last Post: petera3d
17-09-2024, 07:18 PM
» Replies: 1
» Views: 50
Destroying GameObjects im...
Forum: Obi Rope
Last Post: josemendez
17-09-2024, 02:25 PM
» Replies: 5
» Views: 117
Streo Rendering mode
Forum: Obi Fluid
Last Post: josemendez
16-09-2024, 12:42 PM
» Replies: 3
» Views: 122
Rope "Freezing" after a f...
Forum: Obi Rope
Last Post: josemendez
14-09-2024, 07:52 PM
» Replies: 1
» Views: 84
Can I get help?
Forum: Obi Cloth
Last Post: josemendez
13-09-2024, 12:17 PM
» Replies: 1
» Views: 91
Simulate clothing in a fi...
Forum: Obi Cloth
Last Post: josemendez
13-09-2024, 07:41 AM
» Replies: 1
» Views: 83

 
  Fixed timestepping
Posted by: josemendez - 18-09-2024, 01:39 PM - Forum: Announcements - No Replies

Hi everyone!

Just finished a detailed write up on fixed timestepping, in the context of physics simulations. There's not much information out there about this and misconceptions run rampant, so I decided to included this in Obi's manual to cover the basics of simulation.

http://obi.virtualmethodstudio.com/manua...eloop.html

would appreciate feedback/suggestions/complaints Sonrisa

Print this item

  Cloth material change on rendering
Posted by: petera3d - 17-09-2024, 05:26 PM - Forum: Obi Cloth - Replies (1)

Hello,

I use obi cloth from version 6, now I use 7.1

I have a skinned mesh with red material. 

In play mode , material changes and show weird. I think normal get wrong. Please see the video bellow :

Components on mesh's prefab are :

ObiSkinnedCloth
ObiSkinnedClothRenderer


Mesh info :
Vertices :  37040
Triangle : 68244

Print this item

  Destroying GameObjects immediately is not permitted during physics trigger/contact
Posted by: Alexander34 - 17-09-2024, 01:14 PM - Forum: Obi Rope - Replies (5)

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);
            lineFromObiRope.SetStartEndPositions(father, son);
            int allLayers = (1 << 16) - 1;
            int excludeLayer15 = ~(1 << 15);
            int finalMask = allLayers & excludeLayer15;

            int filter = ObiUtils.MakeFilter(finalMask,
                1);
            _blueprint.path.Clear();
            _blueprint.groups.Clear();
            _blueprint.path.AddControlPoint(father,
                -father.normalized,
                father.normalized,
                Vector3.zero,
                _controlPointsMass,
                _controlPointsMass,
                1,
                filter,
                Color.white,
                "start");

            _blueprint.path.AddControlPoint(son,
                -son.normalized,
                son.normalized,
                Vector3.zero,
                _controlPointsMass,
                _controlPointsMass,
                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);
        }
I made a rope hitch like in the Hook example. And now every time I get this error in ObiCollisionWorld when I use the above AttachRope method.
Code:
public void DecreaseReferenceCount()
        {
            if (--refCount <= 0 && gameObject != null)
                DestroyImmediate(gameObject); 
        }
Code:
Destroying GameObjects immediately is not permitted during physics trigger/contact, animation event callbacks, rendering callbacks or OnValidate. You must use Destroy instead.
UnityEngine.Object:DestroyImmediate (UnityEngine.Object)
Obi.BurstColliderWorld:DecreaseReferenceCount () (at Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderWorld.cs:61)
Obi.BurstSolverImpl:Destroy () (at Assets/Obi/Scripts/Common/Backends/Burst/Solver/BurstSolverImpl.cs:189)
Obi.BurstBackend:DestroySolver (Obi.ISolverImpl) (at Assets/Obi/Scripts/Common/Backends/Burst/BurstBackend.cs:21)
Obi.ObiSolver:Teardown () (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:905)
Obi.ObiSolver:RemoveActor (Obi.ObiActor) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1201)
Obi.ObiActor:RemoveFromSolver () (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:362)
Obi.ObiRope:set_ropeBlueprint (Obi.ObiRopeBlueprint) (at Assets/Obi/Scripts/RopeAndRod/Actors/ObiRope.cs:152)
_src.Scripts.PlayerFeatures.Connection.ThreadProxy_s.ThreadProxy:AttachRope () (at Assets/_src/Scripts/PlayerFeatures/Connection/ThreadProxy's/ThreadProxy.cs:124)
_src.Scripts.PlayerFeatures.Connection.ConnectionHandler:AttachPhysicalRope () (at Assets/_src/Scripts/PlayerFeatures/Connection/ConnectionHandler.cs:407)
_src.Scripts.PlayerFeatures.Connection.ConnectionHandler:EnablePermanentPhysicalConnection () (at Assets/_src/Scripts/PlayerFeatures/Connection/ConnectionHandler.cs:398)
_src.Scripts.PlayerFeatures.Connection.ConnectionHandler/<ChangeMode>d__46:MoveNext () (at Assets/_src/Scripts/PlayerFeatures/Connection/ConnectionHandler.cs:276)
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder:Start<_src.Scripts.PlayerFeatures.Connection.ConnectionHandler/<ChangeMode>d__46> (_src.Scripts.PlayerFeatures.Connection.ConnectionHandler/<ChangeMode>d__46&) (at Library/PackageCache/com.cysharp.unitask@c170af5642/Runtime/CompilerServices/AsyncUniTaskMethodBuilder.cs:111)
_src.Scripts.PlayerFeatures.Connection.ConnectionHandler:ChangeMode (_src.Scripts.PlayerFeatures.Connection.ConnectionMode,single)
_src.Scripts.Core.PermanentConnectionZone:EnablePermanentMode () (at Assets/_src/Scripts/Core/PermanentConnectionZone.cs:78)
UnityEngine.Events.UnityEvent:Invoke ()
_src.Scripts.Core.TwoPlayersTrigger:CheckPlayersInTrigger () (at Assets/_src/Scripts/Core/TwoPlayersTrigger.cs:69)
_src.Scripts.Core.PermanentConnectionZone:OnTriggerStay (UnityEngine.Collider) (at Assets/_src/Scripts/Core/PermanentConnectionZone.cs:47)

Code:
_src.Scripts.PlayerFeatures.Connection.ThreadProxy_s.ThreadProxy:AttachRope () (at Assets/_src/Scripts/PlayerFeatures/Connection/ThreadProxy's/ThreadProxy.cs:124)
124 point is 
Code:
ObiRope.ropeBlueprint = _blueprint;

in AttachRope method

Iam use [6.5.2] obiRope

Print this item

  Obi Cloth Renderer Layer
Posted by: vrtraining - 16-09-2024, 06:58 PM - Forum: Obi Cloth - Replies (4)

I want to render some specific lighting on cloth through rendering culling mask. I have created a separate special layer for my Obi Cloth and assigned it that special layer. Now my light is only rendering on that specific special layer. It works well in editor because I have assigned that layer to the Obi Cloth which also has Mesh Renderer and Obi Cloth Renderer. But when I enter play mode and Obi Cloth is simulated and its rendered using Obi Cloth Renderer it doesn't work, upon some investigation I came to know that it is only considering that cloth in default layer.

How I can change the layer of Obi Cloth Renderer from default to some other layer?

Print this item

  Streo Rendering mode
Posted by: ugurcamoglu35 - 16-09-2024, 09:47 AM - Forum: Obi Fluid - Replies (3)

Hi,

We are switching from Obi fluid 6 to 7. After switching to 7, obi right and left eye problems started to occur on meta devices. We can solve this by making Streo Rendering mode multiview in 6. However, this problem is not solved in 7. It looks correct if the user closes their left eye. It is not visible when you close your right eye. When you look with both eyes, a double flow appears. Do we need to make extra settings?

It gets fixed when you multipass. However, in our project, we receive different errors like this. We had no problems with the same settings in 6.

Print this item

  Rope "Freezing" after a few seconds
Posted by: TryBios - 14-09-2024, 05:06 PM - Forum: Obi Rope - Replies (1)

Hi everyone,

i have the Problem that my Rope seems to stop simulating after a few seconds if the Start and End Particle stop moving. Also if the Rope isnt moved a lot, some Particles dont react to small movement which also looks kinda wierd. I think thats a Performance measure but my Rope gets stuck in unrealistic Positions which breaks the Immersion in an VR Environment.

Thanks in advance.

Print this item

Pregunta Can I get help?
Posted by: ziziza93 - 13-09-2024, 10:02 AM - Forum: Obi Cloth - Replies (1)

I need to select specific regions in the OBI blueprint to run different cloth simulations, but using Unity’s built-in UI makes it challenging to isolate and configure those parts. Therefore, I would like to pre-select the points I need using tools like Vertex Groups and Vertex Paint in a 3D modeling program such as Blender, and then export this data via an FBX file. My goal is to select this data in the OBI blueprint in Unity. Could you provide a guide for this process?

Print this item

  Simulate clothing in a fixed position
Posted by: Nightfall - 13-09-2024, 06:38 AM - Forum: Obi Cloth - Replies (1)

hello

I'm writing to ask a question while using Obi.

I am testing dynamically dressing a pants object(Obi Skinned Cloth, Obi Skinned Cloth Renderer) on a mannequin object (Obi solver, Obi Fixed Updater, Obi Collider, Distance Field).

I was able to get the pants to initially fall down from the loaded height and stop at the pelvis to become clothed.

Is there any way to get the simulation of the pants' clothing to work without falling down from the initial height?

I tried using Unity Joints but it didn't work the way I wanted it to

I am a beginner in Unity and my English is not very good, so I apologize in advance for any lack of explanation.

Print this item

  contact.stickImpulse always 0, Closed loop ObiRope Collision fails
Posted by: alicecatalano - 12-09-2024, 08:32 AM - Forum: Obi Rope - Replies (4)

Hello, I am running a simulation with a closed loop ObiRope, that should simulate an elastic.
The objective is to grasp the elastic with a tool and hook it on some nails, to create different shapes. The nails are vertical and the elastic should be stretched to be hooked to nails at 10 cm of distance between each other.
I am encountering an issue with the collision, because i am able to grasp and release the object with no issues, and i am able to hook the elastic on one nail, but the when i stretch the elastic and i hook it on another nail, after the release the collision is broken, either for both nails or just for the second one and the elastic passes through them.
I initially thought of increasing the contact.stickImpulse to make the interface between nail and internal part of the elastic more "unbreakable" but it didn't work because of course I can't change that value.
I don't know if inserting some type of attachment can be helpful because i need the elastic to slide over the nail if the movement requires it.
Do you have any suggestion to address this problem?

Print this item

  Can I attach particeattachment in script?
Posted by: gahyun11 - 12-09-2024, 06:18 AM - Forum: Obi Cloth - Replies (9)

Hello! I'm currently trying to add particle attachment component through the script before obi skinnedcloth asset is enabled during play.
The issue that I'm struggling is if I add particle attachment into cloth asset during the play using my script(below), particle attachment doesnt work, just falls until it reaches at pelvis, 
but! if I add particle attachment into same cloth asset before play, particle attachment works well!

both of the cases particle attachment is added into cloth asset well, but the problem is particle attachment doesnt work only if I add it on the cloth asset(object that has obi skinnedcloth component) through the script

<add particle attachment component through inspector before play>
   

<add particle attachment during the play through script>
   

and this is the script I wrote. I tried same part on "OnEnable","Start","Awake" and all of this didnt work.
I tried to add particle attachment component on disabled cloth, then I enable cloth asset, it didnt work. 
Particle attachment worked only I added that component on cloth asset through inspector whether it was play runtime or not. 
 

Code:
  obiSkinnedCloth.gameObject.AddComponent<ObiParticleAttachment>();
            obiSkinnedCloth.GetComponent<ObiParticleAttachment>().target = _clothEnabler._obiSolver.transform.GetChild(1);
//this is the part that I set body as particle attachment's target, and the body has mesh collider and obi collider.
            try
            {
                obiSkinnedCloth.GetComponent<ObiParticleAttachment>().attachmentType = ObiParticleAttachment.AttachmentType.Dynamic;
                obiSkinnedCloth.GetComponent<ObiParticleAttachment>().compliance = _clothEnabler._particleCompliance;

            }


is particle attachment something that I cannot add in script during play runtime? Thank you.

Print this item