20-06-2017, 09:37 AM
(This post was last modified: 20-06-2017, 09:38 AM by josemendez.)
Hi David,
Unfortunately it is not possible to add custom colliders, at least not with good performance. This is because collision detection/resolution is implemented using SIMD vector instructions inside Obi's C++ lib, to which you don´t have access. It's either flexibility or performance, so we went with performance in this case.
You could get particle positions/velocities every frame and implement your own collision detection in C#, but it will be challenging to get it running at an acceptable speed for more than a couple thousand particles.
MeshColliders are fully supported by default, though.
------
Regarding fluids, keep in mind that Obi is a particle-based simulation that runs in the CPU. This means you´ll be able to simulate no more than 10000 particles in realtime in a desktop platform (not making an ocean with it, unfortunately).
Good news is that rigidbody buoyancy just works. Dense (heavy) rigidbodies will automatically sink and light ones will rise. Inter-fluid buoyancy (due to density gradient) also works out of the box. Dense fluids will sink and lighter ones will rise. See:
https://www.youtube.com/watch?v=gnYZc9558m0
Box and sphere shaped emitters are included, so you can easily create box-shaped fluid zones.
-----
Softbodies are WIP right now. Don´t have an ETA yet, but will announce them when they're mature enough.
cheers,
Unfortunately it is not possible to add custom colliders, at least not with good performance. This is because collision detection/resolution is implemented using SIMD vector instructions inside Obi's C++ lib, to which you don´t have access. It's either flexibility or performance, so we went with performance in this case.
You could get particle positions/velocities every frame and implement your own collision detection in C#, but it will be challenging to get it running at an acceptable speed for more than a couple thousand particles.
MeshColliders are fully supported by default, though.
------
Regarding fluids, keep in mind that Obi is a particle-based simulation that runs in the CPU. This means you´ll be able to simulate no more than 10000 particles in realtime in a desktop platform (not making an ocean with it, unfortunately).
Good news is that rigidbody buoyancy just works. Dense (heavy) rigidbodies will automatically sink and light ones will rise. Inter-fluid buoyancy (due to density gradient) also works out of the box. Dense fluids will sink and lighter ones will rise. See:
https://www.youtube.com/watch?v=gnYZc9558m0
Box and sphere shaped emitters are included, so you can easily create box-shaped fluid zones.
-----
Softbodies are WIP right now. Don´t have an ETA yet, but will announce them when they're mature enough.
cheers,