Announcement

Collapse
No announcement yet.

VICODynamics: a particle based Soft-Body physics Plugin

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

    Is anyone else having issues getting a non-zero length for the ParticleArray in the VDRope Component, using UE4.22? I can't grab specific particles and attach them where I need to because the Array is empty. I've set the number of segments to 40, and have moved the value around but the particle array never returns a length above 0.

    Update: Turns out if the folders are named incorrectly sometimes the .dll won't load. Fixing the folder names fixed it.
    Last edited by Ascendancy; 04-18-2019, 01:42 PM.
    Website: http://www.NonLocalitySoftware.com
    Facebook: www.facebook.com/NonLocalitySoftware
    Twitter: https://twitter.com/NonLocality_Dev
    Instagram: @nonlocalitysoftware
    Discord: ASCII#1124

    Comment


      Originally posted by Ascendancy View Post
      Is anyone else having issues getting a non-zero length for the ParticleArray in the VDRope Component, using UE4.22? I can't grab specific particles and attach them where I need to because the Array is empty. I've set the number of segments to 40, and have moved the value around but the particle array never returns a length above 0.
      This was reported by one other dev, I'm looking into it now
      Owner of VICO Game Studio LLC
      Twitter: @VICO_GameStudio
      Current Projects:
      CHIKARA: Action Arcade Wrestling in collaboration with Dave Horn (@Action937) and CHIKARA Pro Wrestling - WIP Thread
      VICO Dynamics Physics Library - Details: https://www.vicogamestudio.com/projects/vico-dynamics

      Comment


        Originally posted by Dreika View Post
        Thanks for the update 4.22. There is success with the implementation of the spring?
        It's coming along, I hope to have it in the next feature update
        Owner of VICO Game Studio LLC
        Twitter: @VICO_GameStudio
        Current Projects:
        CHIKARA: Action Arcade Wrestling in collaboration with Dave Horn (@Action937) and CHIKARA Pro Wrestling - WIP Thread
        VICO Dynamics Physics Library - Details: https://www.vicogamestudio.com/projects/vico-dynamics

        Comment


          Hi! I am trying to spawn and attach a rope during runtime, which generally works well using the rebuild rope nodes. The problem is that the direction in which the cable comes out from the attached object is crucial. I am looking to spawn something like this:

          Click image for larger version

Name:	PlacedRope.PNG
Views:	69
Size:	154.5 KB
ID:	1612418

          Using the rebuild node I get this:

          Click image for larger version

Name:	RebuiltRope.PNG
Views:	66
Size:	127.6 KB
ID:	1612419

          And trying to spawn the setup from the first image, this:

          Click image for larger version

Name:	SpawnedRope.PNG
Views:	78
Size:	248.2 KB
ID:	1612420

          What can I do to achieve my goal?

          Comment


            I found the 'Attach to overlapping rigid bodies' node and it works, but only if the two meshes are directly opposed. As soon as they are not, only the start location target attaches properly (with the correct direction), the other one just dangles:

            Click image for larger version

Name:	Rope.PNG
Views:	68
Size:	214.5 KB
ID:	1612510

            Any way to work around this?

            Comment


              Originally posted by LenaAlthammer View Post
              I found the 'Attach to overlapping rigid bodies' node and it works, but only if the two meshes are directly opposed. As soon as they are not, only the start location target attaches properly (with the correct direction), the other one just dangles:

              Click image for larger version

Name:	Rope.PNG
Views:	68
Size:	214.5 KB
ID:	1612510

              Any way to work around this?
              Have you tried creating the attachment right after spawning the rope? You can do that by calling any of the Attach* nodes on the end Particle. You can grab any of the Particles via the "Particles" array in the Rope Component. The order is such that the end points are at index 0 and N-1. Let me know if that helps
              Owner of VICO Game Studio LLC
              Twitter: @VICO_GameStudio
              Current Projects:
              CHIKARA: Action Arcade Wrestling in collaboration with Dave Horn (@Action937) and CHIKARA Pro Wrestling - WIP Thread
              VICO Dynamics Physics Library - Details: https://www.vicogamestudio.com/projects/vico-dynamics

              Comment


                I tried the following:

                Click image for larger version  Name:	Unbenannt.PNG Views:	2 Size:	177.2 KB ID:	1613362

                Unfortunately, the length of the Particles array is always output as 0. Is that a bug? I am using your example project in 4.22

                Comment


                  I managed to access the correct number of particles by adding a small delay after rebuilding the rope, and to attach the rope.
                  It still dangles, though:

                  Click image for larger version  Name:	Unbenannt.PNG Views:	1 Size:	229.7 KB ID:	1613380
                  Last edited by LenaAlthammer; 04-29-2019, 06:30 AM.

                  Comment


                    Originally posted by LenaAlthammer View Post
                    I managed to access the correct number of particles by adding a small delay after rebuilding the rope, and to attach the rope.
                    It still dangles, though:

                    Click image for larger version Name:	Unbenannt.PNG Views:	1 Size:	229.7 KB ID:	1613380
                    Regarding empty Particles array on BeginPlay, this is correct as the rope has not been Built/Rebuilt just yet. You should bind to the OnSimulationDataCreated event of the Component. This will guarantee that the data is ready to be accessed.

                    Regarding the dangling, try setting the rest length after the Rebuild has completed to a bit less than the distance between the start and end actors. The node is SetNewRestLength.
                    Owner of VICO Game Studio LLC
                    Twitter: @VICO_GameStudio
                    Current Projects:
                    CHIKARA: Action Arcade Wrestling in collaboration with Dave Horn (@Action937) and CHIKARA Pro Wrestling - WIP Thread
                    VICO Dynamics Physics Library - Details: https://www.vicogamestudio.com/projects/vico-dynamics

                    Comment


                      Originally posted by VICOGameStudio View Post

                      Regarding empty Particles array on BeginPlay, this is correct as the rope has not been Built/Rebuilt just yet. You should bind to the OnSimulationDataCreated event of the Component. This will guarantee that the data is ready to be accessed.
                      Actually, this is not the case. If you look at my blueprint above, you'll see the Print String node (that logged a 0) is placed after the rope was rebuilt.

                      Originally posted by VICOGameStudio View Post

                      Regarding the dangling, try setting the rest length after the Rebuild has completed to a bit less than the distance between the start and end actors. The node is SetNewRestLength.
                      This is not a solution, as I do want the rope to dangle at the center, just not at the start and end points. After looking through the code, I realized three particles were overlapping the start point when trying to attach to overlapping rigid bodies, while only one overlapped the end point, which caused the different attach effect. I solved it by manually attaching the three last particles manually to their destination:


                      Click image for larger version

Name:	Unbenannt.PNG
Views:	63
Size:	202.8 KB
ID:	1613473

                      So I got the desired result, but it feels like kind of a workaround.

                      Comment


                        Originally posted by LenaAlthammer View Post

                        Actually, this is not the case. If you look at my blueprint above, you'll see the Print String node (that logged a 0) is placed after the rope was rebuilt.
                        The rebuild is setup at that point, but is fully completed on the next Simulation Sync due to resource handling and thread handling. I will add a note for that node.

                        Originally posted by LenaAlthammer View Post

                        This is not a solution, as I do want the rope to dangle at the center, just not at the start and end points. After looking through the code, I realized three particles were overlapping the start point when trying to attach to overlapping rigid bodies, while only one overlapped the end point, which caused the different attach effect. I solved it by manually attaching the three last particles manually to their destination:


                        Click image for larger version

Name:	Unbenannt.PNG
Views:	63
Size:	202.8 KB
ID:	1613473

                        So I got the desired result, but it feels like kind of a workaround.
                        Ah! I understand what you meant by dangling. Right, the Attach to overlapping rigids node over compensates to attach particles which may be close enough to intersect with the geometry. Whereas when manually setting up attachment it is up to you to attach the needed particles. I can look into adding a convenience function/node
                        Owner of VICO Game Studio LLC
                        Twitter: @VICO_GameStudio
                        Current Projects:
                        CHIKARA: Action Arcade Wrestling in collaboration with Dave Horn (@Action937) and CHIKARA Pro Wrestling - WIP Thread
                        VICO Dynamics Physics Library - Details: https://www.vicogamestudio.com/projects/vico-dynamics

                        Comment


                          Great, thanks! Sorry if my explanations weren't clear.

                          Comment


                            Will cloth stay where you put it now? Has the sliding issue been fixed yet?
                            @
                            Originally posted by VICOGameStudio View Post
                            The rebuild is setup at that point, but is fully completed on the next Simulation Sync due to resource handling and thread handling. I will add a note for that node.


                            Ah! I understand what you meant by dangling. Right, the Attach to overlapping rigids node over compensates to attach particles which may be close enough to intersect with the geometry. Whereas when manually setting up attachment it is up to you to attach the needed particles. I can look into adding a convenience function/node

                            Comment


                              VICOGameStudio
                              Will cloth stay where you put it now? Has the sliding issue been fixed yet?
                              Sorry for the double post, forgot how to tag people in posts for a minute lol

                              Comment


                                Originally posted by jojo8026 View Post
                                VICOGameStudio
                                Will cloth stay where you put it now? Has the sliding issue been fixed yet?
                                Sorry for the double post, forgot how to tag people in posts for a minute lol
                                I have not released an update yet, so no changes just yet. But I do have someone working on collision now, so it should not be too long until this issue is fully addressed.
                                Owner of VICO Game Studio LLC
                                Twitter: @VICO_GameStudio
                                Current Projects:
                                CHIKARA: Action Arcade Wrestling in collaboration with Dave Horn (@Action937) and CHIKARA Pro Wrestling - WIP Thread
                                VICO Dynamics Physics Library - Details: https://www.vicogamestudio.com/projects/vico-dynamics

                                Comment

                                Working...
                                X