Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Assets Obi Particle Based Physics (Cloth, Rope, Fluid) thread

Discussion in 'Works In Progress' started by arkano22, Jun 30, 2015.

?

Performance vs compatibility

Poll closed Oct 9, 2015.
  1. I don't care about performance, keep my data intact please.

    0 vote(s)
    0.0%
  2. I don't care if I have to re-do some stuff, as long as it runs faster.

    14 vote(s)
    100.0%
  1. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Hi there!

    We´ve FINALLY uploaded Obi Cloth 3.0 to the Asset Store and we are waiting for validation. It has been a lot of work, phew.

    Also, we now have a blog! To get a feel of what to expect from 3.0, take a look at this post:
    http://blog.virtualmethodstudio.com/2017/01/obi-cloth-3-0-for-unity-whats-new/

    Finally, we have also set up a project hub at Taiga:
    https://tree.taiga.io/project/virtualmethod-obi/

    If you wish to contribute bug reports, or wishes/suggestions, you can create a free Taiga account and start doing so.

    thanks a lot to everyone :)
     
  2. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Hi Grosnus, it will be available in 5-7 days at most. It has been uploaded to the Asset Store, it now depends on how long it takes for the guys at Unity to publish it.
     
    kurotatsu likes this.
  3. invadererik

    invadererik

    Joined:
    Oct 31, 2010
    Posts:
    140
    Yay so excited !
     
  4. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,999
    I'm digging the new features! Including wobbly skin similar to how it is done in games like EA UFC 2... can't wait to use this in my game
     
  5. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    653
    Hello. I'm excited to get my hands on version 3.0!

    A while ago you were talking about a method for simulating skinned meshes called something like "Latching" where a subset of vertices in the skinned mesh would be simulated, and the others would latch on to the nearest simulated vertex.

    Did you decided to drop this method in favour of the skinned mesh proxys?

    On the subject of skinned mesh proxy simulation. Can the simulation mesh it's self be skinned? Or does that on have to be a pure cloth simulation, presumable hung off one bone?
     
  6. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,270
    yes, this works well. There is a "backstop" setting that prevents the clothing mesh going too fair inside the model…. I think he has a video on his youtube channel, a guy wearing a "shirt" that is Obi-ized.
     
  7. james14123

    james14123

    Joined:
    Jan 22, 2017
    Posts:
    20
    Hi
    i try to make cloth moving with the body in dynamic. Now i can make the cloth colliding in static.
    But when the body start to move, the cloth doesn't move with the body. Can u give some advice? Thanks!
     
  8. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,192
    Just wanted to say that Obi Cloth 3 sounds like it will be great! :)
     
    kurotatsu likes this.
  9. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Hi Zomby!

    Proxies in 3.0 actually work using the latching concept, unlike they did in 2.x. The idea is:

    - For each vertex in the target (driven) mesh, find the closest triangle in the source (simulation) mesh.
    - Calculate the barycentric coordinates and elevation of that vertex relative to its closest triangle.
    - During simulation: enforce that the vertex elevation and bary coords must be kept constant relative to the simulated triangle.

    The simulated and the source mesh can be the same, and yes it can be skinned. In the trenchcoat demo, that's exactly the case: The whole trenchcoat is skinned to the character. The inner side of it is simulated, while the outer layer (including pockets) is latched to the inner layer. The upper part of the trenchcoat (torso and arms) has been optimized out of the simulation and is just skinned to the skeleton.

    Using more proxies, you could latch a second, third, fourth independent mesh to the trenchcoat to add more detail in the form of, say: badges, pockets, whatever.

    Performance wise, latching is quite fast. It can be done in parallel since it is an independent operation for each target vertex, and the math isn´t very complex. Just three dot products (for position, normal and tangent) and a 3x3 matrix multiplication per vertex.
     
    Last edited: Jan 29, 2017
    Zomby138 and hopeful like this.
  10. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,439
    It will be interesting to see how much compute shaders get used on less powerful devices going forwards. Because in Unity compute shaders are not only for windows and desktop-class GPU's anymore. DX11 & 12 already supported, OpenGL 4.3 on Linux and Windows already supported, PS4 and Xbox One already supported. OpenGL ES 3.1 on Android already supported. MacOS and iOS supported on devices that support metal as of Unity 5.6 which is in beta right now.

    This does not detract from your point about processing power, only platform compatibility. But some very basic tests I've already done with compute shaders on an ipad pro do bode well for the prospects of this stuff having uses on lesser powered devices.
     
  11. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Hi there!

    Yes, the future seems bright for compute shaders :). I haven´t done any experiments with them yet (mainly because I develop in OS X and it's the last platform to receive compute shader support) but will surely like to take a look and evaluate ways to use them soon.
     
    elbows likes this.
  12. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,999


    This has got to be the COOLEST thing I've seen in Unity yet... does this mean I will be able to simulate rippling skin such as from a guy getting punched? If so, what is the speed of this
     
    Arganth and nipoco like this.
  13. nipoco

    nipoco

    Joined:
    Sep 1, 2011
    Posts:
    2,008
    I wondering if the Per-particle skin stiffness works with collisions?
     
    Arganth likes this.
  14. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Basically yes :). This particular scene runs at about 200 fps in my setup (core i5, two cores). Particles still can receive collisions from the environment, and influence it. The only thing that could be an issue in this scenario is particle size vs fist size, you´d have to ensure they're big enough to capture the collision.
     
    Arganth and nipoco like this.
  15. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,999
    Good to know. Because I play a lot of EA Sports games and some of the games have exactly this. Can't wait to take Obi for a test
     
  16. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    305
    I haven't gone through the pages, so I'm just going to ask.

    I have a rigged cloth/hair/skirts. Using joints doesn't produce the most preferable result as they almost always go wonky when colliders are small (0.01). Using U5 native cloths, well... :)

    Is there anyway to use the vertex weight from the rig, and apply to Obi Cloth? Or do I still need to re-set them up?
     
  17. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    728
    Yay! So I'll just go ahead and ask again my ritual question (once every few months) if you don't mind... :) Is Obi cloth compatible with Xbox One yet?

    I'd really love to use it on Ghost of a Tale...

     
    KRGraphics likes this.
  18. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,999
    I would love to see how it handles on a mouse. And nice grass... I need to improve mine :)
     
    Seith likes this.
  19. fink1

    fink1

    Joined:
    Dec 17, 2016
    Posts:
    4
    Hi,

    I have a problem. Any new object does not interact with obi objects in sample scenes. Also, if I create a new obi object in new scene, this facility also does not interact with anything, just falling down through all the objects of the scene. For example, sample scene ClothSoftbody works fine (first picture). But my red sphere passes through the soft body. If applied to a red sphere obi plugin, it also passes through it. I fixed one particle of red sphere that it has not fallen down (second picture).



    --
    Unity 5.4.1f1
    Obi Cloth Simulation 2.2
    --
     
  20. Grosnus

    Grosnus

    Joined:
    Mar 4, 2015
    Posts:
    17
    Hey, does Obi v3 include any way to globally and efficiently activate/deactive simulation?
    I use a streaming system that loads chunks of objects in player radius so basically everything in game is dynamically loaded, including other players.
    User has to be able to turn on/off cloth system in settings UI (for performance reasons and when that happens all skinned meshes have to fallback to regular skinning based on bones), so it's going to be important to not have any heavy operation happening when objects are loaded, or players/npc are spawned.
     
    Last edited: Feb 1, 2017
  21. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Hi Grosnus,

    Just activate/deactivate your cloth objects. That skips all the simulation, and reverts the mesh to its original, rest state. Also you can deactivate the solver and that will also deactivate the simulation, but freezing meshes in their current state instead (since they are still technically a cloth object, but the solver in charge of updating them is off)

    If you have multiple cloth objects/solvers and want to deactivate them all at once, just use Unity's
    FindObjectsOfType() and iterate trough the results.

    Note that this is not exclusive to Obi v3, it works this way since v1.
     
  22. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Hi Fink,

    Probably you have your objects and clothes in the same layer. They have to be in separate layers for collisions to be detected. Take a look at this:
    http://obi.virtualmethodstudio.com/collisions.html
     
  23. fink1

    fink1

    Joined:
    Dec 17, 2016
    Posts:
    4
    Oh, sorry, I'm an idiot. I solved my problem. The problem was in confusion of names solvers and collider group.
     
    Last edited: Feb 2, 2017
  24. Grosnus

    Grosnus

    Joined:
    Mar 4, 2015
    Posts:
    17
    Thanks for reply, one more question - does Obi support LODGroups?
     
  25. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Hi Grosnus,

    No, LOD simulation is not currently automatically supported. You could do it manually however, it would involve generating multiple topologies and cloth objects, one per each LOD level. You can then turn off all of them except one, based on distance to camera, quality settings, or any other condition.
     
    KRGraphics likes this.
  26. fek

    fek

    Joined:
    Sep 14, 2015
    Posts:
    13
    Is it possible to add an obi cloth component to a mesh loaded into the game at runtime? Or is there some sort of pre-processing / baking that must be done in the editor?

    For instance, if my game lets the player choose from a variety of custom body parts / accessories (which are loaded from external AssetBundles), can the user choose their body parts, the game loads them all in, then I apply obi cloth to the body parts at runtime, with jiggly bits determined by something like bone weights / uv coordinates / some arbitrary calculations?

    Thanks!
     
    RoyArtorius likes this.
  27. RoyArtorius

    RoyArtorius

    Joined:
    Jul 11, 2013
    Posts:
    70
    That is an impressive looking update!

    This is also something that I would like to know for similar reasons. I even think I know your game fek, it's on Patreon yes?
     
  28. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Hi Fek,

    You can add the cloth at runtime. However, baking the mesh topology can take a while depending on the size of your mesh, so if you know beforehand which meshes you´ll need to add cloth to (i.e non procedural meshes) you can create them beforehand in-editor. Once generated, the topology is just another asset in your project that you can reference like say, the mesh itself. Unlike a mesh, it contains adjacency information about vertices, edges, faces, etc. Anyway if you need to do this programatically (for procedurally generating meshes at runtime), the topology creation process is a coroutine so it won´t stall your game.
     
  29. fek

    fek

    Joined:
    Sep 14, 2015
    Posts:
    13
    Yep, that's me!

    Awesome, that is fantastic news! Thank you so much. :D
     
  30. RoyArtorius

    RoyArtorius

    Joined:
    Jul 11, 2013
    Posts:
    70
    Any news about the update coming out? I noticed that it's been a while since the post about the update being submitted was made.
     
  31. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Believe it or not, it's still under review. I don´t know what's taking so long for it to get approved, but... only thing we can do for now is wait :S.
     
    kurotatsu likes this.
  32. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    728
    @arkano22 Hello, it's been more than two weeks now since I asked my question and I see that you replied to everyone else. I can only suppose you didn't see my previous post (the one with the screenshot)? :)
     
  33. fek

    fek

    Joined:
    Sep 14, 2015
    Posts:
    13
    Out of curiosity / for planning purposes, how far behind the Obi Cloth 3.X update is the Obi Fluid update?
     
  34. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Woops! I overlooked it. Sorry about that!

    No, we don´t have Xbox support yet. Once all assets are updated to 3.x (cloth, fluids and rope) we will tackle this task.
     
    Seith likes this.
  35. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    We are finishing Obi Fluids 3.0, we will upload a blog post later today or maybe tomorrow, and upload it to the store at the end of the week. :)
     
  36. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    728
    Excellent! In terms of ETA would you say it's a matter of weeks or months?
     
  37. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    280
    Is there tearing in obi ropes or is it planned?

    Looking forward to the obi fluids update :)
     
  38. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    280
    its LIVE!
     
    Deckard_89 likes this.
  39. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    A matter of months for sure. We still have ObiRope to go!
     
  40. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Yes, tearing is planned for ropes :). Ropes have proven to be quite a lot thougher to develop than expected because users tend to use them in extremely demanding scenarios (huge mass ratios, long ropes with high resolution, complex constraints...) and we have to live up to these demands, or at least try to :)
     
    Arganth likes this.
  41. invadererik

    invadererik

    Joined:
    Oct 31, 2010
    Posts:
    140
    Is there any reason why it requires 5.5 ? Its pretty unstable on 5.4.4 if there is nothing 5.5 specific could you please provide a 5.4.4 version ?

    If there is something specific to 5.5 we can consider upgrading our project to 5.5 after some testing.
     
    Last edited: Feb 16, 2017
  42. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Yes, there's a ton of changes in internal Unity shader code from 5.4.4 to 5.5, most of them broke things in a very subtle way. None of the provided shaders worked out of the box in 5.4.4 and a few bugs could only be squashed in 5.5, so we opted to make 5.5 a requirement. As-is, it will not work in 5.4.4.
     
    Last edited: Feb 16, 2017
  43. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Here's a post about Obi Fluids 3.0:

    http://blog.virtualmethodstudio.com/2017/02/obi-fluids-3-0-for-unity-whats-new/

    A few new features have been added (like foam generation and density contrast multiphase formulation), but it is mostly a robustness, performance, and user friendliness oriented update. Also, bug fixes and compatibility with ObiCloth 3.0. Oh, also the update from 2.x is completely free, and the price of the asset stays the same.

    It will hopefully be uploaded to the store this weekend. From there, we depend on the Asset Store revision process :)

    Edit: in case someone is interested in the density contrast stuff, and how we managed to support big density ratios, here's a link to the paper I implemented (adapting it to position-based dynamics):
    https://graphics.ethz.ch/~sobarbar/papers/Sol08b/Sol08b.pdf
     
    Last edited: Feb 16, 2017
    kurotatsu likes this.
  44. RoyArtorius

    RoyArtorius

    Joined:
    Jul 11, 2013
    Posts:
    70
    So it's a $15 upgrade? And we only save $2? Unless the $47 price tag is due to some kind of currency exchange, it seems like the extra $2 was added to the price to make it seem like it's saves money.

    I'm honestly kinda disappointed. I thought it would be an actual update to the original asset.
     
  45. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @arkano22 is it possible to apply clothing to a high poly skinnedmesh and still have acceptable frame rates? I noticed in the example scenes, the skinnedmeshes are around a few thousand vertices but my models are around 30k. I tried using the cloth proxy per example, but my framerates still drop by half whereas the example scenes are perfectly fine.
     
  46. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Hi Zack,

    I already
    Hi u3dxt,

    There's no way you can pull off a 30.000 vertex cloth in realtime in the cpu. So no, it's not possible. Maybe try a gpu based cloth simulator instead, but these are often quite limited in terms of functionality.
     
  47. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @arkano22 The cloth itself is 4000 vertexes but attached to a skinnedmesh that is 30k vertices. I was thinking that the cloth can just drape on the skinnedmesh through the use of basic colliders. If I remove all the bones from the cloth and separate it out as a mesh object, do you think that will work? Kinda like a free flowing table cloth. I am not sure if that's necessary because in one of your videos, I believe you mentioned a cloth proxy as a way to approximate complex meshes but I may be understanding it incorrectly.
     
  48. RoyArtorius

    RoyArtorius

    Joined:
    Jul 11, 2013
    Posts:
    70
    @arkano22
    I'm sorry if I missed something about the price change, I'm still planning on upgrading regardless.
     
  49. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Hi Zack!

    The 2$ difference is a 5% discount on the total price, for those who already own the old version. I know is small, but it´s better than nothing... :( we really do try hard to get the prices as low as possible. Similar products for the VFX industry sell at around 200$-250$.

    Considering Obi has been in development for about 2.5 years, I don´t think 50$ is an unreasonable price.
     
  50. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    742
    Maybe I misunderstood your last post, I was under the impression that your cloth object was the skinned mesh itself (30k vertices). 4k should not be much of a problem.

    However, if we are talking about a single mesh, of which you want to simulate 4k vertices, then you´ll need to unfix only those 4k particles and click "Optimize" on the ObiCloth inspector so that the rest of the mesh is ignored simulation-wise. You´d still be better off using a separate mesh, though, as this will save memory.

    Take a look at this:
    http://obi.virtualmethodstudio.com/tutorials/proxycharactercloth.html
     
unityunity