Obi Official Forum
Initialize Obi Cloth is not working - 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: Initialize Obi Cloth is not working (/thread-308.html)



Initialize Obi Cloth is not working - panda_pajama - 20-01-2018

I am trying to create a type of skirt for a character with Obi Cloth.

So far what I've tried has worked pretty well, and it seems Obi Cloth will be what's going to solve all my problems.

However, I am having some problems when I try to create a cloth with the actual skirt mesh that I'm going to be using.

As per the tutorial, I add an Obi Cloth to the skirt mesh, I set the solver and the shared topology, but when I click on Initialize, I get the following error:

IndexOutOfRangeException: Array index is out of range.

Obi.ObiMeshTopology+<GetNeighbourFacesEnumerator>c__Iterator2.MoveNext () (at Assets/Obi/Scripts/DataStructures/ObiMeshTopology.cs:357)
Obi.ObiCloth+<GeneratePhysicRepresentationForMesh>c__Iterator0.MoveNext () (at Assets/Obi/Scripts/Actors/ObiCloth.cs:310)
Obi.CoroutineJob+<Start>c__Iterator0.MoveNext () (at Assets/Obi/Scripts/Coroutines/CoroutineJob.cs:99)
UnityEngine.Debug:LogException(Exception)
Obi.<Start>c__Iterator0:MoveNext() (at Assets/Obi/Scripts/Coroutines/CoroutineJob.cs:108)
Obi.EditorCoroutine:Update() (at Assets/Obi/Scripts/Coroutines/EditorCoroutine.cs:60)
Obi.EditorCoroutine:Start() (at Assets/Obi/Scripts/Coroutines/EditorCoroutine.cs:47)
Obi.EditorCoroutine:StartCoroutine(IEnumerator) (at Assets/Obi/Scripts/Coroutines/EditorCoroutine.cs:19)
Obi.ObiClothEditor:OnInspectorGUI() (at Assets/Obi/Editor/ObiClothEditor.cs:245)
UnityEngine.GUIUtilityLenguarocessEvent(Int32, IntPtr)

I've successfully done the same process for other simpler meshes, but only this mesh is giving me trouble.

Do you have any idea what may be causing this problem?


RE: Initialize Obi Cloth is not working - josemendez - 20-01-2018

(20-01-2018, 04:58 PM)panda_pajama Wrote: I am trying to create a type of skirt for a character with Obi Cloth.

So far what I've tried has worked pretty well, and it seems Obi Cloth will be what's going to solve all my problems.

However, I am having some problems when I try to create a cloth with the actual skirt mesh that I'm going to be using.

As per the tutorial, I add an Obi Cloth to the skirt mesh, I set the solver and the shared topology, but when I click on Initialize, I get the following error:

IndexOutOfRangeException: Array index is out of range.

Obi.ObiMeshTopology+<GetNeighbourFacesEnumerator>c__Iterator2.MoveNext () (at Assets/Obi/Scripts/DataStructures/ObiMeshTopology.cs:357)
Obi.ObiCloth+<GeneratePhysicRepresentationForMesh>c__Iterator0.MoveNext () (at Assets/Obi/Scripts/Actors/ObiCloth.cs:310)
Obi.CoroutineJob+<Start>c__Iterator0.MoveNext () (at Assets/Obi/Scripts/Coroutines/CoroutineJob.cs:99)
UnityEngine.Debug:LogException(Exception)
Obi.<Start>c__Iterator0:MoveNext() (at Assets/Obi/Scripts/Coroutines/CoroutineJob.cs:108)
Obi.EditorCoroutine:Update() (at Assets/Obi/Scripts/Coroutines/EditorCoroutine.cs:60)
Obi.EditorCoroutine:Start() (at Assets/Obi/Scripts/Coroutines/EditorCoroutine.cs:47)
Obi.EditorCoroutine:StartCoroutine(IEnumerator) (at Assets/Obi/Scripts/Coroutines/EditorCoroutine.cs:19)
Obi.ObiClothEditor:OnInspectorGUI() (at Assets/Obi/Editor/ObiClothEditor.cs:245)
UnityEngine.GUIUtilityLenguarocessEvent(Int32, IntPtr)

I've successfully done the same process for other simpler meshes, but only this mesh is giving me trouble.

Do you have any idea what may be causing this problem?

Hi,

Make sure the mesh is 2-manifold. Non-manifold meshes are not supported (i.e. meshes with edges shared by more than 2 faces, vertices shared by only 2 faces, floating vertices/edges, and similar malformations). Most of the time the topology will spit out a warning if it detects any problems in the mesh, but depending on the non-manifoldness of the mesh it might not be able to identify the exact problem.

kind regards,


RE: Initialize Obi Cloth is not working - panda_pajama - 20-01-2018

(20-01-2018, 05:29 PM)josemendez Wrote: Hi,

Make sure the mesh is 2-manifold. Non-manifold meshes are not supported (i.e. meshes with edges shared by more than 2 faces, vertices shared by only 2 faces, floating vertices/edges, and similar malformations). Most of the time the topology will spit out a warning if it detects any problems in the mesh, but depending on the non-manifoldness of the mesh it might not be able to identify the exact problem.

kind regards,

Thank you for your quick reply.

I understand "edges shared by only 2 faces"

I understand "no floating vertices/edges"

But the requirement of "vertices shared by only 2 faces" is a very difficult requirement

Is there a way to know exactly which vertices are the problematic ones so I can tell that to the person who is making the 3D models?


RE: Initialize Obi Cloth is not working - josemendez - 20-01-2018

(20-01-2018, 06:30 PM)panda_pajama Wrote: Thank you for your quick reply.

I understand "edges shared by only 2 faces"

I understand "no floating vertices/edges"

But the requirement of "vertices shared by only 2 faces" is a very difficult requirement

Is there a way to know exactly which vertices are the problematic ones so I can tell that to the person who is making the 3D models?

Hi,

Non-manifold meshes are generally the result of bad modeling practices, or intentional "shortcuts" in the modeling process that while OK for rendering, are not OK for simulation. Most 3d modeling packages/programs have a "cleanup" function that automatically tries to fix or removes non-manifold portions of your mesh. A good starting point is this post:

https://blender.stackexchange.com/questions/7910/what-is-non-manifold-geometry