Obi Official Forum
Help planes clipping! - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html)
+--- Thread: Help planes clipping! (/thread-1392.html)



planes clipping! - graciapples - 26-09-2019

Hi, we're trying to make a simulation for book pages blown by the wind. We've been using the inter-collision example by obicloth for reference, but it appears that the planes/pages will clip into each other if they're too close, even if their particles aren't touching. I turned on obi particle render in the pic below - when we press play, the planes just sink. Inter-collision only works if the gaps between the planes are huge, but we do need to keep the form of a book. New to unity here, please help! 
Huh Lengua


RE: planes clipping! - josemendez - 29-09-2019

(26-09-2019, 11:24 AM)graciapples Wrote: Hi, we're trying to make a simulation for book pages blown by the wind. We've been using the inter-collision example by obicloth for reference, but it appears that the planes/pages will clip into each other if they're too close, even if their particles aren't touching. I turned on obi particle render in the pic below - when we press play, the planes just sink. Inter-collision only works if the gaps between the planes are huge, but we do need to keep the form of a book. New to unity here, please help! 
Huh Lengua

Hi there,

Make sure the planes have different phases. See:
http://obi.virtualmethodstudio.com/tutorials/collisions.html

Since Obi is a particle-based engine, you'd need tiny particles (and very high mesh resolution) to simulate a book using it. Having lots of tiny particles would cause new issues: tunneling, bad performance, etc. Even if you had perfect mesh-mesh contact generation (which is expensive), preventing any tunneling between the pages would be a huge headache, since they're so thin.

Using physics to simulate a book is just not going to work. The enormous amount of intercollisions between the pages and the sheer precision needed to simulate it are simply too much to handle in realtime. Use a different approach (procedural animation, for instance).


RE: planes clipping! - graciapples - 30-09-2019

(29-09-2019, 12:02 PM)josemendez Wrote: Hi there,

Make sure the planes have different phases. See:
http://obi.virtualmethodstudio.com/tutorials/collisions.html

Since Obi is a particle-based engine, you'd need tiny particles (and very high mesh resolution) to simulate a book using it. Having lots of tiny particles would cause new issues: tunneling, bad performance, etc. Even if you had perfect mesh-mesh contact generation (which is expensive), preventing any tunneling between the pages would be a huge headache, since they're so thin.

Using physics to simulate a book is just not going to work. The enormous amount of intercollisions between the pages and the sheer precision needed to simulate it are simply too much to handle in realtime. Use a different approach (procedural animation, for instance).

Thank you so much for your reply!
Would these issues still persist if there are only a small amount of pages (e.g 10)?


Alternatively, if we were to pursue another form of simulation, such as your suggestion of procedural animation, would we be able to use the (hopefully) realistic motions created with Obi to serve as the animations and if so, how would we record/ convert the motion to animations?

Also, might you have any suggestions on how to overcome our current problems to arrive at realistic looking animations, instead of using real-time physics? 
Currently we are manipulating an object with ObiSphericalForceZone as well as the intensity of the force in order to "flip" the pages. Would we still be able to use this method, or do we need to shift to another method, such as moving the pages individually with inverse-kinematics?


again, thanks for helping us on our project.   Sonrojado


RE: planes clipping! - josemendez - 30-09-2019

(30-09-2019, 08:09 AM)graciapples Wrote: Thank you so much for your reply!
Would these issues still persist if there are only a small amount of pages (e.g 10)?


Alternatively, if we were to pursue another form of simulation, such as your suggestion of procedural animation, would we be able to use the (hopefully) realistic motions created with Obi to serve as the animations and if so, how would we record/ convert the motion to animations?

Also, might you have any suggestions on how to overcome our current problems to arrive at realistic looking animations, instead of using real-time physics? 
Currently we are manipulating an object with ObiSphericalForceZone as well as the intensity of the force in order to "flip" the pages. Would we still be able to use this method, or do we need to shift to another method, such as moving the pages individually with inverse-kinematics?


again, thanks for helping us on our project.   Sonrojado

Hi,

Yes, even with 10 pages it would be overkill, even with less pages depending on the maximum tolerable page thickness. You can do the math yourself: Consider a 20x20 cm page, 1 mm thickness. That's 200 x 200 particles = 40000 particles per page. Now, consider 10 pages touching each other: That would generate 40000 x 9 = 360000 contacts per frame, which is an awful lot. All that just to have the book sitting there, no wind affecting the pages.

First, consider if you really need to perform realtime simulation for your purpose. Most likely you do not, and if you do, chances are you don't need to go all the way down to consider wind forces over each individual page.

You can either generate your animation in any animation package (Blender for instance), and export it as skeletal animation. Then you can control page flipping in realtime by scrubbing trough the animation using a script.