Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
16-05-2018, 07:12 AM
(This post was last modified: 16-05-2018, 07:15 AM by cubrman.)
You can ignore all the rest of my triad but please answer these questions:
1. Is it true that setting high skin radius and zero backdrops (both) turns a skinned particle into an equivalent of a non-skinned particle? If not, how can I achieve this (I basically need my shirt to ignore all collisions and still be pinned to a skinned model in some places)?
2. I need a You Shall Not Pass collider. I plan to specify my character collision with colliders myself and I need a collider that I can be sure that even if the world ends, there is no way in hell that a particle can penetrate that collider. Not even an inch. Please tell me how to set up such a collider. Yeah and particles must never get stuck in that collider.
3. How is your cloth receiving the skinning information? Does it read the animation data or the actual final positions of the bones once the Update hits? I use Final IK to reposition my bones in LateUpdate and right now the cloth is not responding to that (the solver is set to LateUpdate). That is either because it only reads animation data or because it updates before the FinalIK updates. If the latter is true, there is a high likelyhood that I would need to Update the cloth manually, so please tell me the right way to do it (only Update the solver or both: the cloth and the solver).
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
16-05-2018, 11:47 AM
(This post was last modified: 16-05-2018, 11:54 AM by josemendez.)
(16-05-2018, 07:12 AM)cubrman Wrote: You can ignore all the rest of my triad but please answer these questions:
1. Is it true that setting high skin radius and zero backdrops (both) turns a skinned particle into an equivalent of a non-skinned particle? If not, how can I achieve this (I basically need my shirt to ignore all collisions and still be pinned to a skinned model in some places)?
2. I need a You Shall Not Pass collider. I plan to specify my character collision with colliders myself and I need a collider that I can be sure that even if the world ends, there is no way in hell that a particle can penetrate that collider. Not even an inch. Please tell me how to set up such a collider. Yeah and particles must never get stuck in that collider.
3. How is your cloth receiving the skinning information? Does it read the animation data or the actual final positions of the bones once the Update hits? I use Final IK to reposition my bones in LateUpdate and right now the cloth is not responding to that (the solver is set to LateUpdate). That is either because it only reads animation data or because it updates before the FinalIK updates. If the latter is true, there is a high likelyhood that I would need to Update the cloth manually, so please tell me the right way to do it (only Update the solver or both: the cloth and the solver).
Hi,
1. Zero skin radius and any backstop = fully animated particle. No simulation will be applied to it, as zero skin radius means it cannot separate from its animated position.
High skin radius and zero backstop (which is what you asked) = fully simulated particle, it will completely ignore the animation and will be able to penetrate the animated shape.
2. This is -and will forever be- essentially impossible in any computer simulation, in any engine. That's what skin constraints (and their equivalents in all other cloth simulators) were invented for.
Computers treat time as a discrete quantity: from a frame to the next a small but measurable amount of time passes (at 60 fps, 1/60th of a second). During this time the character animation has advanced and moved colliders around. Consider a very thin object (like a shirt sleeve) and a relatively thin collider, like an arm inside the sleeve. The arm has a "punch" animation, during which it moves from point A to point B (40 cm away from each other) in 1/30th of a second (2 frames). This means on frame 1 the arm will be inside the sleeve, and on frame 2 the arm will be 20 cm away from its starting point, and completely outside the sleeve. At no point in the animation has it collided with the sleeve, since it was teleported from A to B almost instantly, so the cloth hasn't even registered any collision.
This issue is called tunneling and is inherent to computer simulations. It can be alleviated using continuous collision detection (abbreviated as CCD) which Obi performs by default, but all moving objects involved in a collision need to have a velocity vector (and animated bones don't).
3. Simply change the order in which FinalIK updates, in Unity's script execution order window. It should update before Obi Solver and Obi Cloth, so that they grab the bones after FinalIK has modified their positions.
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
16-05-2018, 06:33 PM
(This post was last modified: 16-05-2018, 06:52 PM by cubrman.)
Progress is being constantly lost. I've just applied a prefab and all my pins are now gone. I wanna kill...
Ok I've found how this works - if you select all particles (including pinned) and set their mass - all the pinned particles are gone. Because ofcourse they are.
Now my topology no longer alignes with the model. For some God knows what reason. Literary did absolutely nothing - never changed a model or topology asset. Bugs upon bugs upon bugs. Welp, time to recompute and reinitialize. ANOTHER PROGRESS GONE. Guess what would have been nice here? THE SAVE FEATURE FOR PARTICLES!
Recomputed, reinitialized - still the topology does not align. And it produces insane bugs during play mode too. Oh how convenient, guess I need to start over. AGAIN.
Oh great, now it NEVER aligns after stiching... srsly how long can this go on?...
WHY are the particles not aligning? Can there be any bloody hint in documentation on how to track problems? ANY TROUBLESHOOTING SECTION AT ALL? Once I simulate them they fucken form a dot on the ground. I wanna kill...
Listen are you absolutely sure that the root bone is the only thing my stitching code was missing? Are you sure there is nothing else your plugin requires? I cannot afford rearranging the hierarchy of my character. I cannot do anything else but stitch new models. There is CLEARLY something wrong with this bloody plugin!
I siriously have no fucken clue how this is supposed to be "OK":
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
16-05-2018, 08:01 PM
(This post was last modified: 16-05-2018, 08:02 PM by cubrman.)
Well, my persistence payed off. The character is finally having a decent simulation. I had to build a great wall of colliders (I still feel like other skinned meshes offer zero collision) but in the end it worked. Still I would love to know why the points do not align. I had to simulate them to align them. If that's an error I have to know it.
https://imgur.com/a/bkED2Vs
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
17-05-2018, 08:23 AM
(This post was last modified: 17-05-2018, 08:48 AM by josemendez.)
(16-05-2018, 08:01 PM)cubrman Wrote: Well, my persistence payed off. The character is finally having a decent simulation. I had to build a great wall of colliders (I still feel like other skinned meshes offer zero collision) but in the end it worked. Still I would love to know why the points do not align. I had to simulate them to align them. If that's an error I have to know it.
https://imgur.com/a/bkED2Vs
None of these issues are bugs.
Regarding the alignment: I'd bet that either your character transform or your root transform (or any transform up their hierarchy) has non-identity scale (something other than 1,1,1). Cloth cannot be scaled, as mathematically it does not make sense to apply an affine transform to a deformable object. Only rigids can be transformed.
This can be fixed in your modeling/animation program, though the option name differs depending on which one you use: in Maya it is called "freeze transform", in Blender "apply transform", etc. Using this will have the effect of keeping whatever size your bone/character has, and setting that as its "normal" size: 1,1,1.
cheers,
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
17-05-2018, 01:12 PM
(This post was last modified: 17-05-2018, 01:13 PM by cubrman.)
1) I don't have any non-1 scaled GameObjects in my hierarchy as I am aware of the problems this may cause. I've applied the scale in blender and reimported the model. I've re-stitched the model - the Unity's skinned animations work fine. Then I've re-added the cloth component from scratch, recomputed the topology, checked everything - the points still do not align.
The points do align though before the stitching part. They stop aligning once I stitch the model. And I tried all the combinations (adding cloth from scratch before/after stitching, etc.).
I still believe my stitching code is silently ruining your plugin, please at least give me tools/hints anything so that I can check if it is true or false myself.
2) While I was optimizing my mesh in blender (mostly removing vertices) it suddenly stopped initializing with the cloth component (I tested the scale issue above with the old 100% working model). I searched the forum and found that it might be due to the model being non-manifold. I tried everything that the stackexchange's post suggested and more - nothing helped. I have no floating geometry, internal faces, duplicate vertices or anything weird at all. No non-triangle faces either. Still the mesh won't initialize. I would be glad if you could suggest a software/method to identify and overcome such problems.
3) Say I have a tone of cloth objects I want to work together on my character:
a - should they all reference the same solver? Even if they work together?
b - is it dangerous to have cloth simulated in local space while it is not being directly a child of a solver (instead burried deep in the hierarchy below the solver)? What if it's the skeleton hierarchy we are talking about?
c - is it fine to have more that 1 solver in the hierarchy? 1 for each cloth? To prevent potential problems from (b)? I've read about inter-collisions I am asking whether it is potentially dangerous in any way to have many solvers in 1 hierarchy?
4) In Obi 3.0 you advertised that the Unity Wind Zone now works with cloth. From what I've seen you in fact need to add your own Obi wind zone to make wind work. Is there any way to make Unity wind zones work?
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
17-05-2018, 01:45 PM
(This post was last modified: 17-05-2018, 02:18 PM by josemendez.)
(17-05-2018, 01:12 PM)cubrman Wrote: 1) I don't have any non-1 scaled GameObjects in my hierarchy as I am aware of the problems this may cause. I've applied the scale in blender and reimported the model. I've re-stitched the model - the Unity's skinned animations work fine. Then I've re-added the cloth component from scratch, recomputed the topology, checked everything - the points still do not align.
The points do align though before the stitching part. They stop aligning once I stitch the model. And I tried all the combinations (adding cloth from scratch before/after stitching, etc.).
I still believe my stitching code is silently ruining your plugin, please at least give me tools/hints anything so that I can check if it is true or false myself.
2) While I was optimizing my mesh in blender (mostly removing vertices) it suddenly stopped initializing with the cloth component (I tested the scale issue above with the old 100% working model). I searched the forum and found that it might be due to the model being non-manifold. I tried everything that the stackexchange's post suggested and more - nothing helped. I have no floating geometry, internal faces, duplicate vertices or anything weird at all. No non-triangle faces either. Still the mesh won't initialize. I would be glad if you could suggest a software/method to identify and overcome such problems.
3) Say I have a tone of cloth objects I want to work together on my character:
a - should they all reference the same solver? Even if they work together?
b - is it dangerous to have cloth simulated in local space while it is not being directly a child of a solver (instead burried deep in the hierarchy below the solver)? What if it's the skeleton hierarchy we are talking about?
c - is it fine to have more that 1 solver in the hierarchy? 1 for each cloth? To prevent potential problems from (b)? I've read about inter-collisions I am asking whether it is potentially dangerous in any way to have many solvers in 1 hierarchy?
4) In Obi 3.0 you advertised that the Unity Wind Zone now works with cloth. From what I've seen you in fact need to add your own Obi wind zone to make wind work. Is there any way to make Unity wind zones work?
1) I'd have to go over your stitching script in detail to see what it does exactly and how is it implemented. I will as soon as I have some time to do it.
2) Most modeling programs have a "cleanup" option that fixes or at least removes sources of non-manifoldness in your mesh. If you're 100% positive your mesh has no zero length edges, no zero area faces, no edges shared by more than 2 faces, no dangling edges or vertices, etc, then last thing I'd check is triangle winding order (it really should be consistent and most programs export it correctly, so I doubt this is the issue. Still I'd check it.)
3)
a - A single solver is usually simpler to set up. And a must if you want the clothes to interact with each other, since solvers do not interact with each other.
b - As long as the cloth is below the solver in the hierarchy, it is fine. No need for it to be an immediate child of the solver.
c - 1 solver per cloth is a bit overkill, and it defeats the purpose of Obi's design: separate solver and cloth so that multiple cloth pieces can be solved and culled at once. You could do it of course, but I don't see any reason to.
4) Built-in unity components cannot be modified. So it is impossible to add support for Obi to a built-in component, we have to use our own. Same goes for colliders and rigidbodies, we can't modify them, that's why ObiCollider and ObiRigidbody exist.
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
> 1) I'd have to go over your stitching script in detail to see what it does exactly and how is it implemented. I will as soon as I have some time to do it.
Please do, I can wait but I badly need the stitching to work with your plugin. I have big plans for it in my project.
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
17-05-2018, 02:34 PM
(This post was last modified: 17-05-2018, 02:39 PM by josemendez.)
(17-05-2018, 02:02 PM)cubrman Wrote: > 1) I'd have to go over your stitching script in detail to see what it does exactly and how is it implemented. I will as soon as I have some time to do it.
Please do, I can wait but I badly need the stitching to work with your plugin. I have big plans for it in my project.
Hi,
I'm unable to reproduce your result. I stitched the shirt to the character (modifying your script so that it sets the root bone correctly, and passing "Z Pelvis" as the root bone). Then generated the topology and added the cloth as usual. This is what i get:
Also please note that nothing is wrong with the plugin. Setting the root bone correctly is not some obscure thing required only by Obi, it is NEEDED for Unity's camera culling, velocity vectors, and overall animation/rendering system to work correctly.
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
17-05-2018, 02:39 PM
(This post was last modified: 17-05-2018, 02:43 PM by cubrman.)
Ok, maybe it's the modified version of the cloth, could you please try this one?
https://drive.google.com/file/d/1hlYs6T7...sp=sharing
Btw here are my codes:
https://drive.google.com/file/d/1T7XbZbu...sp=sharing
https://drive.google.com/file/d/1vrV8ENO...sp=sharing
> Also please note that nothing is wrong with the plugin.
I never suggested that. All I am suggesting is that there might be something that the STITCHING code does that is not expected by the plugin.
|