Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Question about garment onto a 3d avatar using Obi
#1
Hi, I'm a newbie! and diving into this amazing asset!


What I'm trying to do is make a 3d avatar wearing obi applied-clothes "realistic".
Reason why I use this term is that I desperately need your help regarding blueprint and/or solver setting which decides the condition of a garment on the 3d world.
When I apply obi skinnedcloth seems like a bit hardware(like cans, or object etc) is placed on the avatar surface, and using obi cloth seems like banding slowly dropping down towards the ground. Probably affected by too much gravity I think.

When I use obi skinnedcloth and its blueprint, I adjust skin backstop(-0.005~-0.001) and skin radius(0.02~0.05) and it's all I do  right now.

Using cloth blueprint, I see the garment pass through the avatar body bcuz the avatar has only mesh collider which is not changeable so that I use neither capsule nor sphere collider! Triste
The body has Mesh Collider, Obi Collider with HighFriction, Rigidbody, and Obi Rigidbody.

Still trying to make the garment more soft, sophisticated, natural playing with blueprint back and forth.
Should I keep doing with blueprint setting in detail?
Objects are all fbx from 3d modeling tools.

I refer to various tutorials and I reached to all the way here...still struggling with them.
The ultimate goal is to show the avatar is wearing "fabric clothes". That's all.

I wanna listen to your advice, and if you have any ideas worth with, please comment me!

Thank you

p.s. I'm working on a t shirt by the way. Gran sonrisa lol
Reply
#2
Hi!

What you want to do is not possible to do in realtime in a game, only under extremely controlled circumstances. Obi -like any other general purpose cloth simulator for games- isn't designed to approach clothing this way either.

The reason is that performing collision detection/reponse between two deformable meshes at the level of detail /accuracy required for cloth to stay on a moving character's body is extremely costly. MeshColliders in Unity (and their equivalent in other engines) do not support dynamic/deformable meshes for this reason: meshes must be static to be able to precompute a spatial acceleration structure that makes collision queries against a mesh tractable in realtime.

Software that does this (OptiTex, Marvelous Designer just to name a couple) are only barely realtime when using extremely simple cloth on a single character. They use specialized cloth simulation algorithms and collision detection pipelines specifically tailored for this use case, as their goal is accuracy over speed.

In games, character cloth is done by using what Obi calls skin constraints: basically constrain each cloth vertex to an animation-driven position. This does away entirely with collision detection. In cases where cloth is not very close to the body (a like a scarf, or a long cape) collisions are approximated using primitive colliders like capsules or spheres, parented to the character's joints. This is what's done in the CharacterCloth sample scene, and is the usual approach for clothing used in all existing games.

If you want to try doing this with Obi anyway, there's lots of fine parameter tweaking to do and you must become very familiar with how physics engines work internally. I'd recommend reading the documentation thoroughly, specially this one page that explains engine internals:
http://obi.virtualmethodstudio.com/manua...gence.html

Off the top of my head, some of the settings you'll have to tweak:
- In Unity's Time manager, set your maximum allowed timestep to a small multiple of the timestep (eg, for the default tiemestep of 0.02, use a maximum allowed timestep of 0.04)
- Increase the amount of substeps in your ObiFixedUpdater.
- In your ObiSolver, make sure all your constraint evaluation modes are set to Sequential.
- In your Obi Solver, fine-tune your collision settings (reduce collision margin and ccd)


kind regards
Reply
#3
Hi,
thank you for the fast and quick reply!


Uh, actually I'm not using this performance in realtime in a game, just show it paused moment or stayed still(hopefully this would be "extremely controlled circumstances" that you said) like a person staying on the stage wearing a new clothesSonrisa Maybe a small movement like shaking hands, or change the arm position etc. later.

Is it still the same idea you mentioned above?

I realized colliderwise issue is the main thing that I need to overcome with. But in my case, it is not possible parenting capsule or sphere collider to the body's joints Triste


Thank you
Reply
#4
(23-04-2024, 08:38 AM)onfitpark Wrote: Uh, actually I'm not using this performance in realtime in a game, just show it paused moment or stayed still like a person staying on the stage wearing a new clothesSonrisa Maybe a small movement like shaking hands, or change the arm position etc. later.

Is it still the same idea you mentioned above?

If your character is going to be 100% static like a statue, you can use distance fields instead of MeshColliders. They're *a lot* cheaper and considerably more robust.

However as soon as your character is going to move any part of its body that's in contact with the cloth, then you need to use a different approach since neither MeshColliders or distance fields can deform.

(23-04-2024, 08:38 AM)onfitpark Wrote: I realized colliderwise issue is the main thing that I need to overcome with. But in my case, it is not possible parenting capsule or sphere collider to the body's joints Triste

Capsules and spheres are used in games for simplicity and because they're often good enough.

Note that you can also parent MeshColliders or even distance fields . Either can yield a reasonably good piece-wise approximation of an animated human body. As long as individual colliders don't need to deform, this is fine.
Reply
#5
Hi,

I got your suggestions and applied them, and seems better than previous works! And here I bring another question.

Once hit the play, the t shirt(Sorry for the poor image example below. I just randomly enlarge the size of the garment for a visible example) sleeves are stretching down and place on the arm but nothing is changed in the bodice part.
According to the principle, bodice part should be stretching (would rather say shrinking) towards the center of the body so that it shows how it looses. It seem like less affected by gravity.

What I want to try is that to make the cloth(t shirt) drops in the direction of gravity so that it attaches naturally to the mesh collider I'm using.
Is there any way to make it work, or any ideas to try?

Thank you

           
Reply
#6
(23-04-2024, 12:55 PM)onfitpark Wrote: Hi,

I got your suggestions and applied them, and seems better than previous works! And here I bring another question.

Once hit the play, the t shirt(Sorry for the poor image example below. I just randomly enlarge the size of the garment for a visible example) sleeves are stretching down and place on the arm but nothing is changed in the bodice part.
According to the principle, bodice part should be stretching (would rather say shrinking) towards the center of the body so that it shows how it looses. It seem like less affected by gravity.

What I want to try is that to make the cloth(t shirt) drops in the direction of gravity so that it attaches naturally to the mesh collider I'm using.
Is there any way to make it work, or any ideas to try?

Thank you

Hi,

I'm not sure I understand your question, sorry. If you're referring to the visible gap between the sleeves and the actual surface of the body, that's due to particles being too big.

In the blueprint editor, select all particles and change their radius to a smaller value. Note you can enable particle visualization in the visualization options at the bottom of the blueprint editor to better adjust the radius.

On my previous post I forgot to mention: set your ObiSolver's sleep threshold to zero in order to allow all particles to move even if their velocity is very small, this is important for capturing small details in the simulation.

kind regards,
Reply
#7
Hi, again!

Somehow, I feel I need to add more details to my questionsSonrisa I attached a example image so that I hope this will help you to understand(I wish I could show the project in person).


[Example]
1: original fbx
2: Once I put it on a S size body and hit the play, since it's loose in real world, the clothes fit and form a natural wrinkle, room, looseness(On my previous posts, I used the term like stretch, shrink, instead).
3: On a L size body, it fits tight bcuz there's no enough room between the body and the clothes.
   

[Spheres with collider and Unity Cloth]
4. fbx and a basic sphere pretended oversize body
5. In the simulation, the sphere "wears" the fbx following the shape.
       


I'm looking for the way that the clothes fit on any body(w/ Mesh Collider) and are naturally placed following the shape of the body.
I pin my hope on Obi Cloth to bring 1,2,3 and/or 4,5 kind of principle into Unity engine. Somehow, I think this is a rare question in this forum world lol. I hope this helps you to understand my ideaSonrisa

I know these ideas will be explored in more detail. So far, manipulating skin radius and backstop in Blueprint, ObiSolver, sleep threshold, collision settings and all other advice you gave me. I'm grateful to you for all information.

Looking forward to your answer.

Thank you


*To lower down the particle distance of the clothes might be helpful, though? Obi Particle Renderer doesn't seem like what I want to try.... I have no idea about this....
Reply
#8
And another argent question that I want to ask.

In the sample sources utilizing Obi Cloth, when the cloth drops down to the statue we can see the natural wrinkle and the face/chest/belt/shoes curve of the statue itself even though the cloth covers it while it's slipping. I'm moved by this so I'm interested and trying to get advanced resultSonrisa
   
However, this effect doesn't show in Obi SkinnedCloth. When I try this, any clothes seems like armors; hard, stiff, less flexible. Is there a method that I haven't known so far to actualize this with Obi SkinnedCloth?

If not, eventually, using Obi Cloth, is there a different way to optimize the effect(fabric!) with my avatar(only Mesh Collider).

Thank you
Reply