Latest Threads |
Fluid ignores colliders o...
Forum: Obi Fluid
Last Post: josemendez
Yesterday, 09:03 AM
» Replies: 2
» Views: 38
|
Particle attachments dont...
Forum: Obi Rope
Last Post: josemendez
13-02-2025, 03:09 PM
» Replies: 1
» Views: 102
|
Dynamic attachment to fix...
Forum: Obi Rope
Last Post: josemendez
12-02-2025, 02:52 PM
» Replies: 9
» Views: 339
|
Changing rope lenth creat...
Forum: Obi Rope
Last Post: josemendez
11-02-2025, 08:35 PM
» Replies: 3
» Views: 180
|
Preventing fabric from vi...
Forum: Obi Cloth
Last Post: josemendez
10-02-2025, 12:36 PM
» Replies: 1
» Views: 128
|
Trouble with Attachments
Forum: Obi Softbody
Last Post: beegon
07-02-2025, 08:29 PM
» Replies: 3
» Views: 229
|
Mesh creating
Forum: Obi Rope
Last Post: alicecatalano
07-02-2025, 11:28 AM
» Replies: 13
» Views: 22,503
|
Collider interactions
Forum: Obi Softbody
Last Post: josemendez
07-02-2025, 09:42 AM
» Replies: 1
» Views: 159
|
RuntimeRopeGenerator basi...
Forum: Obi Rope
Last Post: ayoci
04-02-2025, 04:30 PM
» Replies: 0
» Views: 1,545
|
static 2nd attachment cau...
Forum: Obi Rope
Last Post: josemendez
04-02-2025, 07:53 AM
» Replies: 1
» Views: 197
|
|
|
Bug of particle sleep |
Posted by: GuoliZheng - 12-07-2024, 06:02 AM - Forum: Obi Fluid
- Replies (2)
|
 |
Dear Developers,
I have encountered a bug related to particle sleeping, which has caused significant issues in my application scenario. As demonstrated in the video, I initially set the sleep threshold value to 0.5. When particles are emitted at a low height, they correctly enter a sleep state. However, when the emission height is increased, the particles fall to the ground and exhibit slow creeping movements. At this point, I have to increase the sleep threshold to 10 to get them to sleep. The higher the velocity the particles experience during activity, the harder it is for them to sleep, which seems unreasonable.
My particles have a relatively small radius of 0.01m. However, this issue also occurs with larger particles, such as those with radii of 0.03m, 0.05m, and 0.08m. Could you please explain why this happens and how it can be resolved? The burst solver back end also shows this issue, although to a lesser extent.
I look forward to your response.
Best regards,
bug video:↓
https://www.bilibili.com/video/BV1kebHec...782833d31a
|
|
|
Usage of particle position variables |
Posted by: wenhao_zheng - 11-07-2024, 03:12 PM - Forum: Obi Softbody
- Replies (3)
|
 |
hi!
①
I see multiple variables about particle coordinates in IkSolver. They are: positions, restPositions, prevPosition, startPosition.
What is the specific update time for them?
②
In my case,I used two rigid bodies to try to lift the soft body.
Since I can't lift the soft body directly through friction, my design is to use collision detection to update the positions of the particles on the contact surface, so that the outer wall of the soft body is lifted by the rigid body.
For example, as shown in the following code, when OnObiCollision, the y component change of the rigid body is provided to the colliding particles. Although this implementation can make the soft body shake slightly, it still cannot be lifted completely.
If my code implementation is correct, I don't quite understand this problem. In my code, shouldn't the contact surface of the soft body be completely at the same height as the rigid body?
Code: public void OnObiCollision(ObiSolver solver, ObiNativeContactList contacts)
{
collisionnParticleSolverIndexes.Clear();
leftCollisionParticleSolverIndexes.Clear();
rightCollisionParticleSolverIndexes.Clear();
for (int index = 0; index < contacts.count; index++)
{
Oni.Contact contact = contacts[index];
int particleIndexInSolver = solver.simplices[contact.bodyA];
ObiColliderBase collider = colliderWorld.colliderHandles[contact.bodyB].owner;
if (collider.transform == leftClaw)
{
leftCollisionParticleSolverIndexes.Add(particleIndexInSolver);
}
else if (collider.transform == rightClaw)
{
rightCollisionParticleSolverIndexes.Add(particleIndexInSolver);
}
}
isBind = leftCollisionParticleSolverIndexes.Count + rightCollisionParticleSolverIndexes.Count > 400;
if (isBind)
{
float leftClawHeightOffset = leftClaw.transform.position.y - leftClawHeightBuffer;
float rightClawHeightOffset = rightClaw.transform.position.y - rightClawHeightBuffer;
for (int index = 0; index < leftCollisionParticleSolverIndexes.Count; index++)
{
int particleIndex = leftCollisionParticleSolverIndexes[index];
solver.positions[particleIndex] = solver.startPositions[particleIndex] + new Vector4(0, leftClawHeightOffset, 0);
solver.velocities[particleIndex] = Vector4.zero;
solver.angularVelocities[particleIndex] = Vector4.zero;
solver.externalForces[particleIndex] = Vector4.zero;
solver.externalTorques[particleIndex] = Vector4.zero;
}
for (int index = 0; index < rightCollisionParticleSolverIndexes.Count; index++)
{
int particleIndex = rightCollisionParticleSolverIndexes[index];
solver.positions[particleIndex] = solver.startPositions[particleIndex] + new Vector4(0, rightClawHeightOffset, 0);
solver.velocities[particleIndex] = Vector4.zero;
solver.angularVelocities[particleIndex] = Vector4.zero;
solver.externalForces[particleIndex] = Vector4.zero;
solver.externalTorques[particleIndex] = Vector4.zero;
}
}
leftClawHeightBuffer = leftClaw.transform.position.y;
rightClawHeightBuffer = rightClaw.transform.position.y;
}
By the way, in addition to modifying the positions of the contact surface particles during the collision callback, I also tried to provide the particles with additional upward velocity. But I always feel that the particles on the contact surface seem to be given a downward momentum at some point in some way I don't know.
While retaining gravity, I hope to find a way to present the effect of the soft body being stably fixed in the air by external forces. To be honest, the effect I expected is like ObiParticleAttachment, but due to some project reasons, I can't use ObiParticleAttachment.
|
|
|
Burst Error |
Posted by: aallenfx - 08-07-2024, 03:13 PM - Forum: Obi Cloth
- Replies (1)
|
 |
Hey,
I'm getting this import error. In my previous post things worked, then I tried importing a different obi product (obi fluid) and something got corrupted causing errors that won't self-resolve.
https://imgur.com/a/ud40C13
When deleting/re-importing I keep getting this error, for either or both:
Code: Assets\Obi\Scripts\Common\Backends\Burst\DataStructures\NativeMultilevelGrid.cs(74,46): error CS1061: 'UnsafeList<K>' does not contain a definition for 'length' and no accessible extension method 'length' accepting a first argument of type 'UnsafeList<K>' could be found (are you missing a using directive or an assembly reference?)
I'm not sure where it came from since I hadn't changed any core things such as adding assembly asmdef files. I did add new packages like Mathematics/Collections/Burst
Burst is version 1.8.13. Updating to 1.8.16 didn't fix it.
I am using Unity 2022.3.22f1 with Universal Render Pipeline. The error is preventing me from loading the plugin.
|
|
|
Rope between 2 trackers |
Posted by: Xameal - 08-07-2024, 08:44 AM - Forum: Obi Rope
- Replies (3)
|
 |
Hello guys,
I need your help to find out if it's possible to create an Obi Rope between 2 trackers?
The idea is to make an extinguisher with a tracker on the "body" of the extinguisher, and an extinguisher at the end of the extinguisher nozzle with a hose connecting the 2 ends. As shown in the photo.
The problem is that the trackers on Unity (ViveTracker or Meta Quest controllers used as trackers) are always positioned at (0, 0, 0). What's more, the ropes are very sensitive to gravity, collisions etc... And so with the trackers always moving (or almost), the rope has trouble staying in place and does 'tricks'. For example, it always turns like a 'skipping rope' around an axis.
Has anyone tried this before? Do you have any advice for this particular case? I'm sure I'm not the first person to want to create a flexible linked by 2 trackers  .
|
|
|
prevent dynamic attachment from disjointing on re-enable |
Posted by: rystills - 06-07-2024, 11:34 AM - Forum: Obi Rope
- Replies (2)
|
 |
I have a scene set up similarly to the chain sample scene, with a chain attached statically to the ceiling at one end, and dynamically to a rigidbody at the other. In the editor they appear like:
Upon running the game with gravity disabled on the body, the chain is stretched down a bit:
If gravity is enabled on the dynamic body, the chain stretches down further, and the body becomes slightly disjointed from the chain:
Each time the root object containing the solver, chain, and body is disabled and subsequently reenabled, the body becomes further disjointed by the same amount:
This behavior can be replicated by manually disabling / enabling the chain and ball while running the chain sample scene. In my case, I can compensate for the initial disjoint by shifting the body up slightly in the editor, but I'm having trouble preventing the further disjoint on re-enable. Is there a recommended way to prevent/mitigate this behavior?
|
|
|
Resize rope when apply force to attached mass |
Posted by: Jaxel - 04-07-2024, 10:39 AM - Forum: Obi Rope
- Replies (3)
|
 |
Hello! I am using ObiRope to simulate fishing rod with reel.
What i have:
1. Cursor to resize my rope when the player reel in.
2. Hook. Just rigidbody attached dynamically with ObiParticleAttachment at the end of the rope. Static attachment at the fishing rod top point.
I apply force to fishing hook when player cast or fish move with hook. After that my rope will be stretched and i want to prevent this by giving extra length. How can i get the speed of first 1-2 rope particle point and also tension force? How can I compare the current rope tension with the tension at rest? I need these values to calculate resize speed and make more realistic fishing rod behaviour. Or maybe there is other solution for my case?
Thanks for your advices!
|
|
|
|