Search Forums

(Advanced Search)

Latest Threads
Obi 7 beta
Forum: Announcements
Last Post: spikebor
5 hours ago
» Replies: 1
» Views: 1,694
Compatibility with Fluxy
Forum: Obi Rope
Last Post: Crystalius
9 hours ago
» Replies: 2
» Views: 24
Can Obi bone works with b...
Forum: Obi Rope
Last Post: kodra
Yesterday, 07:25 PM
» Replies: 0
» Views: 10
NullReferenceException Bl...
Forum: Obi Cloth
Last Post: dramatemple
24-04-2024, 04:23 PM
» Replies: 8
» Views: 2,417
IdentifyMovingColliders.E...
Forum: Obi Rope
Last Post: Guillaume
24-04-2024, 08:57 AM
» Replies: 6
» Views: 99
Getting the force acting ...
Forum: Obi Rope
Last Post: josemendez
24-04-2024, 08:40 AM
» Replies: 4
» Views: 86
Obi Rope snake "collision...
Forum: Obi Rope
Last Post: josemendez
24-04-2024, 07:32 AM
» Replies: 1
» Views: 52
Question about garment on...
Forum: Obi Cloth
Last Post: onfitpark
24-04-2024, 04:45 AM
» Replies: 7
» Views: 245
(7.0) New particle shader...
Forum: General
Last Post: kodra
22-04-2024, 07:18 PM
» Replies: 0
» Views: 47
Cloth abnormally twists i...
Forum: Obi Cloth
Last Post: josemendez
22-04-2024, 09:06 AM
» Replies: 5
» Views: 2,540

 
Triste Compatibility with Fluxy
Posted by: Crystalius - Today, 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

Print this item

  Can Obi bone works with bones with scale?
Posted by: kodra - Yesterday, 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?

Print this item

  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,

Print this item

Exclamación 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.


  1. BurstColliderWorld.cellSpans will always grow to at least match the colliderCount (as seen in BurstColliderWorld.SetColliders)
  2. 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
  3. 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)
  4. 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!)
  5. 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)
  6. 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:
  1. bounds[i] which be the size of shapes 
  2. shapes[i] since we matched the size of the initial shapes array
  3. 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!

Print this item

Pregunta Getting the force acting on a Rod
Posted by: astro.domine - 23-04-2024, 08:52 AM - Forum: Obi Rope - Replies (4)

Hello, pretty simple question I was hoping for some help with.

I have a rod; I want to know how much force is acting on one of its elements/particles. That is, how much total force are the constraints exerting (how deformed the rod is).

I don't know how to approach this, outside of doing a clunky measurement of the particle's position vs its rest position. I imagine it involves something to do with reading the constraint batch data in the solver?

Print this item

  Question about garment onto a 3d avatar using Obi
Posted by: onfitpark - 23-04-2024, 07:52 AM - Forum: Obi Cloth - Replies (7)

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! Triste
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. Gran sonrisa lol

Print this item

  (7.0) New particle shader has a lot of variants and they slow down the build
Posted by: kodra - 22-04-2024, 07:18 PM - Forum: General - No Replies

It doesn't seem to be the case for Obi 6.x. In 7.0 there is a new particle shader built with Shader Graph. I'm not against Shader Graph, but this one shader alone takes 90s to compile. Considering it's something not shown in the game usually, that's 90s wasted. Is it possible to work around it?

Also my project doesn't has HDRP, so it shows this "unknown" target. But when I delete it the whole shader gets broken:

   

(not sure if it's related to the compile time tho)

Print this item

  Exclude some particles from mesher (but not from simulation)?
Posted by: kodra - 17-04-2024, 11:28 AM - Forum: Obi Fluid - Replies (1)

Is there a flag on the particle that I can set to make it been excluded from the mesher, but not from the simulation? In other word I'd like the particle to be simulated, but hidden.

Print this item

  The skin backstop changes made through the script are not reflected on the screen.
Posted by: ziziza93 - 17-04-2024, 02:35 AM - Forum: Obi Cloth - Replies (1)

Hello,
I changed the skin backstop value in the blueprint to -0.05 and then back to 0 after 3 seconds.

After running the script, I checked with blueprint edit and the value has changed, but it is not reflected on the screen.
Do I need to run the updater separately?

Code:
        var skinnedCloth = clothInstance.GetComponent<ObiSkinnedCloth>();
        var constraints = skinnedCloth.GetConstraintsByType(Oni.ConstraintType.Skin)
            as ObiConstraints<ObiSkinConstraintsBatch>;
        var skinBatch = constraints.batches[0];
        for (var i = 0; i < skinBatch.activeConstraintCount; ++i)
        {
            skinBatch.skinRadiiBackstop[i * 3 + 2] = -0.05f; // backstop sphere distance
        }
        await Task.Delay(3000);
        for (var i = 0; i < skinBatch.activeConstraintCount; ++i)
        {
            skinBatch.skinRadiiBackstop[i * 3 + 2] = 0;    // backstop sphere distance
        }

Print this item

  Can I manage multiple colliders with a single Obi collider?
Posted by: ziziza93 - 16-04-2024, 04:09 AM - Forum: Obi Cloth - Replies (3)

Hello, I attempted to use a mesh collider in conjunction with the Obi SkinnedCloth, but I ran into performance issues, so I'm looking to utilize sphere colliders instead.
I've succeeded in placing colliders according to the shape of my mesh;
however, I haven't found a way to manage the sphere colliders that were generated through the Obi collider.

As shown in the attached image, is it possible to manage the sphere colliders that were added as game objects with a single Obi collider?



Print this item