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
|
|
|
Problems deleting obi colliders with pin constraints |
Posted by: btduser - 12-05-2024, 07:29 AM - Forum: Obi Rope
- Replies (7)
|
 |
Hello, I'm trying to do something seemingly trivial - to cleanly delete an object with an ObiCollider and not have my pin constraints blow up - but apparently it's complicated.
I'm creating these pins via scripting, following examples from the documentation. The pinning works fine until I destroy a collider in my scene. When that happens, my console starts getting spammed with the following:
Code: System.IndexOutOfRangeException: Index 15 is out of range of '15' Length.
This Exception was thrown from a job compiled with Burst, which has limited exception support.
[redacted rest due to forum anti-spam]
After a lot of excruciatingly painful debugging, I finally have an idea of why this is happening, but no idea how to proceed.
From what I have gathered, the issue is due to the fact that when I destroy (or disable) a collider, this changes the number of items in `ObiColliderWorld.instance.colliderHandles`, but the collider handle indexes in the pin constraints don't ever get updated. This also happens if I disable the object. Presumably because in either case, `ObiColliderBase.RemoveCollider` is invoked, which modifies the collider handle list.
This either spams burst errors or causes the rope to jump to completely unrelated obi colliders. Even just disabling and re-enabling an obi collider will steal ropes from other objects - e.g. if I have 10 colliders in my scene, with a pin on collider A at index 9, disabling collider B at index 5 rearranges the list so that A is now at index 8 and index 9 is invalid, which will spam errors until I re-enable B, which causes B to get assigned index 9 again, and now the pin is pointing to B instead of A.
I have no idea how to proceed. I've tried deleting the collider at different steps of the process (using the actor callbacks) in case it was timing-related, but the issue persists. Explicitly calling `rope.SetConstraintsDirty(Oni.ConstraintType.Pin);` after destroying my object doesn't seem to fix anything either.
I don't know what I'm doing wrong - it seems like the issue is a fundamental one, that removing any collider in the scene has the potential to break completely unrelated pin constraints. The only solution I can think of is to modify my pins any time any obi collider is destroyed, but I don't see how that's feasible, since there's no way to make pins immediately aware of the change.
I'm using obi 6.5.4 with burst backend (burst 1.8.14), and the problem persists with oni backend as well (ropes just jump to wrong colliders instead of throwing exceptions). I'm basically at my wit's end here - any help is appreciated.
|
|
|
Can ObiBone work with Softbody? |
Posted by: spikebor - 08-05-2024, 03:36 PM - Forum: Obi Softbody
- No Replies
|
 |
Hi, I have this dummy.
![[Image: 35A5URH.png]](https://i.imgur.com/35A5URH.png)
I want to have the bag part to use softbody, and other rigid part to use ObiBone.
So far, after the setup and bind skin, I notice only the softbody takes effect, even though I had painted the influence for the rigid part black.
I think using both in a setup will be neat, the ObiBone can simulate the part is black, not just ignored completely.
So that's like a wishlist for new feature.
For now, I'll use a fullbody softbody setup and attach the rigid part to bone.
The downside of this setup versus ObiBone is obi bone is much more alive, if you collide with the environment the bone will bend.
The fullbody softbody can bend ofcourse, but the rigid part of it which attached to character bone will stay rigid.
If there is any better ideas please tell me, thanks.
|
|
|
OBI7 Surface Texture Rendering (Lava) discussion |
Posted by: spikebor - 07-05-2024, 03:40 PM - Forum: Obi Fluid
- Replies (16)
|
 |
Hi, I'm unable to edit the Foam shader, but I have a suggestion, try this if you're interested.
Using 1 Alpha + Life time info as threshold (0-1) will result in dissolve effect
If you can change the foam shader into this, we can have 5x-10x bigger foam, more coverage and dissolve effect over time with lesser foam count.
I've pack a texture that have parabol for main alpha ® + foam alpha circle (G) + foam alpha directional (B) as dissolve step.
The texture is made in Substance Designer, is free to pack into the final Obi package if you want.
https://drive.google.com/file/d/1aLCCs3I...sp=sharing
If you can pass the foam movement direction as UV, can use the B channel, else can use G channel.
|
|
|
Frequent crash after assign the FluidPassCompute |
Posted by: spikebor - 07-05-2024, 10:51 AM - Forum: Obi Fluid
- Replies (11)
|
 |
Before I add the FluidPassCompute, the Fluid only crash when I give it too small voxel size and/or too small Max Surface Chunks value.
But after adding the FluidPassCompute, I have many frequent crash (suppose not related to above fields since I've adjusted them)
Now it's likely crash when I enter or exit Play mode.
The log when crashed
Code: D3D11: Failed to create RenderTexture (8 x 8 fmt 9 aa 1), error 0x887a0005
D3D11: Failed to create RenderTexture (8 x 8 fmt 53 aa 1), error 0x887a0005
d3d11: failed to create staging 2D texture w=64 h=64 d3dfmt=2 [887a0005]
Failed to present D3D11 swapchain due to device reset/removed.This error can happen if you draw or dispatch very expensive workloads to the GPU, which can cause Windows to detect a GPU Timeout and reset the device. (see https://docs.microsoft.com/en-us/windows-hardware/drivers/display/timeout-detection-and-recovery).If you believe this error is due to built-in Unity functionality, please submit a bug.This is an unrecoverable error and the editor will shut down.
Also, this is the error in that is frequently shown after I added the FluidPassCompute asset.
Code: RTHandle.Initialize should only be called once before allocating any Render Texture. This may be caused by an unreleased RTHandle resource.
Unreleased RTHandles:
_Foam
UnityEngine.Rendering.RTHandles:Initialize (int,int,bool)
Obi.ObiFluidRendererFeature:Create () (at Assets/Obi/Scripts/Fluid/Rendering/URP/ObiFluidRendererFeature.cs:27)
UnityEngine.Rendering.Universal.UniversalAdditionalCameraData:OnDestroy () (at Library/PackageCache/com.unity.render-pipelines.universal@14.0.9/Runtime/UniversalAdditionalCameraData.cs:819)
Full Editor Log in the attachment.
Don't know why I can't add attachment (it rotating icon), link https://drive.google.com/file/d/18iCalYf...sp=sharing
|
|
|
(7.0) Still confused about how Obi physics updates in 7.0 |
Posted by: kodra - 07-05-2024, 09:38 AM - Forum: General
- Replies (4)
|
 |
Quote:In Obi 7 all solvers always run in parallel. Simulation starts in LateUpdate(), while still using a fixed timestep. This combines the best features from all ObiUpdater flavors and simplifies setup, as a result, the ObiUpdater component has been removed.
I still don't get it. LateUpdate() is called every frame. It's frame rate dependent. Then how Obi solvers runs in LateUpdate() while using a fixed timestep at the same time?
If I have game logic in LateUpate() (for example, update the bone's position), does Obi solver updates before or after it?
|
|
|
Obi7 | I made a pool |
Posted by: spikebor - 07-05-2024, 06:10 AM - Forum: Obi Fluid
- Replies (5)
|
 |
So happy I can make a pool now 
This is not able with earlier versions of Obi whoo.
I'm just testing with a pool size width 20x10 height 3m
To cover this pool, I used extremely big particle (resolution 0.02, count 15k) on a RTX 3070.
Tbh I do not expect a swap chain crash with just 15k particle, since Unity CPU shuriken only has problem at 10k, so I don't think 15k is heavy for GPU.
But the pool will crash when it about to reach 11k particle.
After more testing, I found out this crash is about the Memory Budget foldout. After I set Max Surface Chunks to 150k (425mb) it can run now, but the GPU cry for help 
This is a very important part that will crash Unity if not properly set, so I suggest: when the Emitter detect user give it a very big particle count blueprint, can show a big red warning box telling user must scale the max Surface Chunks accordingly, or even better, suggest a value to set.
Also, in PlayMode the Solver only show Chunks and memory we set, not the Chunks and memory we used up.
Suggest adding to the display used up Chunks / set Chunks . With that I can set the Max Surface Chunks with better value. For now, I can only blindly set. The values I set may be much more than it actually need.
Window Build test: 20ms for this pool, optimization tips please?
Btw, the pool is there, I'll move next to scripting buoyancy, if you please can give some demo code about adding force based on character volume displacement inside the Fluid that would be big help!
|
|
|
|