Announcement

Collapse
No announcement yet.

VICODynamics: a particle based Soft-Body physics Plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by TeddyJeez View Post
    Oops, stop. SimulateTension enabled only on second sphere. If I enable Tension on first sphere, she'll behave also as second.

    And if I pick up sphere, Simulate Physics is disable.
    Aha, that has narrowed it down! I'm currently making a check to see if the attached object has physics enabled and skip constraint solving if it doesn't because my initial assumption was that it'd remain still. I'll get this fixed in the upcoming patch. Thank you, TeddyJeez!
    Last edited by VICOGameStudio; 01-18-2018, 03:43 PM.
    Owner of VICO Game Studio LLC
    Twitter: @VICO_GameStudio
    Current Projects:
    Action Arcade Wrestling in collaboration with Dave Horn (@Action937) - https://www.actionarcadewrestling.com/
    VICO Dynamics Physics Library - Details: https://www.vicogamestudio.com/projects/vico-dynamics

    Comment


      Some initial performance metrics on the Switch from my own benchmark which tests the raw simulation performance. The Switch was running in handheld mode. This does not include the overhead of Physx Queries. Each run does 2000 frames and averages the results. All runs are done with the simulation targeting 60 fps, with 3 substeps and 8 constraint iterations every substep.

      Single-threaded results:

      1K Particles with 1.7K Constraints with Particle-Particle collision disabled:
      Code:
      Starting Simulation...
      Particle Count: 1000
      
      Simulation finished! Results in MS over the total simulated frames [Total, Avg]
      
      Simulation: 2798.35, 1.39917
      Velocity: 171.708, 0.085854
      Constraints: 2370.9, 1.18545, {0.0370454 <- (this is per constraint iteration)}
      Correction: 250.065, 0.125033
      Collision: 0.733, 0.0003665
      Particle Count: 1000
      Constraint Count: 1700
      1.3997ms

      1K Particles with 1.7K Constraints with Particle-Particle collision enabled:
      Code:
      Starting Simulation...
      Particle Count: 1000
      
      Simulation finished! Results in MS over the total simulated frames [Total, Avg]
      
      Simulation: 4864.13, 2.43207
      Velocity: 175.004, 0.087502
      Constraints: 2392.74, 1.19637, {0.0373865 <- (this is per constraint iteration)}
      Correction: 260.138, 0.130069
      Collision: 1193.01, 0.596507
          BroadPhase: 1185.71, 0.592853
          NarrowPhase: 5.624, 0.002812
      Collision Spatial Hash Reset: 837.554, 0.418777
      Particle Count: 1000
      Constraint Count: 1700
      2.43207ms

      With this many Particles, the multi-threaded version is actually a bit slower due to the overhead outweighing the gains. So we'll push the Particle/Constraint count up to the limit for a pure 60fps simulation. We can run 4.5K Particles with 8.7K Constraints with Collision enabled at just under 16.6ms.

      4.5K Particles with 8.7K Constraints with Particle-Particle collision disabled:
      Code:
      Starting Simulation...
      Particle Count: 4500
      
      Simulation finished! Results in MS over the total simulated frames [Total, Avg]
      
      Simulation: 20384.1, 10.1921
      Velocity: 1124.85, 0.562426
      Constraints: 17299.3, 8.64965, {0.270301}
      Correction: 1951.94, 0.975971
      Collision: 0.791, 0.0003955
          BroadPhase: 0, 0
          NarrowPhase: 0, 0
      Collision Spatial Hash Reset: 0, 0
      Particle Count: 4500
      Constraint Count: 8700
      10.1921ms

      4.5K Particles with 8.7K Constraints with Particle-Particle collision enabled:
      Code:
      Starting Simulation...
      Particle Count: 4500
      
      Simulation finished! Results in MS over the total simulated frames [Total, Avg]
      
      Simulation: 32506.9, 16.2535
      Velocity: 1407.53, 0.703765
      Constraints: 17412.9, 8.70643, {0.272076}
      Correction: 2307.16, 1.15358
      Collision: 7144.02, 3.57201
          BroadPhase: 7084.11, 3.54206
          NarrowPhase: 57.246, 0.028623
      Collision Spatial Hash Reset: 4225.61, 2.1128
      Particle Count: 4500
      Constraint Count: 8700
      16.2535ms

      And now the same tests with multi-threading (3 threads):

      4.5K Particles with 8.7K Constraints with Particle-Particle collision disabled:
      Code:
      Starting Simulation...
      Particle Count: 4500
      
      Simulation finished! Results in MS over the total simulated frames [Total, Avg]
      
      Simulation: 16053.9, 8.02697
      Velocity: 1172.67, 0.586336
      Constraints: 13104.7, 6.55233, 0.20476
      Correction: 1766.53, 0.883264
      Collision: 1.708, 0.000854
          BroadPhase: 0, 0
          NarrowPhase: 0, 0
      Collision Spatial Hash Reset: 0, 0
      Particle Count: 4500
      Constraint Count: 8700
      8.02697ms

      4.5K Particles with 8.7K Constraints with Particle-Particle collision enabled:
      Code:
      Starting Simulation...
      Particle Count: 4500
      
      Simulation finished! Results in MS over the total simulated frames [Total, Avg]
      
      Simulation: 29782.4, 14.8912
      Velocity: 1435.92, 0.717961
      Constraints: 13530.6, 6.7653, 0.211416
      Correction: 2052.56, 1.02628
      Collision: 9747.79, 4.8739
          BroadPhase: 9730.95, 4.86548
          NarrowPhase: 12.78, 0.00639
      Collision Spatial Hash Reset: 3005.47, 1.50273
      Particle Count: 4500
      Constraint Count: 8700
      14.8912ms

      Multi-threaded version is ~9-21% (Collision lowers the difference) faster than single-threaded which is not very much at all due to the overhead of multi-threading. The benefits are really seen once you start using tens of thousands of particles/constraints. Nevertheless, the support is in the library for the Switch

      Overall, I'm very impressed as it stands! And the next tests will be done with PhysX from within my UE4 test project, stay tuned for those!

      PS: Switch support will be merged into the main branch on GitHub next week
      Owner of VICO Game Studio LLC
      Twitter: @VICO_GameStudio
      Current Projects:
      Action Arcade Wrestling in collaboration with Dave Horn (@Action937) - https://www.actionarcadewrestling.com/
      VICO Dynamics Physics Library - Details: https://www.vicogamestudio.com/projects/vico-dynamics

      Comment


        Hey there, sorry if this has already been asked, but in consideration for purchasing this product, I'm wondering if it would be possible to use the spline path-rope function to have a pawn with a skeletal mesh move up along a rope for a climbing function?

        Cheers!

        Comment


          Originally posted by hippowombat View Post
          Hey there, sorry if this has already been asked, but in consideration for purchasing this product, I'm wondering if it would be possible to use the spline path-rope function to have a pawn with a skeletal mesh move up along a rope for a climbing function?

          Cheers!
          Absolutely! That is the way I recommend to setup any sort of climbing or traversing of Ropes/Cables. You can even 'fake' weight transfer, if traversing, by changing the Particle mass as the pawn goes across them giving the feel of a heavy object moving along the rope/cable.
          Owner of VICO Game Studio LLC
          Twitter: @VICO_GameStudio
          Current Projects:
          Action Arcade Wrestling in collaboration with Dave Horn (@Action937) - https://www.actionarcadewrestling.com/
          VICO Dynamics Physics Library - Details: https://www.vicogamestudio.com/projects/vico-dynamics

          Comment


            Originally posted by VICOGameStudio View Post

            Absolutely! That is the way I recommend to setup any sort of climbing or traversing of Ropes/Cables. You can even 'fake' weight transfer, if traversing, by changing the Particle mass as the pawn goes across them giving the feel of a heavy object moving along the rope/cable.
            Thank you so much for your answer, that's absolutely wonderful. I'll be making the purchase next week, I look forward to utilizing this awesome plugin.

            Cheers!

            Comment


              Hey. Can I use your program for this purpose? You have to grasp from the bobbin the edge of the fabric(cloth or tape) with the mouse (about a meter width) and unwind the part (about 4 meters).Than you have to catch wrapped part of the mouse by the edge and drag through the sticks (with sticks there must be a collision, the sticks are perpendicular to the direction of dragging the fabric, the fabric lies on the sticks) and attach the edge to anything. And all this must be in the game mode(realtime).

              Comment


                Good work !
                Attached Files
                Last edited by СергейСПб; 02-01-2018, 03:46 AM.

                Comment


                  Hello! I have a question, how to make a rope not stretchable?

                  Comment


                    I have to think of a reason to use this, it's too awesome.

                    edit: I have one. If I make a naval mine and have it bob around in the water, can the chain attached (to the bottom of the ocean) react accordingly with this plugin?
                    Last edited by duke22; 01-27-2018, 03:01 AM.
                    George Rolfe.
                    Technical Coordinator at Orbit Solutions Pty Ltd.

                    Comment


                      Originally posted by СергейСПб View Post
                      Hey. Can I use your program for this purpose? You have to grasp from the bobbin the edge of the fabric(cloth or tape) with the mouse (about a meter width) and unwind the part (about 4 meters).Than you have to catch wrapped part of the mouse by the edge and drag through the sticks (with sticks there must be a collision, the sticks are perpendicular to the direction of dragging the fabric, the fabric lies on the sticks) and attach the edge to anything. And all this must be in the game mode(realtime). Click image for larger version

Name:	unrealQ.png
Views:	133
Size:	216.6 KB
ID:	1418851
                      Hello Sergey, I replied to your question in the Marketplace page a little while ago, did you not see it? I'll post it here as well, just in case:
                      Code:
                      Hi Sergey, the biggest issue with this use-case is the wound up cloth and the rollers holding the cloth.
                      This is a very complex collision interaction and I do not believe you'll get decent enough results with VICO Dynamics.
                      But the other use-cases you listed should work pretty well, I think.
                      Hope that helps.
                      Owner of VICO Game Studio LLC
                      Twitter: @VICO_GameStudio
                      Current Projects:
                      Action Arcade Wrestling in collaboration with Dave Horn (@Action937) - https://www.actionarcadewrestling.com/
                      VICO Dynamics Physics Library - Details: https://www.vicogamestudio.com/projects/vico-dynamics

                      Comment


                        Originally posted by TeddyJeez View Post
                        Hello! I have a question, how to make a rope not stretchable?
                        Hi TeddyJeez,
                        Short answer is, no. The long answer is, sort-of. The system is elastic at its core, hence being a soft-body system. There is no way, currently, to make a fully rigid rope/cloth. But you can reduce the stretchiness at the cost of performance. Go into Project Settings -> VICO Dynamics and change the Simulation Iterations to a higher number, try 5 or 8 or higher if your performance allows. This will tighten up the solver results a good bit.
                        Owner of VICO Game Studio LLC
                        Twitter: @VICO_GameStudio
                        Current Projects:
                        Action Arcade Wrestling in collaboration with Dave Horn (@Action937) - https://www.actionarcadewrestling.com/
                        VICO Dynamics Physics Library - Details: https://www.vicogamestudio.com/projects/vico-dynamics

                        Comment


                          Originally posted by duke22 View Post
                          I have to think of a reason to use this, it's too awesome.

                          edit: I have one. If I make a naval mine and have it bob around in the water, can the chain attached (to the bottom of the ocean) react accordingly with this plugin?
                          Hi duke22,
                          Thank you for the kind words!

                          The problem with chains is that they are not elastic and, as I mentioned above to TeddyJeez, the core solver in my plugin is built around elasticity. But you can get results that are closer to being rigid by increasing the Simulation Iterations setting at the cost of performance.

                          Hope that helps.
                          Owner of VICO Game Studio LLC
                          Twitter: @VICO_GameStudio
                          Current Projects:
                          Action Arcade Wrestling in collaboration with Dave Horn (@Action937) - https://www.actionarcadewrestling.com/
                          VICO Dynamics Physics Library - Details: https://www.vicogamestudio.com/projects/vico-dynamics

                          Comment


                            Thanks, I'll try)
                            Originally posted by VICOGameStudio View Post

                            Hello Sergey, I replied to your question in the Marketplace page a little while ago, did you not see it? I'll post it here as well, just in case:
                            Code:
                            Hi Sergey, the biggest issue with this use-case is the wound up cloth and the rollers holding the cloth.
                            This is a very complex collision interaction and I do not believe you'll get decent enough results with VICO Dynamics.
                            But the other use-cases you listed should work pretty well, I think.
                            Hope that helps.

                            Comment


                              A quick update on the Switch testing in UE4: finally had a little bit of time to setup and start testing, first test was a simple 20 particle rope with 38 constraints, particle collision and PhysX collision enabled:
                              Total per-frame was .35ms with PhysX collision taking over half that time at .2ms
                              Particle collision took .12ms
                              And the actual solver took ~.025ms

                              More soon with screenshots!
                              Owner of VICO Game Studio LLC
                              Twitter: @VICO_GameStudio
                              Current Projects:
                              Action Arcade Wrestling in collaboration with Dave Horn (@Action937) - https://www.actionarcadewrestling.com/
                              VICO Dynamics Physics Library - Details: https://www.vicogamestudio.com/projects/vico-dynamics

                              Comment


                                A screenshot straight off the Switch! This is with the same settings as above, but with 111 Particles and 359 Constraints with 3 sub-steps and 8 Constraint Iterations per sub-step.
                                The stats on the left are:
                                Sim - Total simulation time
                                Vel - Velocity solver time
                                Con - Constraint solver time
                                PCol - Particle collision resolution time
                                RCol - PhysX Rigid Body collision resolution time

                                As you can see, the bottleneck is, unfortunately, the PhysX Scene Query interface...

                                Click image for larger version

Name:	2018020205302800-B55776599E26001C0DCAD1B74AA95364.jpg
Views:	95
Size:	89.8 KB
ID:	1422291
                                Owner of VICO Game Studio LLC
                                Twitter: @VICO_GameStudio
                                Current Projects:
                                Action Arcade Wrestling in collaboration with Dave Horn (@Action937) - https://www.actionarcadewrestling.com/
                                VICO Dynamics Physics Library - Details: https://www.vicogamestudio.com/projects/vico-dynamics

                                Comment

                                Working...
                                X