Latest Threads |
can you remove particles ...
Forum: Obi Softbody
Last Post: aardworm
09-07-2025, 07:09 AM
» Replies: 0
» Views: 44
|
ObiRope Mesh Renderer
Forum: Obi Rope
Last Post: quent_1982
08-07-2025, 11:27 AM
» Replies: 4
» Views: 202
|
How to dynamically change...
Forum: Obi Rope
Last Post: quent_1982
08-07-2025, 06:34 AM
» Replies: 6
» Views: 358
|
Pipeline that bends
Forum: Obi Softbody
Last Post: josemendez
04-07-2025, 09:52 AM
» Replies: 13
» Views: 1,085
|
How to implement/sync Obi...
Forum: Obi Rope
Last Post: quent_1982
01-07-2025, 01:48 PM
» Replies: 2
» Views: 269
|
Collisions don't work con...
Forum: Obi Rope
Last Post: chenji
27-06-2025, 03:05 AM
» Replies: 3
» Views: 365
|
Force Zone apply differen...
Forum: Obi Rope
Last Post: chenji
26-06-2025, 11:41 AM
» Replies: 11
» Views: 1,015
|
Can I blend in and out of...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 04:42 PM
» Replies: 3
» Views: 329
|
Using a rigidbody/collide...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 09:29 AM
» Replies: 1
» Views: 196
|
Solver is too performance...
Forum: Obi Rope
Last Post: quent_1982
20-06-2025, 08:09 AM
» Replies: 40
» Views: 5,025
|
|
|
Advection but for a mesh. |
Posted by: spikebor - 03-05-2024, 09:28 AM - Forum: Obi Fluid
- Replies (2)
|
 |
I'm thinking about this idea for a while.
We got:
-Obi Fluid which is limited in particle count, making something like a pool will be hard on the GPU.
-Obi fluid can advect things near it, like shuriken particles.
So why can't we apply the same advection idea, but instead of shurikens, we apply it to the nearby mesh vertex?
So the idea is we have a pool of Obi fluid particles, which having very large particle scale, and not rendered.
With this we can have any object that jump into the pool will be physics collide and have buoyancy force to pull it up but with low particle count.
And on top we have a plane mesh for the surface, which advected by the Obi Fluid. This way the mesh can have deformation, this mesh can be Fluxy mesh which have 2.5D sim on top to give us detailed waves simulation, while the Obi Fuild give it bigger wave advection.
Isn't this a best of both world? You can make a bridge asset that have 2 requirements that are Fluxy and Obi Fluid. If you can add underwater rendering for it, it will sell like hot cakes.
|
|
|
Obi Fluid 6 not render on Window build |
Posted by: spikebor - 02-05-2024, 05:07 PM - Forum: Obi Fluid
- Replies (3)
|
 |
Hi, I have this bug when test build on PC Window the Obi Fluid
Obi Fluid 6.5.4, works well on Editor using the Obi/URP/Particles.shader, but not work on PC build (x64 window).
Unity URP 2022.3.16f1
Do I miss any setup step?
Log:
Code: Particle rendering shader not suported.
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
Obi.ObiParticleRenderer:CreateMaterialIfNeeded()
Obi.ObiParticleRenderer:DrawParticles(ObiActor)
Obi.ObiActor:Interpolate()
Obi.ObiSolver:Interpolate(Single, Single)
Obi.ObiUpdater:Interpolate(Single, Single)
Obi.ObiFixedUpdater:Update()
--Stack Trace--
Obi Fluid Renderer not supported in this platform.
UnityEngine.Debug:LogWarning(Object)
Obi.ObiFluidRendererFeature:AddRenderPasses(ScriptableRenderer, RenderingData&)
UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal(RenderPipelineAsset, IntPtr, Object)
|
|
|
I've made a bounce script, but don't know how to optimize |
Posted by: spikebor - 01-05-2024, 12:35 PM - Forum: Obi Softbody
- Replies (3)
|
 |
Hi, the idea is simple, to improve the game feel when character make contact with the softbody.
I would like to have softbody handle OnContact by iterate the contacts and add the incoming contact impulse with a mult value,
so that we can have a squashed feel when character step on a slime.
When it works, it is very cool to look at !
But eventually it can be very easy to spiral into a dead performance degradation, since each time you got contact, you have to iterate the contacts, and then iterate the particles to detect which particle is near to add the bounce force.
For example: 10 contact, 1000 particles, that is 10000 iterations each time we got contact. Wow!
How can I optimize this?
Code: using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;
using Unity.Mathematics;
namespace SPIKE.kIntegration
{
//when got some contact, be squashed by that contact in normal direction
[RequireComponent(typeof(ObiActor))]
public class ObiBouncer : MonoBehaviour
{
[SerializeField] ObiSolver _solver;
[SerializeField] float _propagate = 0.5f, _bounceForceMult = 10,_clampBounceForce=10;
[SerializeField] bool _debug;
ObiActor actor;
void Awake()
{
actor = GetComponent<ObiActor>();
}
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)
{
Vector3 contactOnCollider = contact.pointB;
contactOnCollider = _solver.transform.TransformPoint(contactOnCollider);
Vector3 contactNm = contact.normal;
#if UNITY_EDITOR
if (_debug)
{
Debug.DrawLine(contactOnCollider, contactOnCollider + contactNm, Color.yellow, 2f);
}
#endif
//iterate the particles
for (int i = 0; i < actor.solverIndices.Length; ++i)
{
int solverIndex = actor.solverIndices[i];
//add bounce force based on the propagate distance
if (Vector3.Distance(actor.GetParticlePosition(solverIndex), contactOnCollider)
< _propagate)
{
var squashForce = contact.normal * math.min( contact.normalImpulse * _bounceForceMult,_clampBounceForce);
actor.solver.velocities[solverIndex] += squashForce;
}
}
}
}
}
}
}
|
|
|
Prefab Creation & Cable Length with Rigidbodies |
Posted by: Sky d - 01-05-2024, 10:21 AM - Forum: Obi Rope
- Replies (5)
|
 |
Hello. I'm creating audio cables with physics and connectors for my XR project. Thanks for the amazing tool.
I have 2 questions.
1. I already attached my rigidbodies on each end of the rope, but now I realize I need to make the rope longer. How can I do that without needing to reposition and attach the precisely placed rigidbody cable connectors?
2. After I make my master cable which has the two connectors, how can I safely create a prefab that I can re-use over and over? The cables I'm making also have custom snap functions that connect them to other gameobjects, so it's important that both ends are able to be freely manipulated by the player in VR. The goal here is to have different length & color coded prefab cables for the player to use. With each level, I hope to be able to just drop them in the heirachy going forward.
|
|
|
Feedback on improving the blueprint trouble shooting. |
Posted by: spikebor - 29-04-2024, 06:07 PM - Forum: Obi Softbody
- Replies (2)
|
 |
Hi, I'm having trouble about floating vertex (not assigned to any particle) for the Softbody blueprint.
This is the Slime in normal play mode.
![[Image: MPajWXr.png]](https://i.imgur.com/MPajWXr.png)
When I turn off deformation resistance, I can see the floating vertices.
![[Image: pSrPRsY.png]](https://i.imgur.com/pSrPRsY.png)
Now go to the blueprint, in the Bone mode, I can see very well the spine bone is having affection on which particles.
![[Image: 9duoacf.png]](https://i.imgur.com/9duoacf.png)
But in the Volume mode, no matter what bone I select, I don't see any feedback that which particle is affected by that bone. Everything is white.
But why is that?
![[Image: hpO3P5K.png]](https://i.imgur.com/hpO3P5K.png)
To sum up, the problem is I have floating vertices, and I don't see any way to control them, to include them to the bone.
I suggest for a feature that list out all the floating vertices on a button click, and isolate them for easy painting, then can assign them to bones by manual painting as always, after done the painting, click a button to exit the isolation.
|
|
|
|