Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  hole in collider
#1
[Image: hole.png]I would like the fluid to go through a hole in a container. I modified the 3D object Environnement from the sample ressources to cut a hole in it (see image hole). But it's not working (see example.mov), what am I doing wrong?

http://julienrobert.net/partage/example.mov

thanks
Reply
#2
Maybe you haven't updated the mesh distance field.
See:
http://obi.virtualmethodstudio.com/tutor...ields.html

Keep in mind that distance fields for one-sided objects with holes in them are not well defined. You might want to deactivate distance fields entirely (the "use distance fields" checkbox in the ObiCollider component), or use a two-sided mesh instead.
Reply
#3
(08-04-2020, 05:09 PM)josemendez Wrote: Maybe you haven't updated the mesh distance field.
See:
http://obi.virtualmethodstudio.com/tutor...ields.html

Keep in mind that distance fields for one-sided objects with holes in them are not well defined. You might want to deactivate distance fields entirely (the "use distance fields" checkbox in the ObiCollider component), or use a two-sided mesh instead.

Thanks Jose.
Generating a new distance field didn't solve the problem, it's doing the same. Maybe it's one-sided mesh the problem.
When I uncheck Use Distance Field, the fluid goes through the mesh completely.
Reply
#4
(08-04-2020, 05:51 PM)julienrobert Wrote: When I uncheck Use Distance Field, the fluid goes through the mesh completely.

This is called tunneling and is common in all physics engines. It is exacerbated when using small objects and/or moving things around. See:
https://www.youtube.com/watch?v=ms0Z35GY6pk

MeshColliders are "paper-thin", meaning that they do not have a volume: only the mesh triangles collide with particles. But once a particle has passed trough a triangle in a single timestep, it cannot be projected back.

That's precisely why distance fields are useful: they are solid, even if they are concave. This allows particles to be projected to the surface of the field if they ever get inside.

However, for a one-sided mesh with holes...how can you define what's "inside" and "outside" the mesh, if it has no volume, and it does not divide space into two clear, distinct regions?  You need a closed mesh for this, and that's why distance fields are ill-defined for one sided, holed shapes.
Reply
#5
[quote pid='6330' dateline='1586365172']
However, for a one-sided mesh with holes...how can you define what's "inside" and "outside" the mesh, if it has no volume, and it does not divide space into two clear, distinct regions?  You need a closed mesh for this, and that's why distance fields are ill-defined for one sided, holed shapes.
[/quote]

I will consider building a two-sided mesh.
Reply
#6
I did a 2-sided mesh. I'm used to modeling so I might have done something wrong because now the distance field looks inversed.[Image: inversed.png]
Reply
#7
(13-04-2020, 03:02 PM)julienrobert Wrote: I did a 2-sided mesh. I'm used to modeling so I might have done something wrong because now the distance field looks inversed.[Image: inversed.png]

Normal direction is very important. Make sure the "outside" of the mesh has normals pointing outside, not the other way around.
Reply