Latest Threads |
Stretching verts uniforml...
Forum: Obi Softbody
Last Post: josemendez
10 hours ago
» Replies: 1
» Views: 159
|
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
11-09-2025, 01:15 PM
» Replies: 25
» Views: 2,951
|
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 249
|
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 523
|
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 759
|
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 829
|
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 571
|
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 536
|
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 1,041
|
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 880
|
|
|
Unity Job System with Oni |
Posted by: TimLewis - 30-04-2019, 02:48 PM - Forum: General
- Replies (1)
|
 |
Hey Virtual Method guys!
I work for an indie studio using Obi Fluid and Rope in the production of one of our current development projects, so far to fantastic effect!
I've been extending the systems provided to match our game's requirements and so far have implemented things like :
- Container Volumes which allow a container to preserve particles within them, to allow the rest of the particles to have a short lifespan to reduce overhead.
- Fluid makeups within containers to cache the percentages of the fluids within a container, adjusting how much is in each etc.
- Leave stains and trails on collision by writing to a render texture with colour matching from the particles.
And quite a bit more - so far this system has been extremely adaptable and truly you guys deserve a lot of credit for a brilliant system!
This next level of optimisation though is something quite important to the performance of our game, so I wanted to ask your opinions before I committed to it for our next milestone.
We do lots of things with collisions, especially with fluid particle collisions, and some of the more intricate containers in our games are made up of quite a few primitive colliders, and so when subscribing to Oni's collision events like so:
Code: foreach (Oni.Contact contact in e.contacts)
{
// this one is an actual collision:
if (contact.distance < MIN_REQUIRED_PARTICLE_COLLISION_DISTANCE)
{
Component collider;
if (ObiCollider.idToCollider.TryGetValue(contact.other, out collider))
{
}
}
}
we'll sometimes be looping through 7000+ contact points (for multiple containers all full of fluid). While most of these early out since they don't come inside the collision distance (we're also working to 1 Unit = 1metre, however these containers are the size of bowls which are obviously quite small - to the point where the collision distance is tiny (0.0001f)).
One solution I've made with some improvements to performance is to interleave looping contacts over frames (normally around 6 frames per cycle), caching contacts on frame 0 and looping over a chunk of the collisions over the following frames, before resetting after 6.
This isn't ideal though as to scale this we'd start running into collisions being missed! So this got me thinking about multi-threading as a potential next solution.
(Long intro!) So my question is have you experimented with running something like this through Unity's ECS feature? I have some experience using ECS systems, and Unity's one in particular, so I'm comfortable setting that up, however I wanted to know answers to any of these:
1) you had any alternative ideas to multi-threading?
2) you've used Obi with ECS?
3) there is a way to minimize the amount of contacts made (lowering the distance for collisions to be registered in a Solver?
4) masking layers for Oni Collisions, to allow us to only subscribe to collision events between certain layers? (It would be fantastic if I could mask out the collisions so that it was only the Container Volumes 1 trigger volume, and the particles firing collision events).
5) is it possible to subscribe to collision events that happen on particular colliders?
Massively appreciate your time and support on this, as Fluid simulation is quite a large part of our game we're working on, and we'd love to be able to keep going with this solution up to release, so your time is really valuable to me!
Thanks in advance,
Tim
|
|
|
Problem with a rope behavior |
Posted by: Laura - 30-04-2019, 11:56 AM - Forum: Obi Rope
- Replies (2)
|
 |
Hi!
I have a problem with the ropes. I put some ropes in a crane to move a big panel, as you can see in the video.
When the animation moves the crane up, left or right, the ropes have a good behavior, but when the animation moves the crane down the ropes have a strange behavior, and I don´t know why.
[attachment=346]
This is my solver setup.
[attachment=347]
And my rope setup.
[attachment=348]
Thanks in advance.
Laura.
|
|
|
How to Pause Obi Emitters |
Posted by: Komsur - 30-04-2019, 07:38 AM - Forum: Obi Fluid
- Replies (4)
|
 |
Hi,
I've recently bought Obi Fluid and I'm making an oil leak. I wanted to know if there was a way to pause the emitter after one complete emission cycle, and have it stay as it was paused until resolved. If not, is there a way I can do this using references from the source code?
Thanks,
Alex.
|
|
|
Which Obi To Use? |
Posted by: DRRosen3 - 29-04-2019, 11:32 PM - Forum: Obi Rope
- Replies (2)
|
 |
I'm posting this here in the ObiRope section, because my organization has already purchased ObiRope, and we've been attempting to use it to achieve our desired results with no luck. I'm trying to determine whether or not ObiRope is appropriate for other "strand" uses, that are not rope-like. For example, a very long piece of hair attached to a comb would drag behind the comb as it's moving, much like ropes do with ObiRope when they're hanging from something. However, that same strand of hair would also blow about in any breeze. More specifically to what my team is trying to achieve, is with long sheets of paper. Say in game we're trying to simulate the unraveling of a paper towel roll that was thrown. The issue we're running into is the effect of the end of the roll snapping back towards the roll each time it extends away from the roll. This sort of "snap back"/"bounciness"/"spring" effect isn't accurate to paper as it is to a rope. Is there any way we can disable this affect?
If not, would ObiCloth be better suited to our needs? Meaning, could the simulation of paper unraveling from, and flowing behind an airborne roll of paper towel being achieved?
Thanks in advance!
|
|
|
Soft Body Particle Generation Problem |
Posted by: apapaxionga - 28-04-2019, 12:04 AM - Forum: Obi Softbody
- No Replies
|
 |
When I created a fully setup soft body, everything works well. If I change the mesh scale and particle setting, the simulation looks good but sometimes the skin mesh disappear (seems like crashed). The same thing also happened when I changed the mesh object. I did initialize the particle generation everytime I changed something. However, it still happens. How to solve this problem ? For now, I have to delete the whole soft body object and remember all the parameters. Then create a new softbody using the parameters. Then it works.
|
|
|
Obi fluid interaction with Nvidia Flex |
Posted by: VirtroMark - 27-04-2019, 12:35 AM - Forum: Obi Fluid
- Replies (2)
|
 |
Hello,
We have an application that uses Nvidia Flex particle system. We wanted to check if there has been any interaction testing between Nvidia Flex (Cloth) and Obi Fluid. We're coming up with some restrictions for fluid options within Flex-only so we wanted to investigate other solutions for our fluid needs.
Thanks!
|
|
|
Trouble with particle editing and Prefabs. - 2018.3.13f1 |
Posted by: jabza - 26-04-2019, 03:20 PM - Forum: Obi Cloth
- Replies (1)
|
 |
Hello,
I recently updated my project to both ObiCloth 4.1 and Unity 2018.3.
My project uses prefabs, nested prefabs and prefab variants. Whilst working with ObiCloth I have encountered a few issues regarding Obi Pins and Obi Handles.
Defining Pin constraints in the Prefab editor simply does not work. References to the Pin object are not preserved. I am forced to unpack the Prefab, modify the ObiCloth, and re-create the Prefab.
I've noticed a similar problem with Obi Handles, they do not a appear in the hierarchy when creating them.
I think the issue may be in part due to how the Prefab system recognizes objects as 'changed', as modifying many of the ObiCloth attributes does not appear to result in a 'dirtying' of the object, which may be causing some issue elsewhere?
Any support on this would be greatly appreciated.
Thanks in advance. Really impressed with the continued support and enhancement of this fantastic asset!
|
|
|
Normal positions vs Renderable positions |
Posted by: tsantoro - 25-04-2019, 10:49 PM - Forum: Obi Cloth
- Replies (2)
|
 |
Hello.
We're using Obi Cloth in our VR app. There are two pieces of cloth that the user must grab and drop on the floor. So we must check if the controller is within range of a particle to grab the cloth, and if majority of the particles are on the floor.
Previously, we were checking the position of the particles by doing actor.GetParticlePositions().
If I understand correctly, that returns renderable positions, and only works appropriately if you tell the solver of the actor to RequireRenderablePositions? Otherwise those renderable positions don't move if the cloth moves. Then you can call RelinquishRenderablePositions when you're done, and the main reason for that is that renderable positions are a little expensive?
I also discovered an alternative way to do this by calling actor.PullDataFromSolver(ParticleData.POSITIONS), then the actor has a vector3 positions array of all the particles. The documentation referred to this as "normal positions".
Three questions:
- Is that more or less expensive than doing renderable positions?
- If it's less expensive, how often do you have to call PullDataFromSolver()? Every frame?
- And am I on the right track here, or is there a better way we should be checking the position of the particles?
Thank you.
|
|
|
|