Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Error message on TearableClothRenderer during tearing the cloth
#1
So it happens on a particular cloth I've created out of a skirt model.
The cloth doesn't tear appropriately, and it throws an ArgumentOutOfRangeException. 
Tearing works fine on other meshes I've tried tho.

The error message shows as follows.

"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 <eae584ce26bc40229c1b1aa476bfa589>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Obi.ObiTearableClothRenderer.GetTornMeshVertices (System.Int32 vertexIndex, System.Collections.Generic.List`1[T] updatedFaces) (at Assets/Obi/Scripts/Cloth/Rendering/ObiTearableClothRenderer.cs:76)
Obi.ObiTearableClothRenderer.UpdateMesh (System.Object sender, Obi.ObiTearableCloth+ObiClothTornEventArgs args) (at Assets/Obi/Scripts/Cloth/Rendering/ObiTearableClothRenderer.cs:64)
Obi.ObiTearableCloth.Tear (Obi.StructuralConstraint edge) (at Assets/Obi/Scripts/Cloth/Actors/ObiTearableCloth.cs:198)
Obi.ObiTearableCloth.ApplyTearing (System.Single substepTime) (at Assets/Obi/Scripts/Cloth/Actors/ObiTearableCloth.cs:152)
Obi.ObiTearableCloth.Substep (System.Single substepTime) (at Assets/Obi/Scripts/Cloth/Actors/ObiTearableCloth.cs:102)
Obi.ObiSolver.Substep (System.Single stepTime, System.Single substepTime, System.Int32 index) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1562)
Obi.ObiUpdater.Substep (System.Single stepDeltaTime, System.Single substepDeltaTime, System.Int32 index) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:85)
Obi.ObiFixedUpdater.FixedUpdate () (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:52)"

Please advice how should I debug this, thx. Triste Triste
Reply
#2
(24-01-2022, 08:04 AM)cycle6 Wrote: So it happens on a particular cloth I've created out of a skirt model.
The cloth doesn't tear appropriately, and it throws an ArgumentOutOfRangeException. 
Tearing works fine on other meshes I've tried tho.

The error message shows as follows.

"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 <eae584ce26bc40229c1b1aa476bfa589>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Obi.ObiTearableClothRenderer.GetTornMeshVertices (System.Int32 vertexIndex, System.Collections.Generic.List`1[T] updatedFaces) (at Assets/Obi/Scripts/Cloth/Rendering/ObiTearableClothRenderer.cs:76)
Obi.ObiTearableClothRenderer.UpdateMesh (System.Object sender, Obi.ObiTearableCloth+ObiClothTornEventArgs args) (at Assets/Obi/Scripts/Cloth/Rendering/ObiTearableClothRenderer.cs:64)
Obi.ObiTearableCloth.Tear (Obi.StructuralConstraint edge) (at Assets/Obi/Scripts/Cloth/Actors/ObiTearableCloth.cs:198)
Obi.ObiTearableCloth.ApplyTearing (System.Single substepTime) (at Assets/Obi/Scripts/Cloth/Actors/ObiTearableCloth.cs:152)
Obi.ObiTearableCloth.Substep (System.Single substepTime) (at Assets/Obi/Scripts/Cloth/Actors/ObiTearableCloth.cs:102)
Obi.ObiSolver.Substep (System.Single stepTime, System.Single substepTime, System.Int32 index) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1562)
Obi.ObiUpdater.Substep (System.Single stepDeltaTime, System.Single substepDeltaTime, System.Int32 index) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:85)
Obi.ObiFixedUpdater.FixedUpdate () (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:52)"

Please advice how should I debug this, thx. Triste Triste

Hi there,

Since this only happens with a specific mesh, chances are your mesh is non-manifold. Non-manifoldness is not supported as described in the manual:
http://obi.virtualmethodstudio.com/manua...setup.html

Make sure there are no malformations in your mesh. Most modeling packages have functions to automatically detect and fix non-manifold structures (edges shared by more than 2 edges, isolated vertices, zero-area faces, etc).

If you're unsure about this, you can send your mesh to support(at)virtualmethodstudio.com for me to take a look at it.

kind regards,
Reply