Runtime Mesh Component

Upcoming Version 3 Details

So recently I’ve been getting quite a few questions and requests from people about when/if a feature was going to be implemented in the RMC. So here’s a quick breakdown on what is coming. This list is not everything I want to add, and I also can’t guarantee all of this will actually be added or even when it will be done.

First, the next version (v3) of the RMC is going to be a drastic change. It is almost a 100% overhaul of the entire plugin both to pick up a large set of new features that just don’t work well with the current setup as well as to take advantage of things I’ve figured out about how UE4 operates internally. This means that it WILL NOT BE 100% API COMPATIBLE!! While I’ll try to support upgrading to the new version as well as possible, there are some breaking changes in the design.

The group of new features I’m focused on implementing at the same time are instancing, lod, and sharing a single mesh copy between a several RMCs much like how the static meshes work. To support those the RMC is getting restructured into a setup much like how the UStaticMesh, UStaticMeshComponent and UInstancedStaticMeshComponent work. So there will be a rough equivalent to them being URuntimeMesh, URuntimeMeshComponent, and URuntimeInstancedMeshComponent. The first two, which are needed to replicated what version 2 of the RMC can already do but in the new structure are almost complete at a functional level. They’re not up to feature parity of the current RMC and likely won’t be for a few weeks. Once they are at least functional I’ll mirror that branch to my github repo where you’re free to use it if you don’t need the other features of the current RMC. I’m hoping to have all of the current features reimplemented on the new RMC within 4 weeks but I don’t really know one day to the next how much time I’ll really have available to work on it so it might be sooner or it might take longer. When it’s complete it should offer a very nice memory improvement to anyone that has multiple copies of the same RMC as well as anyone who needs LOD.

Now, there’s a pretty long list of other things I want to do to the RMC long term which if you look at them as a whole would basically bring as much of the engines features supported by normal static meshes to any runtime generated mesh. There are things that just aren’t practical to do at runtime, and those will be obviously be left out, but I hope to bring it as close to feature parity to the normal StaticMesh/ISMC/HISM and possibly even splines/skeletal meshes as is reasonably possible. So here’s a starter list, in order of my own priority as to what’s coming to the RMC.

Things I definitely want to do.

  1. Mesh sharing. (Maybe you want 10 copies of the same runtime mesh that can all be moved and handled independently)
  2. Better collision support. (Lessen impact of cooking as much as possible, fully support all simple collision shapes)
  3. LOD (This one is just an obvious performance improvement that’s badly needed)
  4. Thread safety of mesh data. (This would allow cross thread read/write of mesh data without worrying about the GC and letting the RMC take care of updating its internal state correctly on the respective threads for you)
  5. Dithered fade in/out of section updates
  6. Instancing (This one is another relatively obvious performance improvement for cases of needing hundreds of the same object)
  7. Distance Field support (This would make the RMC support things like DFAO, or the Distance Field Shadows, or even DFGI if Epic continues on that front at some point)
  8. Load once optimizations (Maybe you just use the RMC to load a model at runtime but never need to change it after that. There’s some memory and performance related improvements the RMC could do internally in these cases)
  9. Sub-section updates (Maybe you have a 1m vertex mesh but you only need to update like 1000 of them in one area, why resync the entire mesh to the GPU?)
  10. Brand new slicer designed for the RMC (The slicer in the PMC, while useful, lacks quite a few things that I think would really help. First being simple utilities to directly slice a staticmesh or ISMC/HISMC instance or even spline/skeletal into 1-2 RMC sections without having to manually do all the conversion)
  11. Splines! (Why not be able to spline a runtime mesh?)

Utility updates as a part of the above:

  1. Brand new mesh builder usable from both c++ and bp that removes the need to work directly with separate arrays like the PMC, and also makes it easier to create efficient meshes.
  2. Upgrade normal/tangent calculation to be able to do hard or smooth normals, and overhaul the algorithm to not be exponentially slower with larger meshes.
  3. More shape creation utilities (Sphere/Capsule/Pyramid/Cylinder etc)
  4. Mesh transformation utility for moving/rotating/scaling something to be combined within a larger mesh.

Things I’m thinking about:

  1. Skeletal (This one I haven’t really investigated but had several requests for and I can see the use for some things)
  2. Networking/Replication support. (This one is one I’d like to see support for just because it’d be an easy way for some people to get multiplayer support for their game but it can easily be 10’s of MB of data which isn’t exactly a good thing to try to arbitrarily sync across the network. Usually there’s a better way to do this, but it’s always specific to the project. For example voxel data is almost always smaller than the mesh data it creates. Or in a simpler case a position and radius is a lot less data than a high poly mesh of a sphere)

I have more things in the works for the RMC, but I’ll keep them to myself until they’re further along and I’m happy with how they’ll actually work before I get anyone’s hopes up!

As always, I’m open to suggestions for other features or changes to existing. Usually the best way to find me is on the UE4 Discord