Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  OBI Skinned Cloth and OBI Proxy
#1
Pregunta 
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=920]           


Attached Files Thumbnail(s)
   
Reply
#2
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,
Reply
#3
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!
Reply
#4
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]
Reply