Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cloth Weird Collider Behavior
#1
[/url]
[url=https://imgur.com/a/0GxD8Lv]https://imgur.com/a/0GxD8Lv

so I started working with Obi-Cloth to create the plastic sheet thing we need but I get this weird collider behavior...

it only happens on imported models , something like their collider is being detected in a wrong position and rotation...

any idea what might be the problem?

[Image: 0GxD8Lv]

https://imgur.com/a/0GxD8Lv
Reply
#2
(17-06-2020, 01:27 PM)Elend Wrote: [/url]
[url=https://imgur.com/a/0GxD8Lv]https://imgur.com/a/0GxD8Lv

so I started working with Obi-Cloth to create the plastic sheet thing we need but I get this weird collider behavior...

it only happens on imported models , something like their collider is being detected in a wrong position and rotation...

any idea what might be the problem?

[Image: 0GxD8Lv]

https://imgur.com/a/0GxD8Lv

Hi Elend,

I don't really understand what I'm looking at in the pic. It's just a banana with a box collider component, and as far as I can tell the cloth is doing what it is supposed to do.

If you want the cloth to wrap around the mesh, maybe using a MeshCollider instead of a box would be better?
Reply
#3
(17-06-2020, 01:33 PM)josemendez Wrote: Hi Elend,

I don't really understand what I'm looking at in the pic. It's just a banana with a box collider component, and as far as I can tell the cloth is doing what it is supposed to do.

If you want the cloth to wrap around the mesh, maybe using a MeshCollider instead of a box would be better?

With MeshCollider the collision would be even worse.
The problem is that my object (banana) goes throw the cloth (plastic) 
with box collider things are a bit better but this happens : cloth collides with a different box collider (it seems ) instead of the green box collider
its like Obi Collider is not detecting the Source Collider correctly for some reason...
Reply
#4
(17-06-2020, 01:46 PM)Elend Wrote: With MeshCollider the collision would be even worse.
The problem is that my object (banana) goes throw the cloth (plastic) 
with box collider things are a bit better but this happens : cloth collides with a different box collider (it seems ) instead of the green box collider
its like Obi Collider is not detecting the Source Collider correctly for some reason...

Hi there,

ObiCollider will grab the first collider up its hierarchy by default, but you can manually set it too.

MeshColliders are paper-thin, by definition: they're just a collection of triangles, and have no concept of "volume" inside the object. This means that if a particle goes inside it (due to tunneling, too large a timestep, pushed by another collider, or any other reason) it won't be projected back outside.

Primitive colliders are solid however, and can project other objects inside them. That's why they're usually much more robust (and cheaper).

In Obi we have a custom collision structure, widely used in many other engines because it combines the strengths of primitive colliders and mesh colliders: distance fields. They're a grid-like data structure that precomputes the distance to the surface of an object from within any point inside its bounding box. This way, checking for collision is extremely efficient (simply read a value back from an array) and robust, since objects inside of it can be projected outside just by checking the sign of the distance (negative = inside, positive = outside).

I really recommend using them for this use case. You can read more about them here: http://obi.virtualmethodstudio.com/tutor...ields.html
Reply
#5
(17-06-2020, 02:00 PM)josemendez Wrote: Hi there,

ObiCollider will grab the first collider up its hierarchy by default, but you can manually set it too.

MeshColliders are paper-thin, by definition: they're just a collection of triangles, and have no concept of "volume" inside the object. This means that if a particle goes inside it (due to tunneling, too large a timestep, pushed by another collider, or any other reason) it won't be projected back outside.

Primitive colliders are solid however, and can project other objects inside them. That's why they're usually much more robust (and cheaper).

In Obi we have a custom collision structure, widely used in many other engines because it combines the strengths of primitive colliders and mesh colliders: distance fields. They're a grid-like data structure that precomputes the distance to the surface of an object from within any point inside its bounding box. This way, checking for collision is extremely efficient (simply read a value back from an array) and robust, since objects inside of it can be projected outside just by checking the sign of the distance (negative = inside, positive = outside).

I really recommend using them for this use case. You can read more about them here: http://obi.virtualmethodstudio.com/tutor...ields.html

ok thanks ! hope it solves my problem
Reply
#6
(17-06-2020, 02:31 PM)Elend Wrote: ok thanks ! hope it solves my problem

No...Still Weird Collisions. it there any way to see Obi generated distance field in scene? or Obi Collider itself?
Reply
#7
(17-06-2020, 04:37 PM)Elend Wrote: No...Still Weird Collisions. it there any way to see Obi generated distance field in scene? or Obi Collider itself?

You get a volumetric preview of the distance field in the distance field inspector itself, like shown in the picture in the manual.

I just tested it with an apple-shaped mesh and works just fine. Maybe if you record a video of what you're doing and the output you're getting, I can help you diagnose the cause?
Reply