Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Need help constraining the cape to a location
#1
So I am trying to set constraints to my cape so that only a part of it simulates cloth is there a way to do this? below is a before and after.
I only want the bottom half of my cape to simulate cloth.

[Image: Untitled.png]

[Image: Untitled1.png]
Reply
#2
(15-02-2020, 07:48 PM)invayne Wrote: So I am trying to set constraints to my cape so that only a part of it simulates cloth is there a way to do this? below is a before and after.
I only want the bottom half of my cape to simulate cloth.

[Image: Untitled.png]

[Image: Untitled1.png]

Hi,

If your cape is a skinned cloth (most probably, and if it is not it really should), simply set the skin radius and skin compliance of the particles you want to ignore simulation to zero, as described here:
http://obi.virtualmethodstudio.com/tutor...aints.html

Also, this video should help you understand skin constraints:
https://www.youtube.com/watch?v=usXaFr6N630

If you're using a regular cloth (not recommended for characters), create a particle group containing the particles you want to attach, and then use a ObiParticleAttachment:
http://obi.virtualmethodstudio.com/tutor...ments.html

kind regards
Reply
#3
(15-02-2020, 10:19 PM)josemendez Wrote: Hi,

If your cape is a skinned cloth (most probably, and if it is not it really should), simply set the skin radius and skin compliance of the particles you want to ignore simulation to zero, as described here:
http://obi.virtualmethodstudio.com/tutor...aints.html

Also, this video should help you understand skin constraints:
https://www.youtube.com/watch?v=usXaFr6N630

If you're using a regular cloth (not recommended for characters), create a particle group containing the particles you want to attach, and then use a ObiParticleAttachment:
http://obi.virtualmethodstudio.com/tutor...ments.html

kind regards

okay, so I figured it out it was due to not having any back faces on the cloth. But once I reimported my mesh with a double facing mesh. I got 
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 <437ba245d8404784b9fbab9b439ac908>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <437ba245d8404784b9fbab9b439ac908>:0)
Obi.HalfEdgeMesh.CalculateRestOrientations () (at Assets/Obi/Scripts/Cloth/DataStructures/HalfEdgeMesh.cs:282)
Obi.HalfEdgeMesh.Generate () (at Assets/Obi/Scripts/Cloth/DataStructures/HalfEdgeMesh.cs:248)
Obi.ObiSkinnedClothBlueprint+<Initialize>d__2.MoveNext () (at Assets/Obi/Scripts/Cloth/Blueprints/ObiSkinnedClothBlueprint.cs:31)
Obi.ObiActorBlueprint+<Generate>d__68.MoveNext () (at Assets/Obi/Scripts/Common/Blueprints/ObiActorBlueprint.cs:300)
Obi.CoroutineJob+<Start>d__15.MoveNext () (at Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs:99)
UnityEngine.Debug:LogException(Exception)
Obi.<Start>d__15:MoveNext() (at Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs:108)
Obi.EditorCoroutine:ShowCoroutineProgressBar(String, IEnumerator&) (at Assets/Obi/Scripts/Common/Utils/Coroutines/EditorCoroutine.cs:21)
Obi.ObiActorBlueprintEditor:Generate() (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:100)
Obi.ObiActorBlueprintEditor:OnInspectorGUI() (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:128)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Now I have reimported Obi cloth and also deleted everything for my character including scripts, mesh, and whatnot and also reimported that and then readded all the scripts recreated blueprint I get this error now.
how do I fix this?

so after removing the doubled sided mesh it started working again -_-
Reply
#4
(16-02-2020, 04:31 AM)invayne Wrote: okay, so I figured it out it was due to not having any back faces on the cloth. But once I reimported my mesh with a double facing mesh. I got 
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 <437ba245d8404784b9fbab9b439ac908>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <437ba245d8404784b9fbab9b439ac908>:0)
Obi.HalfEdgeMesh.CalculateRestOrientations () (at Assets/Obi/Scripts/Cloth/DataStructures/HalfEdgeMesh.cs:282)
Obi.HalfEdgeMesh.Generate () (at Assets/Obi/Scripts/Cloth/DataStructures/HalfEdgeMesh.cs:248)
Obi.ObiSkinnedClothBlueprint+<Initialize>d__2.MoveNext () (at Assets/Obi/Scripts/Cloth/Blueprints/ObiSkinnedClothBlueprint.cs:31)
Obi.ObiActorBlueprint+<Generate>d__68.MoveNext () (at Assets/Obi/Scripts/Common/Blueprints/ObiActorBlueprint.cs:300)
Obi.CoroutineJob+<Start>d__15.MoveNext () (at Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs:99)
UnityEngine.Debug:LogException(Exception)
Obi.<Start>d__15:MoveNext() (at Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs:108)
Obi.EditorCoroutine:ShowCoroutineProgressBar(String, IEnumerator&) (at Assets/Obi/Scripts/Common/Utils/Coroutines/EditorCoroutine.cs:21)
Obi.ObiActorBlueprintEditor:Generate() (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:100)
Obi.ObiActorBlueprintEditor:OnInspectorGUI() (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:128)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Now I have reimported Obi cloth and also deleted everything for my character including scripts, mesh, and whatnot and also reimported that and then readded all the scripts recreated blueprint I get this error now.
how do I fix this?

so after removing the doubled sided mesh it started working again -_-

Double sided meshes are non-manidold (every face is non-manifold in fact, so that's as non-manifold as you can get a mesh to be). Obi doesn't support non-manifold meshes, as explained in the manual:
http://obi.virtualmethodstudio.com/tutor...setup.html

Two-sided cloth is generally easier, better and much more efficiently done using a shader.
Reply
#5
(16-02-2020, 08:28 PM)josemendez Wrote: Double sided meshes are non-manidold (every face is non-manifold in fact, so that's as non-manifold as you can get a mesh to be). Obi doesn't support non-manifold meshes, as explained in the manual:
http://obi.virtualmethodstudio.com/tutor...setup.html

Two-sided cloth is generally easier, better and much more efficiently done using a shader.

yeah, I ended up changing my toon shader to have culling turned off. I have yet to have a chance to try to get the cape to work right just yet. I should be able to take a look at it today. Hopefully, I can get it working.
Reply
#6
okay after much trial and error I am finally getting there. but I am still having an issue with stretching.  here is two pictures to show what I mean.

[Image: Untitled-1.png]

[Image: Untitled1-1.png]

is there any way to fix this?

okay, I fixed the particles. But I have an issue with animations and the connection between the two sections of the top and bottom of the cape. when it animates the connecting particles stretch by a lot. I marked off where the stretching is. I tinkered around but can not figure out what is causing this.

[Image: Untitled-2.png]
Reply