Obi Official Forum
Help OBI Skinned Cloth and OBI Proxy - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html)
+--- Thread: Help OBI Skinned Cloth and OBI Proxy (/thread-2807.html)



OBI Skinned Cloth and OBI Proxy - dequid - 13-03-2021

Hey there,


i am trying to reproduce the CharacterCloth scene with my own character.


I have have a Skinned Mesh Character driven by an Animator (imported FBX).


I have a high resolution coat (green, ~30K vertices) and a low res one (gray, ~6K vertices). Both are skinned and weight painted to the bones of the character.


I successfully made the low res coat an OBI SkinnedCloth, made a blueprint, deleted the upper vertices since i want only the lower part to simulate and painted the skin radius for the lower part. I added capsule colliders to the leg bones. That works like a charm so far.


Now i want to transfer this simulation to the high res coat like in the CharacterCloth scene.


So i gave the high res coat also a OBI SkinnedCloth, chose the blueprint i made for the low res coat and added an Obi Cloth Proxy with the OBI SkinnedCloth Renderer and a triangle skin map like in the Proxy tutorial in youtube.


But nothing happens with the high res coat and i get the following error:

Code:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <9577ac7a62ef43179789031239ba8798>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <9577ac7a62ef43179789031239ba8798>:0)
Obi.ObiClothRendererBase.UpdateRenderer (Obi.ObiActor actor) (at Assets/Obi/Scripts/Cloth/Rendering/ObiClothRendererBase.cs:169)
Obi.ObiSkinnedClothRenderer.UpdateRenderer (Obi.ObiActor actor) (at Assets/Obi/Scripts/Cloth/Rendering/ObiSkinnedClothRenderer.cs:69)
Obi.ObiActor.Interpolate () (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:1189)
Obi.ObiSolver.Interpolate (System.Single stepTime, System.Single unsimulatedTime) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1622)
Obi.ObiUpdater.Interpolate (System.Single stepDeltaTime, System.Single accumulatedTime) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:110)
Obi.ObiLateFixedUpdater.Update () (at Assets/Obi/Scripts/Common/Updaters/ObiLateFixedUpdater.cs:77)


What am i doing wrong?

[attachment=919] [attachment=920] [attachment=921] [attachment=922]


RE: OBI Skinned Cloth and OBI Proxy - josemendez - 15-03-2021

Hi there,

Proxy binding two different skinned meshes is currently not supported, only two different non-skinned meshes, a non-skinned mesh to a skinned mesh, or the same skinned mesh to itself. We're working to add support for this specific case, which we aim to finish in time for Obi 6.2.

The underlying reason is that getting post-skinning mesh data in Unity involves calling BakeMesh(), which is a moderately expensive function, and for the case of two different skinned meshes acting as proxy and target would involve twice the calls to BakeMesh(). We'd like to avoid this is possible.

The trench coat scene binds the outer layer of the trenchcoat (the one with pockets, rivets, etc) to the inner layer, so it's the same mesh acting as target and proxy: only some vertices are simulated, and the rest are driven by the simulation. Let me know if you need help setting this up.



kind regards,


RE: OBI Skinned Cloth and OBI Proxy - dequid - 15-03-2021

Hey,

thanks for the quick reply. Ok, so if i understand correctly, my two options are:

  1. Making the high res coat a normal mesh without skinning to the bones
  2. Add the low res geometry to the high res mesh and use only that vertices in the blueprint


If i'd go for option #2, what would be the best approach to get only the low res verts inside the blueprint? Generate all vertices and delete them? Or temporary save the mesh as low res version, make the blueprint and resave the mesh with all vertices? 



Thanks!


RE: OBI Skinned Cloth and OBI Proxy - josemendez - 16-03-2021

Quote:If i'd go for option #2, what would be the best approach to get only the low res verts inside the blueprint? Generate all vertices and delete them?

Yes, that's what the trenchcoat scene does.

If you open up the trenchcoat blueprint and enable mesh visualization, you'll see that all particles except the ones in the inner layer below hip level have been removed (they can be restored by clicking the "restore removed particles" button):

[Image: j3Tgxhl.png]