Latest Threads |
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
Yesterday, 01:15 PM
» Replies: 25
» Views: 2,417
|
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 117
|
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 350
|
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 616
|
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 708
|
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 466
|
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 454
|
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 927
|
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 792
|
Is it possible to impleme...
Forum: Obi Rope
Last Post: chenji
27-08-2025, 10:13 AM
» Replies: 2
» Views: 709
|
|
|
Please check out this model, I can't generate Full Body data for it |
Posted by: spikebor - 28-04-2024, 12:28 PM - Forum: Obi Softbody
- Replies (4)
|
 |
Softbody version 6.5.4
I have test with another character, it can generate just fine.
But this Slime model can not, I have no idea.
This is the error shown:
Code: IndexOutOfRangeException: Index was outside the bounds of the array.
Obi.ObiSoftbodySurfaceBlueprint+<InsertParticlesIntoVoxels>d__42.MoveNext () (at Assets/Obi/Scripts/Softbody/Blueprints/ObiSoftbodySurfaceBlueprint.cs:323)
Obi.ObiSoftbodySurfaceBlueprint+<Initialize>d__37.MoveNext () (at Assets/Obi/Scripts/Softbody/Blueprints/ObiSoftbodySurfaceBlueprint.cs:168)
Code: NullReferenceException: Object reference not set to an instance of an object
Obi.ObiActorBlueprintEditor.Refresh () (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:416)
Obi.ObiActorBlueprintEditor.Generate () (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:132)
I have created a thread like this in a long time, but I think this is new error, since the old error is patched I supposed.
Link https://drive.google.com/file/d/13TqlniB...sp=sharing
|
|
|
Debug Collisions position and normal |
Posted by: spikebor - 28-04-2024, 09:19 AM - Forum: General
- Replies (3)
|
 |
Hi there, I can use this code to collide with the Obi softbody and push my character up,
I just have a problem with debugging the collision position and normal.
In this picture, the yellow line is the debug line, it does not look like it's drawing correct contact position or normal.
From my understanding, using solver.transform.TransformPoint and solver.transform.TransformDirection is the way to convert those local data to world space, but why it's incorrect?
![[Image: 3uIgNQo.png]](https://i.imgur.com/3uIgNQo.png)
Code: [RequireComponent(typeof(ObiSolver))]
public class ObiCollisionEventHandler : MonoBehaviour
{
[SerializeField] UnityEngine.Events.UnityEvent<Collider,Vector3,Vector3> _onCollision;
[SerializeField] float _minImpulse=0.1f;
[SerializeField] bool _debug;
ObiSolver solver;
void Awake()
{
solver = GetComponent<ObiSolver>();
}
void OnEnable()
{
solver.OnCollision += Solver_OnCollision;
}
void OnDisable()
{
solver.OnCollision -= Solver_OnCollision;
}
void Solver_OnCollision(object sender, ObiSolver.ObiCollisionEventArgs e)
{
var world = ObiColliderWorld.GetInstance();
// just iterate over all contacts in the current frame:
foreach (Oni.Contact contact in e.contacts)
{
// if this one is an actual collision:
if (contact.distance < 0.01)
{
if (contact.normalImpulse < _minImpulse) continue;
Vector3 contactMid = (contact.pointA + contact.pointB) / 2f;
contactMid = solver.transform.TransformPoint(contactMid);
Vector3 contactNm = contact.normal.normalized;
contactNm = solver.transform.TransformDirection(contactNm);
#if UNITY_EDITOR
if (_debug) {
Debug.DrawLine(contactMid, contactMid + contactNm, Color.yellow, 2f);
}
#endif
var obiCol = world.colliderHandles[contact.bodyB].owner as ObiCollider;
if (obiCol != null)
{
// do something with the collider.
_onCollision?.Invoke(obiCol.sourceCollider, contactMid, contactNm);
}
}
}
}
}
|
|
|
Compatibility with Fluxy |
Posted by: Crystalius - 27-04-2024, 01:05 AM - Forum: Obi Rope
- Replies (2)
|
 |
Hello. My project breaks and opens only in safe mode after installing Obi Rope. I believe it has something to do with Fluxy as I have it in the project too and one of the errors mentioned Fluxy. I've never had this error with Fluxy before.
I've deleted the Fluxy character controller folder in samples that produced the error, error disappeared, but I still get these 2 other errors, I'm stuck and the project is broken, unfortunately.
1. 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?)
2. Failed to find entry-points:
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Obi.Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.Exception: Failed to resolve assembly 'Obi.Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' in directories: C:\Program Files\Unity\Hub\Editor\2022.3.21f1\Editor\Data\MonoBleedingEdge\lib\mono\unityjit-win32
Full error makes flags this message and doesn't let me post it. So I can pm it to you if requested
Unity 2022.3.21
|
|
|
Can Obi bone works with bones with scale? |
Posted by: kodra - 26-04-2024, 07:25 PM - Forum: Obi Rope
- No Replies
|
 |
From what I've observed, Obi bone always works very unexpected when the original skeletal animation has scales on bones. Is there any way to make it work? I thought particles have only positions and velocities, so in theory they can just ignore scales, right?
|
|
|
Obi Rope snake "collision". |
Posted by: BCC_Gummybear - 23-04-2024, 11:06 PM - Forum: Obi Rope
- Replies (1)
|
 |
Hello, I am trying to find a way to simulate collision or resistance through proximity instead of Obi colliders. I have been working with the snake controller from Obi rope and thought I would attempt to make a snake that can move on the surface of water. This obviously would require my water to be a mesh object and have an Obi collider. I would like to avoid that.
To make objects float/roll with waves I currently search for the height of the water at that position of my object. I generated multiple colliders that float on the water around the snake and it worked but not very well.
I was wondering if there is a way to use distance fields with transforms instead of colliders. Something that isn't a hard collision but more of an add forcer per rope particle to move towards the transform position I apply.
Any ideas are helpful!
Thanks,
|
|
|
IdentifyMovingColliders.Execute OutOfBound crash |
Posted by: Guillaume - 23-04-2024, 05:12 PM - Forum: Obi Rope
- Replies (6)
|
 |
Hi!
We recently had a crash in a obi job "IdentifyMovingColliders.Execute" (see attached picture to have the exact line).
We are using Obi Rope 6.4 but the code I'll talks about remains the same in 6.5
After few investigation, the crash seems to happen when for some reasons we loaded, then unloaded some scenes containing colliders without letting them do the UpdateIfNeeded on the tracker. By doing this, the shapes remaings zeroed (just allocated).
I wanted to check what was the initial cause of the bug by reading a bit more the sourcecode, and there is something I'm missing.
- BurstColliderWorld.cellSpans will always grow to at least match the colliderCount (as seen in BurstColliderWorld.SetColliders)
- When preparing the IdentifyMovingColliders parralel for job (inside BurstColliderWorld.UpdateWorld), we transfer ObiColliderWorld.colliderShapes into a NativeArray by doing so:
shapes = world.colliderShapes.AsNativeArray<BurstColliderShape>(cellSpans.count).
We then have a shapes native array matching the cellSpans.count... but not world.colliderShapes.count
- Then we schedule the parrallel for with cellSpans.count as parameter, so we are iterating on non initialized or removed shapes sometimes (since cellSpans.count >= colliderShapes.count)
- Since we loaded/unloaded the shapes without them having time to UpdateIfNeeded, the shape.materialIndex stay at 0 (and the other parameters of the shape are zero-ed too!)
- We then test shapes[i].materialIndex >= 0 which is true (since we are not using material, we should have put a -1 in the skipped UpdateIfNeeded)
- Then we crash on the line velocityBounds.Expand(collisionMaterials[shapes[i].materialIndex].stickDistance); since collisionMaterials is empty (that make me think we should use materials for our ropes!)
I don't understand why we are basing the parrallel for on cellSpans.count rather than world.colliderShapes.count, because here this parrallel for will always access some "old shape data" and process them while it's not necessary.
But maybe I'm missing something here!
The code I would see in BurstColliderWorld.UpdateWorld:
Code: var identifyMoving = new IdentifyMovingColliders
{
movingColliders = movingColliders.AsParallelWriter(),
shapes = world.colliderShapes.AsNativeArray<BurstColliderShape>(), // <--- Match the world.colliderShapes count
// instead of: shapes = world.colliderShapes.AsNativeArray<BurstColliderShape>(cellSpans.count),
rigidbodies = world.rigidbodies.AsNativeArray<BurstRigidbody>(),
collisionMaterials = world.collisionMaterials.AsNativeArray<BurstCollisionMaterial>(),
bounds = world.colliderAabbs.AsNativeArray<BurstAabb>(), // <--- same here
// instead of: bounds = world.colliderAabbs.AsNativeArray<BurstAabb>(cellSpans.count),
cellIndices = cellSpans.AsNativeArray<BurstCellSpan>(),
colliderCount = colliderCount,
dt = deltaTime
};
JobHandle movingHandle = identifyMoving.Schedule(colliderCount, 128); // <--- instead of (cellSpans.count, 128)
Then in the Execute code I think we will not go out of bounds since "i" is only used on:
- bounds[i] which be the size of shapes
- shapes[i] since we matched the size of the initial shapes array
- shapes[i].materialIndex >= 0 test will always be relevent since we are not iterating on a "ghost" shape that could have been added to the shapes, then removed before doing the UpdateIfNeeded thing (since UpdateIfNeeded is called in the ObiColliderWorld.GetInstance().UpdateColliders(); during the ObiUpdater.BeginStep)
Code: protected void BeginStep(float stepDeltaTime)
{
using (m_BeginStepPerfMarker.Auto())
{
// Update colliders right before collision detection:
ObiColliderWorld.GetInstance().UpdateColliders(); // <----- This is where UpdateIfNeeded are call, where shapes are filled with correct values
ObiColliderWorld.GetInstance().UpdateRigidbodies(solvers,stepDeltaTime);
ObiColliderWorld.GetInstance().UpdateWorld(stepDeltaTime); // <------ This is where the IdentifyMovingColliders parrallel for takes place
Do you also think that this parrallel for is doing too much loop/work over time?
(maybe there are also other jobbed thing that do the same, but maybe I'm missing why)
Thanks!
|
|
|
Question about garment onto a 3d avatar using Obi |
Posted by: onfitpark - 23-04-2024, 07:52 AM - Forum: Obi Cloth
- Replies (26)
|
 |
Hi, I'm a newbie! and diving into this amazing asset!
What I'm trying to do is make a 3d avatar wearing obi applied-clothes "realistic".
Reason why I use this term is that I desperately need your help regarding blueprint and/or solver setting which decides the condition of a garment on the 3d world.
When I apply obi skinnedcloth seems like a bit hardware(like cans, or object etc) is placed on the avatar surface, and using obi cloth seems like banding slowly dropping down towards the ground. Probably affected by too much gravity I think.
When I use obi skinnedcloth and its blueprint, I adjust skin backstop(-0.005~-0.001) and skin radius(0.02~0.05) and it's all I do right now.
Using cloth blueprint, I see the garment pass through the avatar body bcuz the avatar has only mesh collider which is not changeable so that I use neither capsule nor sphere collider! 
The body has Mesh Collider, Obi Collider with HighFriction, Rigidbody, and Obi Rigidbody.
Still trying to make the garment more soft, sophisticated, natural playing with blueprint back and forth.
Should I keep doing with blueprint setting in detail?
Objects are all fbx from 3d modeling tools.
I refer to various tutorials and I reached to all the way here...still struggling with them.
The ultimate goal is to show the avatar is wearing "fabric clothes". That's all.
I wanna listen to your advice, and if you have any ideas worth with, please comment me!
Thank you
p.s. I'm working on a t shirt by the way. lol
|
|
|
|