|
|
Burst not installed? |
Posted by: Barliesque - 16-07-2024, 01:16 AM - Forum: Obi Fluid
- Replies (6)
|
 |
I'm getting pretty poor performance, which I'm guessing is due to Burst apparently not being active.
The BurstCollisionWorld script is disabled because OBI_BURST is undefined. I see that the Obi asmdef defines it, as long as the installed version of Burst is at least 1.2.3-verified. Burst 1.8.12 is installed in the project, so I don't understand what the issue is. Any help would be greatly appreciated!
|
|
|
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  .
|
|
|
|