Announcement

Collapse
No announcement yet.

Procedural Mesh Examples - free!

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

    #16
    Originally posted by geylangwarrior View Post
    Hey SiggiG I have trouble getting the plugin to load with 12.5 ...says the plugin was made with a different version of the engine and it wont rebuild for me!
    Sorry for the slow response here. Hmm this is odd since I'm not providing a pre-built version of the plugin, only the source. I'll take a look once I'm home.
    Programmer at Klang Games | Ex-CCP (EVE Valkyrie / Sparc) | @SiggiGG
    Check out my procedural mesh examples

    Comment


      #17
      Any luck, I'm breaking on 12.5 too. I simply can't open the project if I have the plugin included.

      EDIT: Nevermind - I was downloading from the wrong place. First I did the git repo direct, then from a link in the forum - but then I found the stable release (for 12.5 anyway):
      https://github.com/Koderz/UE4Runtime...eases/tag/v1.2

      Also - I had references to ProceduralMeshComponent in my project, which I pulled out. And I updated the Build file to show too.
      Last edited by iontom; 09-17-2016, 12:56 PM.

      Comment


        #18
        Alright, new challenge - how to make these meshes have collisions. I've tried adding these sections to the initializer - but maybe I need to do something more.

        MeshComponent->SetSimulatePhysics(true);
        MeshComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);

        Comment


          #19
          Ooh, do i see L-System trees? Looking awsome.

          Comment


            #20
            What I suspect is happening here is not everyone being familiar with how Git submodules work? The example project is directly referencing a couple of plugins, and you can see the references pointing at specific SHAs here:
            https://github.com/SiggiG/Procedural...master/Plugins

            A submodule is like a sub-project, a way for a Git project to directly reference and use another Git repo. Unfortunately they aren't super straight forward to work with..


            Some info here, but basically after syncing down my example project you need to initialize and then pull the referenced submodules with Git:
            https://git-scm.com/book/en/v2/Git-Tools-Submodules



            Originally posted by iontom View Post
            Alright, new challenge - how to make these meshes have collisions. I've tried adding these sections to the initializer - but maybe I need to do something more.

            MeshComponent->SetSimulatePhysics(true);
            MeshComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
            I believe Koderz's latest version of PMC has proper support for collisions. I'll try to get my code updated to his latest plugin soon (tm).


            Originally posted by Jonas_Molgaard View Post
            Ooh, do i see L-System trees? Looking awsome.
            Well.. kinda I haven't implemented actual L-system parsing logic here, but it's something I'm planning on do when I find some free time
            Programmer at Klang Games | Ex-CCP (EVE Valkyrie / Sparc) | @SiggiGG
            Check out my procedural mesh examples

            Comment


              #21
              Even though you're obviously doing this in c++ and will be able to do this way faster than i am doing. Check out this series im working on https://youtu.be/0o7T6Pu0WJs

              Comment


                #22
                Originally posted by Jonas_Molgaard View Post
                Even though you're obviously doing this in c++ and will be able to do this way faster than i am doing. Check out this series im working on https://youtu.be/0o7T6Pu0WJs
                This is awesome man, I'm definitely going to go through your videos Keep it up, I wish there had been something like this available when I started playing around with this.
                Programmer at Klang Games | Ex-CCP (EVE Valkyrie / Sparc) | @SiggiGG
                Check out my procedural mesh examples

                Comment


                  #23
                  Originally posted by SiggiG View Post
                  I believe Koderz's latest version of PMC has proper support for collisions. I'll try to get my code updated to his latest plugin soon (tm).
                  I was using the pre-built 1.2 libraries. I did get static collisions enabled for the cube actor - but for some reason the same rules didn't work for the noise-field terrain.

                  I'm still struggling to understand how Unreal deals with collision meshes in general - but here's the configuration that worked for me. It would be nice to have physics turned on and collisions enabled, but I'm guessing you'd have to build the collision mesh in RMC by hand.

                  MeshComponent->SetSimulatePhysics(false);
                  MeshComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
                  MeshComponent->CreateMeshSection(0, Vertices, Triangles, BoundingBox, false, EUpdateFrequency::Infrequent);
                  MeshComponent->SetMaterial(0, Material);
                  MeshComponent->SetMeshSectionCollisionEnabled(0, true);
                  Last edited by iontom; 09-22-2016, 09:20 PM.

                  Comment


                    #24
                    Originally posted by iontom View Post
                    I was using the pre-built 1.2 libraries. I did get static collisions enabled for the cube actor - but for some reason the same rules didn't work for the noise-field terrain.

                    I'm still struggling to understand how Unreal deals with collision meshes in general - but here's the configuration that worked for me. It would be nice to have physics turned on and collisions enabled, but I'm guessing you'd have to build the collision mesh in RMC by hand.

                    MeshComponent->SetSimulatePhysics(false);
                    MeshComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
                    MeshComponent->CreateMeshSection(0, Vertices, Triangles, BoundingBox, false, EUpdateFrequency::Infrequent);
                    MeshComponent->SetMaterial(0, Material);
                    MeshComponent->SetMeshSectionCollisionEnabled(0, true);

                    I just came across your question.

                    Most of the time if you only want static collision, in other words the RMC itself is not moving, you just need to tell the section to enable collsion either by the flag in CreateMeshSection, or using SetMeshSectionCollisionEnabled like you have here. The one problem with this is don't expect it to be super fast. Collision in UE4 involves the PhysX cooker which isn't the fastest thing around. The RMC is getting a slight upgrade to collision probably today actually as long as you're on UE4.14 preview or above. I'm working on some potentially major upgrades and talking with Epic on the possibilities of this coming to mainline UE4 as to go beyond where the RMC is currently will require engine changes.

                    Now, if you're wanting the RMC to have collision and physics enabled where it can move and bounce off things it gets more interesting. The above part with the cooker still applies but there's another factor. By default the mesh sections use the triangular mesh you supply as the collision surface. The problem is PhysX doesn't support moving triangular meshes for a list of reasons, and so the only way to get moving collision is using convex collision. Convex collision works fundamentally different, where the triangular mesh is mostly poly perfect collision and can handle convex/concave shapes, convex can only handle convex shapes. The way this is commonly handled for concave objects is to decompose it into multiple convex shapes to approximate the object. That is another slow thing to do usually, so in this case you'd have to probably generate those yourself from whatever is generating the shape.

                    Hope that helps even though it's a month late!
                    Runtime Mesh Component - The best way to render procedural/runtime created meshes! - Version 3.0 Out Now!

                    Comment


                      #25
                      Thank you very much for the tutorial / example project!

                      The procedural mesh examples I tried before this one came out didn't get me too far in getting anything actually working, but this made everything crystal clear!

                      Anyway, what I did is a thing that updates a mesh procedurally according to audio playing on the OS (eg. from Spotify/Foobar/Youtube/anything). My thing is bit of a mess though and not very stable. And it especially does *not* work out of the editor (yet?).

                      Here's a longer description: https://rabid.prototyping.xyz/2017/0...real-engine-4/
                      and the source code: https://github.com/Tsarpf/UE4-Procedural-Audio

                      I've stopped developing this for now, so I thought I'd post it here if someone else wants to give it a go, or maybe someone comes up with something even better!

                      Adding collision for one might be cool.

                      Comment


                        #26
                        Collision in UE4 involves the PhysX cooker which isn't the fastest thing around. The RMC is getting a slight upgrade to collision probably today actually as long as you're on UE4.14 preview or above. I'm working on some potentially major upgrades and talking with Epic on the possibilities of this coming to mainline UE4 as to go beyond where the RMC is currently will require engine changes.
                        Does that mean we can hope for faster collision processing?

                        Comment


                          #27
                          Originally posted by Tsarpf View Post
                          Thank you very much for the tutorial / example project!

                          The procedural mesh examples I tried before this one came out didn't get me too far in getting anything actually working, but this made everything crystal clear!

                          Anyway, what I did is a thing that updates a mesh procedurally according to audio playing on the OS (eg. from Spotify/Foobar/Youtube/anything). My thing is bit of a mess though and not very stable. And it especially does *not* work out of the editor (yet?).

                          Here's a longer description: https://rabid.prototyping.xyz/2017/0...real-engine-4/
                          and the source code: https://github.com/Tsarpf/UE4-Procedural-Audio

                          I've stopped developing this for now, so I thought I'd post it here if someone else wants to give it a go, or maybe someone comes up with something even better!

                          Adding collision for one might be cool.
                          Very cool! I was playing around with very similar things last year, including eXi's plugin

                          I got bogged down with real work, but will pick this up again later

                          Two examples of what I was doing:


                          (very compressed on youtube but the sky has a full grid moving)



                          (a bit crude)
                          Programmer at Klang Games | Ex-CCP (EVE Valkyrie / Sparc) | @SiggiGG
                          Check out my procedural mesh examples

                          Comment


                            #28
                            Oh my gosh, those are amazing. Thinking of picking this plugin up if it works with 4.14., I'd like to attempt procedural buildings

                            Comment


                              #29
                              I love it! Especially the sky thing. It would be an awesome addition to many games.

                              My initial idea was to make it so that the player could surf/snowboard on the sound wave, though making it fun to play while keeping the real-time aspect would be a challenge. Just as a visualization it might be cool though.
                              Last edited by Tsarpf; 01-13-2017, 09:15 AM.

                              Comment


                                #30
                                Project updated for UE 4.16. Going back to working on this to add more samples and adapt to the latest changes in the Runtime Mesh Component.
                                Programmer at Klang Games | Ex-CCP (EVE Valkyrie / Sparc) | @SiggiGG
                                Check out my procedural mesh examples

                                Comment

                                Working...
                                X