Announcement

Collapse
No announcement yet.

Implement Runtime Collision Detection for Procedural Generated Meshes

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

    Implement Runtime Collision Detection for Procedural Generated Meshes

    Currently, collisions detection for procedural generated meshes require either pre-cooking, or an aggregate of simple shapes to approximate mesh shape. In all cases, to detect mesh collisions requires fiddling under the hood, linking extra PhysX libraries, and implementing custom cooking routines. Further, it seems that run-time cooking will be disallowed starting in 4.1, and will require workarounds to implement in projects. See this post.

    The suggestion is to allow collision detection for arbitrary procedural generated convex meshes as easily as for pre-cooked shapes. This is a feature that exists in Unity 3D, see this link. Unity uses PhysX, and supports procedural generated meshes without cooking out of the box.

    If the design decision by Epic is to disallow run-time cooking in 4.1, then at least provide a module that can be linked to so that it may be easily implemented.
    180
    YES! This is very important to my workflow and would be beneficial.
    85.56%
    154
    Maybe. It might be nice, but not urgent.
    12.22%
    22
    No. I do not feel this suggestion is necessary.
    2.22%
    4
    It is by will alone I set my code in motion.
    It is by coding that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning.
    It is by will alone I set my code in motion.

    #2
    We've had a discussion here, and the current plan is to add a build option to control whether we link in the PhysX cooking library. We will default to including this for PC/Mac runtime, but exclude it for mobile runtime. This should be quite easy for users to change though.

    Once you have the cooking libraries linked in (which is the case now, and will continue to be the case for 4.1 because APEX requires them), things should 'just work'. If you create a new mesh/bodysetup at runtime, when you register it the engine will call InitBody, which looks for cooked PhysX data, and will cook it if none is found.
    Lead Programmer - UE4 Animation/Physics/Audio Team - Epic Games
    Twitter: @EpicJamesG

    Comment


      #3
      Originally posted by JamesG View Post
      We've had a discussion here, and the current plan is to add a build option to control whether we link in the PhysX cooking library. We will default to including this for PC/Mac runtime, but exclude it for mobile runtime. This should be quite easy for users to change though.

      Once you have the cooking libraries linked in (which is the case now, and will continue to be the case for 4.1 because APEX requires them), things should 'just work'. If you create a new mesh/bodysetup at runtime, when you register it the engine will call InitBody, which looks for cooked PhysX data, and will cook it if none is found.
      That is good to hear! Thanks.

      EDIT: The "just working" part will be in 4.1, or it should work now? If I look at the UBodySetup, it will only cook WITH_EDITOR
      Last edited by Andargor; 04-11-2014, 11:08 AM.
      It is by will alone I set my code in motion.
      It is by coding that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning.
      It is by will alone I set my code in motion.

      Comment


        #4
        Originally posted by dmacesic View Post
        EDIT: The "just working" part will be in 4.1, or it should work now? If I look at the UBodySetup, it will only cook WITH_EDITOR
        Are you running 4.0 or are you running latest code from GitHub?

        Edit: Looks like that restriction was already in place in 4.0, my apologies for the confusion. There is some work we need to do to implement what I describe above, and I'm afraid we will not have time to do it for 4.1. We'll aim to get it in to 4.2 or 4.3.
        Last edited by JamesG; 04-11-2014, 11:26 AM.
        Lead Programmer - UE4 Animation/Physics/Audio Team - Epic Games
        Twitter: @EpicJamesG

        Comment


          #5
          Originally posted by JamesG View Post
          Are you running 4.0 or are you running latest code from GitHub?

          Edit: Looks like that restriction was already in place in 4.0, my apologies for the confusion. There is some work we need to do to implement what I describe above, and I'm afraid we will not have time to do it for 4.1. We'll aim to get it in to 4.2 or 4.3.
          I have managed to get collisions thanks to the people in the original thread. I will post the class in the procedural mesh generation example on the wiki one I get it cleaned up.

          However will this stop working in 4.1 or are we still good?

          EDIT: As per JamesG's answer, it will only work in the Editor for now, but will be supported for packaging in 4.2 and 4.3
          Last edited by Andargor; 04-11-2014, 03:14 PM.
          It is by will alone I set my code in motion.
          It is by coding that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning.
          It is by will alone I set my code in motion.

          Comment


            #6
            Please vote for this so it doesn't get pushed back too far

            It is now in the UE4 Roadmap.
            It is by will alone I set my code in motion.
            It is by coding that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning.
            It is by will alone I set my code in motion.

            Comment


              #7
              Hopefully this will make it into 4.3...
              It is by will alone I set my code in motion.
              It is by coding that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning.
              It is by will alone I set my code in motion.

              Comment


                #8
                Dear Epic / James G,

                Could you please dearly consider adding Cooked collision for Dynamic Meshes very soon!

                It will be incredibly useful for so very many projects to have cooked collision for dynamically generated meshes!

                Yes we can develop right now with collision in WITH_EDITOR code,

                but it would be so very reassuring to be able to know the whole process is finished and we can actually play our cooked game with dynamically generated collision!

                Special thanks to Dmacesic for keeping this motion going!

                Please Epic! And thanks!



                Rama
                100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                Comment


                  #9
                  Hi Rama,

                  This is definitely a planned feature. It will not be in 4.3 but I'm hoping we can get it in time for 4.4

                  Comment


                    #10
                    Originally posted by Ori Cohen View Post
                    Hi Rama,

                    This is definitely a planned feature. It will not be in 4.3 but I'm hoping we can get it in time for 4.4
                    Great to hear from you Ori!

                    Thanks for the update!



                    Rama
                    100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                    Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                    Comment


                      #11
                      Originally posted by JamesG View Post
                      We've had a discussion here, and the current plan is to add a build option to control whether we link in the PhysX cooking library. We will default to including this for PC/Mac runtime, but exclude it for mobile runtime. This should be quite easy for users to change though.

                      Once you have the cooking libraries linked in (which is the case now, and will continue to be the case for 4.1 because APEX requires them), things should 'just work'. If you create a new mesh/bodysetup at runtime, when you register it the engine will call InitBody, which looks for cooked PhysX data, and will cook it if none is found.
                      Brilliant!

                      I was about to post in the other thread about mesh cutting, that currently without cooking support we'd inevitably run into the problem of the newly-cut meshes not having collision in a non-editor runtime.

                      It's also something that will greatly benefit anyone using the mesh generation facilities.
                      Storyteller - An immersive VR audiobook player

                      Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

                      Comment


                        #12
                        oh.my.god. so exciting! I'm so excited.
                        Youtube
                        Machine Learning C++ Plugin
                        Lindenmayer System C++ Plugin

                        Comment


                          #13
                          To ensure this gets in 4.4, please vote!
                          It is by will alone I set my code in motion.
                          It is by coding that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning.
                          It is by will alone I set my code in motion.

                          Comment


                            #14
                            Any update on this Epic?



                            Rama
                            100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                            UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                            Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                            Comment


                              #15
                              Hi Rama,

                              Best to use the roadmap to track this, rather than this thread.

                              Cheers!

                              Comment

                              Working...
                              X