Announcement

Collapse
No announcement yet.

Runtime Mesh Component

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

    [SUPPORT] Runtime Mesh Component

    Runtime Mesh Component


    Version 4.1 available on GitHub and Marketplace!

    The RuntimeMeshComponent, or RMC for short, is a component designed specifically to support rendering and collision on meshes generated or imported at runtime. This could be anything from voxel engines like Minecraft, to custom model viewers, or just supporting loading user models for things like modding. It has numerous different features to support most of the normal rendering needs of a game, as well as ability to support both static collision for things such as terrain, as well as dynamic collision for things that need to be able to move and bounce around!


    The RMC is designed to do the same tasks as ProceduralMeshComponent or CustomMeshComponent currently found in UE4, but far surpasses both in features, and efficiency! Depending on the configuration, the RMC can use between half as much memory, all the way down to basically no significant amount of main memory, and instead only use VRAM, by not keeping extra copies of the mesh data around in main memory. It also is far more efficient in the render thread, implementing static draw and a more efficient dynamic draw than the ProceduralMeshComponent. Transitioning from the PMC is fairly straightforward, but it is not 100% cross compatible for features and performance reasons.




    Please Consider Supporting the RMC's development! Donations will be counted towards a pre-purchase of the upcoming Extended RMC.

    More info can be found here: https://github.com/Koderz/RuntimeMes...e-development!



    Current list of features in the RMC
    • All features found in the ProceduralMeshComponent including slicing.
    • Mesh LODs
    • Async Collision Updates.
    • Separate Collision mesh.
    • Configurable precision for normals/tangents, and texcoords.
    • Tessellation support
    • Nav Mesh support.
    • RMC <-> StaticMeshComponent conversions. SMC -> RMC at runtime or in editor. RMC -> SMC in editor.
    • Faster normal/tangent calculation than PMC.
    • Far lower memory footprint than PMC
    • Customizable mesh providers allow for customizable lod/section generation.
    • Efficient draw paths


    Supported Engine Versions:
    v1.2 supports engine versions 4.10+
    v2.0 supports engine versions 4.12+
    v3.0 supports engine versions 4.17+
    v4.0 supports engine versions 4.20-4.22
    v4.1 supports engine versions 4.23+

    The Runtime Mesh Component should support all UE4 platforms.
    Collision MAY NOT be available on some platforms (HTML5)

    Tested Platforms:
    Windows, Linux, HTML5
    (Also tested with HTC Vive, and Oculus Rift)


    Downloads:
    GitHub: https://github.com/KoderzUnreal/Runt...onent/releases

    Examples:
    https://github.com/KoderzUnreal/Runt...onent-Examples

    Documentation:
    https://runtimemesh.koderz.io/ (Still in progress)

    Issues/Help:
    https://github.com/KoderzUnreal/Runt...mponent/issues


    640k vertex animated mesh! (Not great quality gif)


    Convex collision support for movable objects!


    Last edited by Koderz; 07-31-2020, 11:46 AM.
    Runtime Mesh Component - The best way to render procedural/runtime created meshes! - Version 4.1 out now!

    Come talk about anything RMC or Procedural Mesh Related in our Discord!

    #2
    Great component here! I've been testing it for some time now and it addresses pretty much all the issues I've been having with the standard PMC.

    I will soon update my mesh examples over to using this and already using it exclusively in my work.
    Lead Engineer at Wargaming | Ex-CCP (EVE Valkyrie / Sparc) | @SiggiGG
    Check out my procedural mesh examples

    Comment


      #3
      This looks a really interesting and useful tool, nice work!
      Hevedy - Instance Tools: https://hevedy.itch.io/hevedyinstances
      Hevedy - Image Tools: https://hevedy.itch.io/imagetools

      Comment


        #4
        Hey, Thanks for the heads up - it looks like it might be exactly what im looking for! problem though, I copied the release into the plugins folder - and it says there are missing components?

        4.12.1

        Thanks

        Comment


          #5
          For now you'll have to have source in the project as you'll need the engine to build it (Soon I'll add prebuilt versions) but it can be a dummy class just enough to force the engine to build it. If you want to use it from C++, you'll have to include "RuntimeMeshComponent" and if you want to use the extended API you'll also have to include "ShaderCore", "RenderCore", "RHI" as well.

          https://github.com/Koderz/UE4Runtime...project-in-CPP
          Runtime Mesh Component - The best way to render procedural/runtime created meshes! - Version 4.1 out now!

          Come talk about anything RMC or Procedural Mesh Related in our Discord!

          Comment


            #6
            Ah ok, Ill keep an eye on this thread for the pre-built versions as I am not really a coder thanks Koderz

            Comment


              #7
              Nice ! This will be of great help ! Thanks.

              Comment


                #8
                Hellooo!

                This sounds awesome, I was trying to make a run-time spline for growing tree roots in the last game jam and found that the collision wasn't updating.

                Would this be the solution?

                my workflow so far was adding spline points and then Lerp them into position with some math to change the sizes of the tip and base etc. Looked really cool, but the collision was static from its first position,

                any tips or advice would be ace of spades!

                peace!
                Last edited by RennJan; 06-11-2016, 05:13 PM.

                @agamedevguy twitter
                Renn Farnell Website

                Comment


                  #9
                  Originally posted by RennJan View Post
                  Hellooo!

                  This sounds awesome, I was trying to make a run-time spline for growing tree roots in the last game jam and found that the collision wasn't updating.

                  Would this be the solution?

                  my workflow so far was adding spline points and then Lerp them into position with some math to change the sizes of the tip and base etc. Looked really cool, but the collision was static from its first position,

                  any tips or advice would be ace of spades!

                  peace!
                  I'm not quite sure how you're going about this. I also haven't used any of the spline related things in UE4 yet so I'd need more information to be able to answer that. Also if it's easier I'm in the Unreal Slackers chat most all day, every day.
                  Runtime Mesh Component - The best way to render procedural/runtime created meshes! - Version 4.1 out now!

                  Come talk about anything RMC or Procedural Mesh Related in our Discord!

                  Comment


                    #10
                    Originally posted by Koderz View Post
                    I'm not quite sure how you're going about this. I also haven't used any of the spline related things in UE4 yet so I'd need more information to be able to answer that. Also if it's easier I'm in the Unreal Slackers chat most all day, every day.
                    Thanks Koderz. I'm sure i'll figure it out.

                    @agamedevguy twitter
                    Renn Farnell Website

                    Comment


                      #11
                      Hi! I'm currently creating a Voxel terrain edit mode for unreal as a school assignment and I would like to add the source for this component as a module to my plugin. Is that possible?
                      Ofcourse I'll give you the deserved credits, your work looks really promising!

                      Edit: I've done some testing and when changing the length of the vertices buffer it seems like the update is slower than when using the procedural mesh component. And if the amount of mesh sections increases, the time to update one section gets longer even though the mesh sections are the same size as before. Shouldn't the time to update a section stay the same as you add more sections?
                      (I'm using the mesh sections as chunks for my terrain and they're always 10 by 10 in size but they do take longer to update the more chunks there are).
                      Last edited by Inf1nite; 06-13-2016, 03:54 PM. Reason: Findings

                      Comment


                        #12
                        This is wonderful! Thanks so much for sharing this.

                        Do you have any advice on how to handle updating the vertex normals when deforming the mesh every frame? Should I be modifying the "dual buffer" approach to include positions and normals in the separate buffer, or am I missing some simpler approach?

                        Comment


                          #13
                          Awesome project. How complicated would it be to make this support mesh skinning (skeletal meshes)?

                          Example: I want to generate a procedural cylinder-like mesh, add procedural bones and skinning to it, add coliders, and then add ragdoll to it so that the cylinder falls like a rope. The only part of that I don't know how to do right now is the bones/skinning part
                          Last edited by Philippe St-Amand; 06-14-2016, 04:06 PM.

                          Comment


                            #14
                            Very cool! Might you be interested in making a pull request for this, so we can see if any of your changes can be taken directly into ProceduralMeshComponent? A lot of the things you mention I have wanted to do for a while, but just haven't found the time!
                            Lead Programmer - UE4 Animation/Physics/Audio Team - Epic Games
                            Twitter: @EpicJamesG

                            Comment


                              #15
                              Originally posted by JamesG View Post
                              Very cool! Might you be interested in making a pull request for this, so we can see if any of your changes can be taken directly into ProceduralMeshComponent? A lot of the things you mention I have wanted to do for a while, but just haven't found the time!
                              I'm not opposed to it, but the one problem with trying to effectively integrate it into the existing PMC is it's not 100% compatible, and can't easily be made to be fully compatible. I will say however I'm not sure how much this really matters. Basically the serialization, which the PMC relies on UPROPERTY to do, isn't how the RMC serializes itself when you want it to. So any existing data in a serialized PMC would not be loaded into the RMC if you replaced the PMC with it's systems. Beyond that the API from blueprints is basically the same, just extended to support dual UV and also setting some hints for the rendering. From c++ it's kind of the same story, it's got the same API again extended, but then has a whole new one for more control.

                              The big reason I kind of like the MP/Github is that it can retroactively support older engine versions and can push updates faster. For example if I PR'd it right now and you accepted it tomorrow. it would still be at minimum a couple months till 4.13, possibly even 4.14 before anyone could use it from a release build (I get that those of us on source builds of the engine would get it sooner). I had thought about doing the MP/Github route until I had most of the features in/stabilized then PR it. If you have a better idea I'm open to suggestions, I'd just like to be able to both push more things to it relatively quickly as well as support those who can't upgrade engines for various reasons.

                              Probably tomorrow I'm going to do several more additions to it, and I'm about to start down the path of rebuilding the template vertex to support another section style I want (extended dual buffer to allow selecting which components are in which) as well as possibly supporting high precision normals and things like that.

                              The big thing that I'm about to focus on because it's a massive problem for my project and several other people I know is collision. Cooking in the GT is impractical in many games, and all but impossible in VR. I get hit with 8ms + per frame cooking and when you only have 11.1m total for 90fps it gives you no time to do anything else. I know you replied to me a while back about talking with NVIDIA about that, and mentioned trying to expose some of the parameters to the cooker. I'm thinking about attempting some of that myself here soon as it's about to become a roadblock.
                              Runtime Mesh Component - The best way to render procedural/runtime created meshes! - Version 4.1 out now!

                              Come talk about anything RMC or Procedural Mesh Related in our Discord!

                              Comment

                              Working...
                              X