Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  How to build a goal net mesh to use with Obi?
#11
So after configure a basic cloth and add some particle attachments my net is ready. But I'm facing two problems now.

Firstly, the net is too bouncy. After re-read some of the documentation, I find that part where it says that increasing substebs and constraints iterations should help with that, but after a few attempts the situation still happening.

The other issue I'm facing is regarding the collision, on powerful shots, the collision is registered (at least partially), but the ball passes through the net. I tried to play around with substeps too and manage to solve that problem adding around 10 subteps, but with this value, sometimes the scene runs normally, sometimes seems that my PC is struggling, which indicates performance problems.

My constraints evaluation and relaxation are with standard values. Some constraints are with their values altered while others are with standard values too. I'm using just one ball with Obi sphere collider and the net object has surface collisions enabled. Lastly, I'm not using any obi collision material for now, not sure if this would help with my problems.

My net has around 500 faces, totalizing 591 particles, not sure if I should lower this to improve performance and collision detection.
Reply
#12
(21-04-2021, 02:40 PM)gabrimo Wrote: So after configure a basic cloth and add some particle attachments my net is ready. But I'm facing two problems now.

Firstly, the net is too bouncy. After re-read some of the documentation, I find that part where it says that increasing substebs and constraints iterations should help with that, but after a few attempts the situation still happening.

3-4 substeps should remove any stretching from most cloth. Can you share a video of this issue?

(21-04-2021, 02:40 PM)gabrimo Wrote: The other issue I'm facing is regarding the collision, on powerful shots, the collision is registered (at least partially), but the ball passes through the net.

What's the mass of the ball, and the mass of each particle in the net? Large mass ratios can make it difficult for the cloth to stop a fast, comparatively heavy rigidbody (as it has a lot of momentum), even if collisions are properly detected.

(21-04-2021, 02:40 PM)gabrimo Wrote: I tried to play around with substeps too and manage to solve that problem adding around 10 subteps, but with this value, sometimes the scene runs normally, sometimes seems that my PC is struggling, which indicates performance problems.

The way you describe it really sounds like death spiraling. This is what happens when the cost of the simulation forces Unity to call FixedUpdate() multiple times per frame. Anyway, 10 substeps is way too much, 4 substeps should be enough for most purposes.

(21-04-2021, 02:40 PM)gabrimo Wrote: My net has around 500 faces, totalizing 591 particles, not sure if I should lower this to improve performance and collision detection.

Sounds reasonable to me.
Reply
#13
(21-04-2021, 03:07 PM)josemendez Wrote: 3-4 substeps should remove any stretching from most cloth. Can you share a video of this issue?

Sure, with the recorder enabled the only way I could show the issue was increasing to 5 substebs, apparently the recorder takes some performance of the game to run, here it is: 

https://imgur.com/a/hM7fKmZ



Quote:What's the mass of the ball, and the mass of each particle in the net? Large mass ratios can make it difficult for the cloth to stop a fast, comparatively heavy rigidbody (as it has a lot of momentum), even if collisions are properly detected.



Ball's rigidbody has 0.43 of mass. I don't know where to check the particle's mass though, they must be with the standard value, if there's a standard value for this anyway. Here's another video showing the problem, this time I decreased substeps to 4:

https://imgur.com/a/znEg7xC
Reply
#14
Hi,

I mixed up the meanings of bounciness and stretchiness in your previous post: increasing the amount of substeps will make the cloth less stretchy (less saggy, more tense) but will actually make it more bouncy, because it preserves energy more efficiently. This makes the cloth behave more like a trampoline, and the ball will bounce back from it.

You probably want to increase the max bending parameter in the bending constraints, and also increase max compression in the distance constraints (both parameters can be found in the ObiCloth component). The first will have the effect of allowing the net to bend more easily (so that it is less like steel wire and more like cotton), and the second will allow some compression of the fibers (since nets compress and crumple very easily, unlike tight-woven fabric). See:
http://obi.virtualmethodstudio.com/tutor...aints.html
http://obi.virtualmethodstudio.com/tutor...aints.html


(21-04-2021, 03:45 PM)gabrimo Wrote: Ball's rigidbody has 0.43 of mass. I don't know where to check the particle's mass though, they must be with the standard value, if there's a standard value for this anyway. Here's another video showing the problem, this time I decreased substeps to 4:

https://imgur.com/a/znEg7xC

You can change the mass on a per-particle basis in the blueprint editor. You have a dropdown menu that lets you choose which particle property you're editing: (mass, radius, phase or color). You can either select particles and set their value directly, or you can use the paint tool to paint values on the surface of the mesh.

I believe the default is 0.1 per particle, which is too little in this case. I'd try using 0.2-0.3. The higher the mass of the cloth, the easier it will be for it to stop a fast moving, heavier ball.
Reply
#15
(22-04-2021, 07:36 AM)josemendez Wrote: Hi,

I mixed up the meanings of bounciness and stretchiness in your previous post: increasing the amount of substeps will make the cloth less stretchy (less saggy, more tense) but will actually make it more bouncy, because it preserves energy more efficiently. This makes the cloth behave more like a trampoline, and the ball will bounce back from it.

You probably want to increase the max bending parameter in the bending constraints, and also increase max compression in the distance constraints (both parameters can be found in the ObiCloth component). The first will have the effect of allowing the net to bend more easily (so that it is less like steel wire and more like cotton), and the second will allow some compression of the fibers (since nets compress and crumple very easily, unlike tight-woven fabric). See:
http://obi.virtualmethodstudio.com/tutor...aints.html
http://obi.virtualmethodstudio.com/tutor...aints.html



You can change the mass on a per-particle basis in the blueprint editor. You have a dropdown menu that lets you choose which particle property you're editing: (mass, radius, phase or color). You can either select particles and set their value directly, or you can use the paint tool to paint values on the surface of the mesh.

I believe the default is 0.1 per particle, which is too little in this case. I'd try using 0.2-0.3. The higher the mass of the cloth, the easier it will be for it to stop a fast moving, heavier ball.

Well, many thanks man. 

After tweaking the parameters you recommended I've got a satisfactory result. This physics part is hard to adjust IMO, I have problems to tweak Unity's physics materials for instance, but with Obi plus your direct help I finally got some results. I end up adding an Obi's collision material on the net too, this is my final result (for now anyway):

I'll write my review on Asset Store to help you and your product a little more...
Reply
#16
Thanks for your review! I really appreciate that you took some time to write it. Reviews always help a lot.

Let me know if you need help anytime Sonrisa
Reply