Latest Threads |
can you remove particles ...
Forum: Obi Softbody
Last Post: aardworm
09-07-2025, 07:09 AM
» Replies: 0
» Views: 110
|
ObiRope Mesh Renderer
Forum: Obi Rope
Last Post: quent_1982
08-07-2025, 11:27 AM
» Replies: 4
» Views: 394
|
How to dynamically change...
Forum: Obi Rope
Last Post: quent_1982
08-07-2025, 06:34 AM
» Replies: 6
» Views: 541
|
Pipeline that bends
Forum: Obi Softbody
Last Post: josemendez
04-07-2025, 09:52 AM
» Replies: 13
» Views: 1,266
|
How to implement/sync Obi...
Forum: Obi Rope
Last Post: quent_1982
01-07-2025, 01:48 PM
» Replies: 2
» Views: 359
|
Collisions don't work con...
Forum: Obi Rope
Last Post: chenji
27-06-2025, 03:05 AM
» Replies: 3
» Views: 434
|
Force Zone apply differen...
Forum: Obi Rope
Last Post: chenji
26-06-2025, 11:41 AM
» Replies: 11
» Views: 1,214
|
Can I blend in and out of...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 04:42 PM
» Replies: 3
» Views: 431
|
Using a rigidbody/collide...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 09:29 AM
» Replies: 1
» Views: 250
|
Solver is too performance...
Forum: Obi Rope
Last Post: quent_1982
20-06-2025, 08:09 AM
» Replies: 40
» Views: 5,535
|
|
|
What is the best solution for big ratio between rope and attached objects |
Posted by: Tattler - 23-08-2021, 09:23 AM - Forum: Obi Rope
- Replies (1)
|
 |
I have a scene with small boat(tug boat) which must pull a bigger ship. I try to attach both boats with obi rope. Small boat is 400 tons and the big ship is 32 000 tons. I try to create 50m rope, with less elasticity as possible. To achieve this I set particle mass to be 150kg and have around 1000 particles, which makes rope mass of 150 tons. I set distance constraint iteration to 30, set substep to 8.
With this setup when I add required force to the small boat, the rope stretches to around 60m and start pulling the big ship which is final result I want.
My questions is:
- Can I do something more to make rope less elastic with this kind of attached objects mass with way bigger ratio than 10:1.
- Can I find what force applies rope to the attached objects. Because of unrealistic heavy rope(150 tons), when I connect rope to the small boat, the rope itself start pulling small boat in his direction. If I can find what is the force of the rope, maybe can put opposite force to the small boat to balance this force and prevent small boat from moving.
Any help will be appreciated!
|
|
|
obi fluid 5.6.2 Frozen screen |
Posted by: Felix - 23-08-2021, 03:18 AM - Forum: Obi Fluid
- Replies (1)
|
 |
Hello, I have a question. The liquid will freeze on the IOS device. This problem will not happen on Android. After investigation, I found that this is the problem of OBI solver. The equipment is XR 6S 12pm. Is there any way to help me solve this problem? thank you very much. I use Obi fluid 5.6.2 and unity 2018.1.14. This problem is very urgent. I hope you can give the results as soon as possible. Thank you very much
(23-08-2021, 03:18 AM)菲利克斯 Wrote: 你好,我有个问题。液体将在 IOS 设备上冻结。这个问题在安卓上不会发生。经过调查,我发现这是OBI求解器的问题。设备是XR 6S 12pm。有什么办法可以帮我解决这个问题吗?非常感谢。我使用 Obi 流体 5.6.2 和统一 2018.1.14。这个问题非常紧迫。我希望你能尽快给出结果。非常感谢 He will flash back and crash after freezing the screen for a period of time. After a simple query, he finds that FPS is 0, as if a frame is stuck
|
|
|
I want to put an object to sleep |
Posted by: moyashiking - 20-08-2021, 06:42 AM - Forum: Obi Fluid
- Replies (2)
|
 |
I have an object that I put to sleep using a script. Collider, Rigidbody, Obi Collider, Obi RigidBody have been added.
When I place the Obi Emitter in a remote location (eg 10000m) and play it, the object's Sleep is instantly released.
Sleep is enabled by removing the object's Obi Collider, Obi RigidBody, or by removing the Obi Emitter.
Isn't the object to which Obi Collider and Obi RigidBody added become Sleep?
|
|
|
changing default shape |
Posted by: ysj001 - 20-08-2021, 05:54 AM - Forum: Obi Softbody
- Replies (1)
|
 |
hello, before buying, i need to know if the default shape of the soft body can be changed, for example:
if I have a perfect sphere, and turn it into an egg (setting the default position of each particle).
this egg comes back and becomes a sphere?
would this egg still be soft? because I need it that way.
I don't want to change the shape through physics, I want to change the shape and then apply the physics.
|
|
|
Particle Attachments at runtime |
Posted by: fishing-rod - 19-08-2021, 09:57 AM - Forum: Obi Rope
- Replies (1)
|
 |
Hi, I ran into a problem assigning and removing the targets of particle attachments at runtime.
I'm on Obi Rope 6.2 and Unity 2020.3.15f2.
I think I got it to work at some point, but I cant figure out the build in my collab history.
Whenever I attach something to the rope, i.e. setting the target property, I run this code so that everything sits at the right position:
Code: /// <summary>
/// 1. Temporary saves the targets of the obi particles attachments.
/// 2. Sets the targets to null.
/// 3. Resets all line particles.
/// 4. Sets attachments to their original positions.
/// 5. Reassigns the targets to the attachments.
/// </summary>
public void ResetLine()
{
// 1 In order to reset particles all attachment targets have to be removed.
ObiParticleAttachment[] attachments = Rod.lineObj.GetComponents<ObiParticleAttachment>();
Transform[] formerTargets = new Transform[attachments.Length];
ObiRope rope = Rod.lineObj.GetComponent<ObiRope>();
// 2
for (int i = 0; i < attachments.Length; i++)
{
formerTargets[i] = attachments[i].target;
attachments[i].target = null;
}
// 3
rope.ResetParticles();
// 4
if (attachedHook != null)
{
attachedHook.transform.position = Rod.hookObj.transform.position;
}
if (attachedEquipment != null)
{
attachedEquipment.transform.position = Rod.equipObj.transform.position;
}
// Pause for debugging purposes
EditorApplication.isPaused = true;
// 5
for (int i = 0; i < attachments.Length; i++)
{
attachments[i].target = formerTargets[i];
}
}
I have a breakpoint at ResetParticles and the funktion is properly executed. The attached GameObjects (hook and equipment) are at their original positions when I pause the editor.
The rope particles are not though. I also still see the target properties being set in the inspector.
![[Image: on-pause.png]](https://i.ibb.co/YDywwxN/on-pause.png)
The screenshot is during the pause from code. The two red dots are the attached GameObjects, the line goes right through them in its original state.
There is some manual workaround which makes it work: When I de- and reactivate the ObiRope component during the pause and then resume,
the particles are back at their original positions. Recreating that in code with Rod.line.gameObject.SetActive() doesn't work though.
Am I approaching this in the wrong way?
|
|
|
ObiUpdater needlessly allocates every frame |
Posted by: timconkling - 19-08-2021, 12:07 AM - Forum: General
- Replies (4)
|
 |
I've been having performance issues with Obi Cloth, and have been spending lots of time in the profiler to get a handle on how to improve things.
I've noticed that Obi allocates quite a lot of memory each frame - in my scene with 6 clothed characters, `ObiLateFixedUpdater` is allocating ~2.5 kb each frame. At least some of this is very easily eliminated.
`ObiUpdater.BeginStep` and `ObiUpdater.Substep` both allocate a new temporary List each time they're called. This list can be moved into a member variable to avoid the repeated allocation:
Code: private List<IObiJobHandle> m_JobHandles = new List<IObiJobHandle>();
protected void Substep(float stepDeltaTime, float substepDeltaTime, int index)
{
using (m_SubstepPerfMarker.Auto())
{
// Kick off all solver jobs:
foreach (ObiSolver solver in solvers)
if (solver != null)
this.m_JobHandles.Add(solver.Substep(stepDeltaTime, substepDeltaTime, index));
// wait for all solver jobs to complete:
foreach (IObiJobHandle handle in this.m_JobHandles)
if (handle != null)
handle.Complete();
this.m_JobHandles.Clear();
}
}
`ObiSolver.Update` also does some unnecessary allocation, because it calls `Mathf.Max(params float[])`, which allocates a temporary params array. (It also accesses `transform.lossyScale` - which I think involves a roundtrip out of managed code and into the engine - three times). I've made this minor tweak:
Code: void Update()
{
var lossyScale = transform.lossyScale;
m_MaxScale = Mathf.Max(Mathf.Max(lossyScale.x, lossyScale.y), lossyScale.z);
}
These changes bring my allocations down to ~1.5kb per frame, which is a good start - but far from perfect!
I really like Obi, and I'm a bit surprised to see so much `GC.alloc` action every frame. I'd love to be able to do cloth simulation without any allocations... might there be a performance pass done in the future?
Cheers!
|
|
|
"ObjectDisposedException" in cloth objects on scene startup in Unity 2020.3.16f1 |
Posted by: timconkling - 18-08-2021, 08:09 PM - Forum: General
- Replies (12)
|
 |
After upgrading to Unity 2020.3.16f1 (from 2020.3.15), many of my ObiCloth objects have recently started throwing this error when entering Play Mode:
Code: ObjectDisposedException: Cannot access a disposed object.
Object name: 'The NativeArray has been disposed, it is not allowed to access it'.
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckExistsAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle& handle) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Jobs/AtomicSafetyHandle.bindings.cs:186)
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.ValidateNonDefaultHandle (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle& handle) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Jobs/AtomicSafetyHandle.bindings.cs:175)
Unity.Collections.NativeArray`1[T].get_Length () (at /Users/bokken/buildslave/unity/build/Runtime/Export/NativeArray/NativeArray.cs:117)
Obi.BurstColliderCollisionConstraints.GetConstraintCount () (at Assets/ThirdParty/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderCollisionConstraints.cs:27)
Obi.BurstSolverImpl.GetConstraintCount (Oni+ConstraintType type) (at Assets/ThirdParty/Obi/Scripts/Common/Backends/Burst/Solver/BurstSolverImpl.cs:405)
Obi.ObiSolver.EndStep (System.Single substepTime) (at Assets/ThirdParty/Obi/Scripts/Common/Solver/ObiSolver.cs:1577)
Obi.ObiUpdater.EndStep (System.Single substepDeltaTime) (at Assets/ThirdParty/Obi/Scripts/Common/Updaters/ObiUpdater.cs:92)
Obi.ObiLateFixedUpdater.LateFixedUpdate () (at Assets/ThirdParty/Obi/Scripts/Common/Updaters/ObiLateFixedUpdater.cs:67)
Obi.ObiLateFixedUpdater+<RunLateFixedUpdate>d__6.MoveNext () (at Assets/ThirdParty/Obi/Scripts/Common/Updaters/ObiLateFixedUpdater.cs:51)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
Sometimes this is seemingly harmless, and sometimes it results in, for example, my main character's gown being frozen in place:
If I manually disable and re-enable the cloth's `ObiLateFixedUpdater` component at runtime, the cloth simulates properly.
I'm not sure what triggered this - I just updated to Obi 6.2 (from 6.1), and also updated to Burst 1.5.6 (from 1.5.5), but rolling back both of those changes doesn't solve the issue. EDIT: Aha - this was triggered by a Unity update. In Unity 2020.3.15f2, I don't get this error. In Unity 2020.3.16f1 - the most recent LTE release as of today - I do.
(I'm using the Burst backend for Obi.)
Any thoughts on what might be going wrong?
|
|
|
Is ObiRope right for a ball and chain? |
Posted by: Tanoshimi - 18-08-2021, 05:07 PM - Forum: Obi Rope
- Replies (1)
|
 |
I have a ball and chain in my game, and also a sickle on a chain, and I'd like the characters to be able to actually swing them. The Chains are links, or rather, I have links I can use to make the chains.
Would ObiRope work for this? If so, is there a decent tutorial or video on how to set it up?
|
|
|
batch.AddConstraint(..., breakThreshold) not working |
Posted by: TheMunk - 17-08-2021, 01:27 PM - Forum: Obi Rope
- Replies (1)
|
 |
As title says, when using
Code: batch.AddConstraint(solverIndex, obiCollider, positionCS, Quaternion.identity, linearCompliance, rotationalCompliance, breakThreshold);
setting breakThreshold to a small positive number does not make the constraint break. It seems to always be infinite. Why is this? Normal dynamic Particle Attachments works fine in my scene.
|
|
|
|