Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
14-05-2018, 08:07 PM
(This post was last modified: 14-05-2018, 08:10 PM by cubrman.)
> 3) No skinned meshes are taken into account for cloth collision, at all.
I was a bit misguided by your Character clothing tutorial that says:
Skin Constraints
You might notice that even after unfixing some particles, they are not completely free to move anywhere they want. This is because Obi uses skin constraints to control how animation and simulation are blended together, and to automagically resolve collisions with your character mesh.
Somewhy this led me to believe that other skinned meshes (that are not simulated) are collided against.
> 4) We are unable to reproduce this behavior,...
I will try reproducing it myself again and let you know.
>2) You can import per-particle values from texture channels. See:
http://obi.virtualmethodstudio.com/tutor...iting.html
As far as I understood you can only LOAD the data this way. Which means that I need to blindly edit a texture in an external software and then load it onto a mesh. If there is no SAVE functionality this is very sad.
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
14-05-2018, 08:16 PM
(This post was last modified: 14-05-2018, 08:22 PM by josemendez.)
(14-05-2018, 08:07 PM)cubrman Wrote: > 3) No skinned meshes are taken into account for cloth collision, at all.
I was a bit misguided by your Character clothing tutorial that says:
Skin Constraints
You might notice that even after unfixing some particles, they are not completely free to move anywhere they want. This is because Obi uses skin constraints to control how animation and simulation are blended together, and to automagically resolve collisions with your character mesh.
Somewhy this led me to believe that other skinned meshes (that are not simulated) are collided against.
> 4) We are unable to reproduce this behavior,...
I will try reproducing it myself again and let you know.
>2) You can import per-particle values from texture channels. See:
http://obi.virtualmethodstudio.com/tutor...iting.html
As far as I understood you can only LOAD the data this way. Which means that I need to blindly edit a texture in an external software and then load it onto a mesh. If there is no SAVE functionality this is very sad.
As long as your cloth and your character meshes behave fine when animated (meaning no collision or z-fighting happens), skin constraints will respect this. So in a sense they do prevent the cloth from colliding with the character mesh. They prevent penetration with any mesh that is skinned to the same skeleton as the cloth (and the character is) so the tutorial text is accurate.
Regarding the texture importer, it is designed for people who prefer to paint their particle properties in a external editor of their choice. That's why it only supports loading. Why you'd want to save values to an external file is not clear to me, since Unity already saves these in the prefab/scene. Having to save/load them to/from a texture every time would just be awkward and time consuming.
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
(14-05-2018, 08:16 PM)josemendez Wrote: As long as your cloth and your character meshes behave fine when animated (meaning no collision or z-fighting happens), skin constraints will respect this. So in a sense they do prevent the cloth from colliding with the character mesh. They prevent penetration with any mesh that is skinned to the same skeleton as the cloth (and the character is) so the tutorial text is accurate.
Regarding the texture importer, it is designed for people who prefer to paint their particle properties in a external editor of their choice. That's why it only supports loading. Why you'd want to save values to an external file is not clear to me, since Unity already saves these in the prefab/scene. Having to save/load them to/from a texture every time would just be awkward and time consuming.
> As long as your cloth and your character meshes behave fine when animated (meaning no collision or z-fighting happens), skin constraints will respect this. So in a sense they do prevent the cloth from colliding with the character mesh. They prevent penetration with any mesh that is skinned to the same skeleton as the cloth (and the character is) so the tutorial text is accurate.
That does not seem to work in my case:
The shirt has pinned vertices on the shoulders while all the unpinned vertices have mass == 5, zero backdrop, very high backdrop radius and a desired skin radius.
And I made sure there is no Z-Fighting between my skinned meshes. Moreover, I've just added a collision layer into the solver's list that has these colliders:
And that did nothing at all. Are colliders working for skinned meshes?
> Why you'd want to save values to an external file is not clear to me
That is mostly because I have lost my progress (particle editing) several times during my experiments and I am afraid to loose it again. So far I have not tried reproducing the progress loss bug, but I will try it again in the future in a test project.
One more question, if I may: my cloth simulation feels like a shaky Christmas tree when I start walking from a full stop: it gains speed way too fast. I've tried removing this effect but I cannot remove it while keeping this effect that I really like:
Is there any way to do it? I tried playing with absolutely everything: mass, skin radius, all the parameters really, even the ones on other components - nothing seems to work. I even tried playing with damping on the solver - nothing seems to work. Is there any way to influence the acceleration? I want it to be real small, but to have a high potential amplitude.
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
14-05-2018, 09:04 PM
(This post was last modified: 14-05-2018, 09:12 PM by josemendez.)
(14-05-2018, 08:53 PM)cubrman Wrote: > As long as your cloth and your character meshes behave fine when animated (meaning no collision or z-fighting happens), skin constraints will respect this. So in a sense they do prevent the cloth from colliding with the character mesh. They prevent penetration with any mesh that is skinned to the same skeleton as the cloth (and the character is) so the tutorial text is accurate.
That does not seem to work in my case:
The shirt has pinned vertices on the shoulders while all the unpinned vertices have mass == 5, zero backdrop, very high backdrop radius and a desired skin radius.
And I made sure there is no Z-Fighting between my skinned meshes. Moreover, I've just added a collision layer into the solver's list that has these colliders:
And that did nothing at all. Are colliders working for skinned meshes?
> Why you'd want to save values to an external file is not clear to me
That is mostly because I have lost my progress (particle editing) several times during my experiments and I am afraid to loose it again. So far I have not tried reproducing the progress loss bug, but I will try it again in the future in a test project.
One more question, if I may: my cloth simulation feels like a shaky Christmas tree when I start walking from a full stop: it gains speed way too fast. I've tried removing this effect but I cannot remove it while keeping this effect that I really like:
Is there any way to do it? I tried playing with absolutely everything: mass, skin radius, all the parameters really, even the ones on other components - nothing seems to work. I even tried playing with damping on the solver - nothing seems to work. Is there any way to influence the acceleration? I want it to be real small, but to have a high potential amplitude.
Increase particle backstop radius, it might be a bit too small for your character. Skin constraints create a "collision sphere" at each skinned vertex position, if the spheres are too small the cloth might slip past them. Mass has no effect at all on the simulation if all particles have the same, it only affects collisions with rigidbodies.
Colliders do work with skinned meshes. Just make sure the particles and the collider have different phases, and that collisions are enabled in the solver.
Regarding the shaky simulation, this is due to how character movement influences cloth. You can control how much world-space velocity affects the character cloth ()as long as your solver is set to simulate in local space) by tweaking the cloth component "world velocity scale".
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
14-05-2018, 09:15 PM
(This post was last modified: 14-05-2018, 09:17 PM by cubrman.)
(14-05-2018, 09:04 PM)josemendez Wrote: Increase particle backstop radius, it might be a bit too small for your character. Mass has no effect at all on the simulation if all particles have the same, it only affects collisions with rigidbodies.
Colliders do work with skinned meshes. Just make sure the particles and the collider have different phases, and that collisions are enabled in the solver.
Regarding the shaky simulation, this is due to how character movement influences cloth. You can control how much world-space velocity affects the character cloth ()as long as your solver is set to simulate in local space) by tweaking the cloth component "world space velocity".
> Increase particle backstop radius, it might be a bit too small for your character.
The backstop is gigantic:
in fact if I set it lower, the cloth starts falling through the meshes completely (not to the ground but basically deflating).
> Regarding the shaky simulation, this is due to how character movement influences cloth. You can control how much world-space velocity affects the character cloth ()as long as your solver is set to simulate in local space) by tweaking the cloth component "world space velocity".
If I turn on the local space simulation the cloth explodes:
Changing phase for all the particles to "2" did nothing either.
I guess I will try to play with Unity Chan example and see how cloth behaves there. I have a feeling my stitching shenanigans has something to do with all this.
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(14-05-2018, 09:15 PM)cubrman Wrote: > Increase particle backstop radius, it might be a bit too small for your character.
The backstop is gigantic:
in fact if I set it lower, the cloth starts falling through the meshes completely (not to the ground but basically deflating).
> Regarding the shaky simulation, this is due to how character movement influences cloth. You can control how much world-space velocity affects the character cloth ()as long as your solver is set to simulate in local space) by tweaking the cloth component "world space velocity".
If I turn on the local space simulation the cloth explodes:
Changing phase for all the particles to "2" did nothing either.
I guess I will try to play with Unity Chan example and see how cloth behaves there. I have a feeling my stitching shenanigans has something to do with all this.
If you use local space simulation, make sure the cloth is a child of the solver (see the character trenchcoat tutorial). There's no "local space" to perform the simulation in if you don't.
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
15-05-2018, 04:04 PM
(This post was last modified: 15-05-2018, 04:57 PM by cubrman.)
(14-05-2018, 09:22 PM)josemendez Wrote: If you use local space simulation, make sure the cloth is a child of the solver (see the character trenchcoat tutorial). There's no "local space" to perform the simulation in if you don't.
Ok here is one glitch: I've repositioned the Obi solver from the cloth GameObject to it's parent to check the local space simulation. I set up all the references. It screwed my character animation: now the character sits in a wierd pose and when I try to run (clear animation is playing - no IK) the character simply goes into the T-Pose WHILE THE CLOTHES ACTUALY PLAY THE RUN ANIMATION!
This is the second time I had this bug. But this time I can confirm that these steps led to it's occurrence. Now I've just restarted my project and everything went back to normal. Tell me what did I do wrong? How can it be that you say "you can put your solver anywhere you want" and then this happens? It's these little things that make working with this asset really fricking scary. Cuz I can totally loose my fine-tuned cloth because of stuff like this and then what? Repaint everything again? Great.
Ok, ignore this post - it actually was me this time. I forgot to set the update order to LateUpdate. Sorry about that.
Yes to be honest if you simulate in local space with 0.4 it looks pretty decent. However I had to set aerodynamic's drag coeficient to 50 to ensure that the trail is nice. Can that be potentially dangerous?
Also if my model looks like a spiky bunch of triangles this means it's time to add polygons right?
I am experimenting with simple cloth right now (not skinned) cuz I am still not completely satisfied with the skinned version. I basically plan to create my character out of colliders. The idea is the cloth would rest on colliders while the colliders would be moved by character's bones. Is this even worth trying? My test show that the cloth start to fall once I start moving the colliders. Moreover it easily goes through even the stickiests of materials (stickiness 100, distance 100). Is this the wrong way to go? Maybe I just need to apply extra constrains?
Hey, I've just opened the Wind example and I see that you have a special component for a wind zone. I remember in Obi 3 you announced that "now Obi supports Unity wind zones" which I particularly looked out for as I believe it is important to have a unified and consistent wind system, did I understand correctly that you do not have support for Unity's wind zones?
I am now trying to pin my non-skinned cloth to a collider to prevent it from slipping and I can clearly see that your system is not designed to have even tens of pinns - it's painful to assign colliders to each of them. I can clearly see I am walking into a wrong direction, even though I really like how cloth behaves while it rests on steady colliders. But once I move them - the magic is gone and the cloth is falling to the ground. Even the pinns don't work or at least I can see that I need at least a hundred of them to pin everything properly. Is there really now way to mass-pin particles to a collider?
Maybe there is a way to make the skinned cloth behave like normal cloth? I get a feeling that there should be... I think I can make it work.
Btw the reason why colliders did not work was because each collider must have an Obi collider with material attached to it, I was way to blind to miss this when I read the tutorial.
Ok removing backstop radius turns skinned cloth into a normal one. Now let's see if we can set up new collisions with my custom colliders...
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
15-05-2018, 05:32 PM
(This post was last modified: 15-05-2018, 06:31 PM by cubrman.)
No this does not work. No ammount of stickiness can save the cloth from falling through a collider. Such a shame...
Removed some vertices off my shirt and reimported it. This is how it looks right now once I unpinn all the particles:
No idea what's wrong with that single vertex... The mesh looks perfect without the cloth components - no animation glitches. I rebuilded the topology and even tried re-adding the entire component stack of the cloth from scratch - still the same...
Had to restart the project and reload the old shirt mesh to remove the bug...
I would still LOVE to know if there is ANY way to make sure the other skinned meshes actually take part in cloth collision.
Without simulation:
with simulation:
Even holding a MIDDLE MOUSE BUTTON selects points in the Edit Particles mode... Like why?... I hoped it would be my safe haven as I have written an extension that allows me to rotate camera around my character while holding alt and middle mouse button but nope - I still often misclick and select points instead of rotating my camera... Just like it was with Alt+left mouse button... Guys... this is just... why?...
Cloth completely ignores colliders - this is fucken insane. I've checked the layer, I've checked the components, I've checked bloody everything!
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
15-05-2018, 06:34 PM
(This post was last modified: 15-05-2018, 07:28 PM by cubrman.)
Ok, I've just stumbled across handles. Let's hope this can revitalize my static-mesh-with-colliders dream. I still bloody believe.
Finally, something that looks promising.
Ok colliders did not work because they were turned off. Sorry about that.
This is so fucken insane. The cloth simulation looks MUCH better when simulated as a non-skinned version. Like a billion times better. However, when I try to manually "skin" my cloth onto my skeleton (by placing handles with pinned particles as children to respective bones) the cloth stays pinned only during idle animations, once I start moving or running - it goes into a T-pose. In any case skinning this way is fucken tedious. Srsly guys WHAT THE FUCK? Why is there such a mindboglingly drastic difference in quality between ordinary cloth and skinned cloth? I spent countless hours trying to achieve this effect in the skinned cloth version and failed HARD. WHY? WHY does this have to be so hard?
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
15-05-2018, 07:37 PM
(This post was last modified: 15-05-2018, 07:55 PM by cubrman.)
I really hope someone can explain to why there is such an insane difference in simulation between the skinned and non-skinned meshes because I feel like going crazy. Could this be due to my stitching code?
I don't know I really don't. I tried making skinned mesh work again but even with low backdrop radius it looks shitty. When I try to finetune the simulation area with colliders the shirt just gets entangled into itself and I did not set any stickiness on the colliders at all. I can see that the plugin can theoretically do what I need but I have absolutely no fucken clue how to make it do it... I feel desperate and lost. 20 hours lost without any progress.
|