Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Question about garment onto a 3d avatar using Obi
#11
(29-04-2024, 08:20 AM)josemendez Wrote: Is the body mesh a MeshCollider? it really should be a distance field instead as I suggested previously, this will prevent any particles passing trough the body. It's also much cheaper than MeshCollider.

Hi,

yes, the body mesh is a MeshCollider, so I tried to add a Distance Field following the step on the link below.
https://obi.virtualmethodstudio.com/manu...ields.html

When I hit the play, however, rather the t-shirt(SkinnedCloth applied) maintains the original fbx form itself and drops towards the Y-axis like an object on a desk falls to the floor. It seems like no gravity affecting the clothes.

One said that what if I add a Distance Field to the body mesh and add MeshCollider to the clothes so that they could interact each other. But it turned out unnatural.

I was wondering if I did in a wrong way. Or is there another use(way) that I don't know to add a distance field to the MeshColldier?
I look forward to your kind reply.

Thank you
Reply
#12
(29-04-2024, 09:57 AM)onfitpark Wrote: When I hit the play, however, rather the t-shirt(SkinnedCloth applied) maintains the original fbx form itself and drops towards the Y-axis like an object on a desk falls to the floor. It seems like no gravity affecting the clothes.

Not sure I understand your question. You both mention the object drops towards the Y axis, but that there's no gravity affecting it? If it's falling in the Y axis, it must surely be due to gravity?

In any case, adding a distance field to a collider doesn't affect gravity in any way, the cloth should fall due to gravity as usual.

(29-04-2024, 09:57 AM)onfitpark Wrote: One said that what if I add a Distance Field to the body mesh and add MeshCollider to the clothes so that they could interact each other. But it turned out unnatural.

It doesn't make any sense to add a MeshCollider to a deformable object such as the cloth. MeshColliders are exclusively to be used with rigid objects, either dynamic (rigidbodies) or kinematic. All you need to do is generate a distance field and add it to the "distance field" property of a collider.

I've looked trough the manual and at no point does it instruct the user to add a MeshCollider to a cloth. Could you point us to where you've found this information?
Reply
#13
(29-04-2024, 10:08 AM)josemendez Wrote: Not sure I understand your question. You both mention the object drops towards the Y axis, but that there's no gravity affecting it? If it's falling in the Y axis, it must surely be due to gravity?

In any case, adding a distance field to a collider doesn't affect gravity in any way, the cloth should fall due to gravity as usual.

Oh, it was my mistake. I mean the top drops towards the Y-axis without hanging over the body. That all.


Quote:josemendez

I've looked trough the manual and at no point does it instruct the user to add a MeshCollider to a cloth. Could you point us to where you've found this information?

I guess it was just someone's idea and I just wanted to ask you if it was possible or not. Sonrisa  


Thank you
Reply
#14
(29-04-2024, 10:53 AM)onfitpark Wrote: Oh, it was my mistake. I mean the top drops towards the Y-axis without hanging over the body. That all.

Oh ok, so the cloth is falling but not colliding against the body right?
How does the distance field look in the preview? Can you see anything in the distance field inspector's preview window? (at the very bottom of the inspector, like in the following screenshot):

[Image: DF_inspector.png]


(29-04-2024, 10:53 AM)onfitpark Wrote: I guess it was just someone's idea and I just wanted to ask you if it was possible or not. Sonrisa  

Cloth already contains its own collision geometry (particle-based), there's no need to add a MeshCollider to a cloth.
Reply
#15
(29-04-2024, 10:57 AM)josemendez Wrote: Oh ok, so the cloth is falling but not colliding against the body right?
How does the distance field look in the preview? Can you see anything in the distance field inspector's preview window? (at the very bottom of the inspector, like in the following screenshot):


Cloth already contains its own collision geometry (particle-based), there's no need to add a MeshCollider to a cloth.

Hi,

I reset the Distance Field and applied again. This is the result I've got.
       




Quote:josemendez

8 iterations and 15 substeps = 120 iterations, which is *a lot*.


Substeps are a lot more effective at improving simulation quality than iterations. It is very rare for iterations to go over 2-4, as they're intended to adjust the relative importance of different constraint types. Usually, you want to keep all iteration values at just 1 iteration, then use as many substeps as needed. Then if any particular constraint type needs some extra strength, use a couple more iterations on that particular constraint type.

And I reset the ObiSolver following your advice as well. The performance got better, it moves faster than before. But the clothes doesn't seem like a fabric piece, though. Is Blueprint the only way to solve this problem? 


Thank you
Reply
#16
(29-04-2024, 12:00 PM)onfitpark Wrote: Hi,

I reset the Distance Field and applied again. This is the result I've got.

Hi,

The preview looks really bad, the arms are missing and some parts of the model are way too thin, plus it only takes up 39 kb of space which means it's missing a lot of data.

Reduce the max error setting to a smaller value (0.00001, for instance), then regenerate the distance field. This error is a distance value, so if your mesh is small and the max error is comparatively large, the resulting distance field will do a poor job of approximating its surface as you're allowing a large difference between the distances stored in the distance field and the actual distance to the mesh surface.

(29-04-2024, 12:00 PM)onfitpark Wrote: But the clothes doesn't seem like a fabric piece, though. Is Blueprint the only way to solve this problem?

What do you mean by "doesn't seem like a fabric piece"? could you be more specific?


kind regards,
Reply
#17
(29-04-2024, 12:10 PM)josemendez Wrote: Reduce the max error setting to a smaller value (0.00001, for instance), then regenerate the distance field. This error is a distance value, so if your mesh is small and the max error is comparatively large, the resulting distance field will do a poor job of approximating its surface as you're allowing a large difference between the distances stored in the distance field and the actual distance to the mesh surface.

Thanks for the reply.
I could get an advanced result regarding the Distance field. And I have one more question. So, if the size of the body changes, bigger or thinner, the Max Error value should be changed, is it right?
   

Quote:josemendez

What do you mean by "doesn't seem like a fabric piece"? could you be more specific?

In my opinion, its surface, texture, or density still seems more like Jello. I know bringing the hard fbx to life is obviously a great challenge, but just try it with your advice and help. Idea

Thank you
Reply
#18
(29-04-2024, 12:30 PM)onfitpark Wrote: if the size of the body changes, bigger or thinner, the Max Error value should be changed, is it right?

No, only if the height of the model (in meters) changes by a significant amount like an order of magnitude or so. The max error is a distance metric, from the surface of the actual mesh to the surface of the distance field approximating it, making the body type thinner/thicker doesn't affect it in any way.


(29-04-2024, 12:30 PM)onfitpark Wrote: In my opinion, its surface, texture, or density still seems more like Jello. I know bringing the hard fbx to life is obviously a great challenge, but just try it with your advice and help. Idea

Surface and texture are determined by the material/shader/texture used on the model, these have nothing to do with physics.

If you mean that the behavior of the cloth is too springy/lively, you could increase the ObiSolver's "damping" parameter to make the simulation lose kinetic energy faster. This will make the cloth settle faster and look more like cotton and less like rubber.

kind regards,
Reply
#19
Hi,
thanks for your advice.

I'd like to share another question regarding physical matters while the body mesh is wearing a top and a bottom.

I set each clothes to have each ObiSolvers, gave them the same value. After simulating it, they didn't collide each other.
On the other hand, with one parent ObiSolver and two children, they look good; seems like they did collide each other. The top located on the outer layer as I intended,  and didn't pass through the bottom or the body.
In hierarchy-wise, I was wondering if there's certain principle in it. And I wonder which one is more stable.

Also, I was wondering if there's a way to designate a child that it should be placed the outer/inner layer.

Thank you
Reply
#20
(30-04-2024, 07:52 AM)onfitpark Wrote: I set each clothes to have each ObiSolvers,gave them the same value. After simulating it, they didn't collide each other.
On the other hand, with one parent ObiSolver and two children, they look good; seems like they did collide each other. 

The top located on the outer layer as I intended,  and didn't pass through the bottom or the body.In hierarchy-wise, I was wondering if there's certain principle in it.

Hi,

Yes, as explained in the manual actors managed by different solvers don't interact with each other, as they're part of separate simulations. See: http://obi.virtualmethodstudio.com/manua...olver.html

Quote:Each solver is completely independent from other solvers. Therefore, actors being updated by different solver won't interact / collide with each other. Only actors in the same solver will react to each other.


(30-04-2024, 07:52 AM)onfitpark Wrote: And I wonder which one is more stable.

Stability wise, having one solver vs having multiple solvers is the same: the core simulation method doesn't change.

(30-04-2024, 07:52 AM)onfitpark Wrote: Also, I was wondering if there's a way to designate a child that it should be placed the outer/inner layer.

This is entirely up to you. You can designate which actors should collide with other actors using collision filters.

kind regards,
Reply