Runtime Mesh Component

@, have you figured out what the future plans are for RMC? Love this plugin, hope you continue with it, great work. Any update on a asset store 4.16 release?

mentioned that it had been submitted to the marketplace for 4.16 over two weeks ago now. Epic doesn’t take that long, so I’m guessing something went wrong. We had the same issue with 4.15 too. Took about a month or so before it was updated on the marketplace.

Thanks for the update wilberolive, didn’t realise it could take as long.

Thank you @ (and @ of course)! I finally found some time to test it and it works. I didn’t know “sections” in static meshes were referring to material sections. Now I can finally make a very old project of mine happen.

Glad that I could help. I could not achive most of the stuff without startup help from the community.

RMC Status Update

Ok, so there’s a couple parts to this update.

First up. 15 minutes ago I sent the same version that’s in GitHub master + the slicer to Epic for the marketplace. It had some issues and it took me a little bit to have time to look through them. Also picked up a couple minor bug fix PR’s for the tools that are also included. I hope this version will make the marketplace within the next couple of days.

Next, I have spoken to James Golding about the concerns I mentioned in my last post. For the foreseeable future the path of the RMC is back to normal. The only thing that has changed is some things I was debating in the future to assist in building the actual mesh are on hold indefinitely but the core of RMCv3 is unchanged and is back in progress. I’m hoping to have v3 done for the 4.17 release but my available time to work on this is pretty volatile so I can’t guarantee anything.

With that said, I will make the core of v3 available when it’s ready (hopefully within 2 weeks) to anyone that wants to help test it (and by that I mean beat it to death), but it will lack most of the secondary tools like the normal/tangent calculation, tessellation, slicer etc. This will be solely the core which has been completely rewritten to serve as the foundation for the intended features of v3. Version 3 will be dropping all backwards compatibility with older engine versions beyond 4.16 as maintaining 7 engine versions is obviously a pain. So older engine versions will still have to use RMCv2. There will also be some breaking changes in the API. I will attempt to ease this transition, but there are some things that just need to change to move forward.

Lastly, due to suggestions from multiple people, I have resubmitted the RMC for a dev grant. This isn’t the first time, but due to the long hiatus of dev grants right as I submitted it back in October, it’s been suggested to submit it again. Hopefully Epic will consider it as I’d really like to continue work on the RMC, and keep it free, but there’s a practical limit to the amount of time I can put into a free component due to school and work.

Been away from the RMC for a while. Just trying to hook it up to start something, and can’t even get the basics done.

Can’t I just fire an array of vertex positions and triangle indices at the CreateMeshSection method now and tell it to calculate the normals and tangents?

Severity Code Description Project File Line Suppression State
Error C2039 ‘TypeInfo’: is not a member of ‘FVector’ DemoProject g:\repos\demoproject\plugins\ue4runtimemeshcomponent\source\runtimemeshcomponent\public\RuntimeMeshSection.h 542

EDIT: Nm got it working using FRuntimeMeshVertexSimple. Excuse head-induced lack of patience :stuck_out_tongue:

So far RMC has been great to use but now i hit a point where i need some assistance.

My goal is to create a simple box with highlightable sides to drag and drop for resizing the aforementioned box. I got stuck at the highlighting part.

My current approach is to generate the box variables using the CreateBox node and feed that into a CreateMeshSection node. Afterwards i parse the box variables to select the vertices by their normal direction to build 6 further separate Mesh sections - each side of the box. I was planning to use collision detection for easy highlighting of the 6 sections. Sadly i just can’t get collision to work.

I’ve only been able to get collision to work on a a simple blueprint actor with only one RMC carrying only one mesh section.
Judging by the available info on the wiki, each section should be able to have its own collision, so using only one RMC to carry all the box sides should work fine, right? But maybe i overlooked something.

Would anyone be so kind to explain to me the most basic way to achieve what i am trying to do - Or maybe go into some more detail about how collisions are handled in RMC? Do i always need to manually cook collision after creating a mesh section? Should it be as simple as to tick CreateCollision in the CreateMeshSection Node?

Here’s the current node network for building the sides:

any kind of help is much appreciated!

Not quite sure what you’re getting vs trying to get. You should be able to turn collision on for any/all/none of the sections and it should just work. The caveat to that though is there’s no good way to tell which side you’re colliding with from a ray trace or whatever. That is something that’s coming, but not yet. Just to make sure you’re clear, the CreateCollision flag on CreateMeshSection creates a trimesh collision shape, that only works if UseComplexAsSimple is on for the RMC (most like it is since that’s default) and you don’t try to turn on “SimulatePhysics”. The only time you should have to manually tell it to CookCollisionNow is if you want to query it with something like a ray trace in the same frame as creating it, by default collision won’t update until the following frame.

Async Collision Cooking and UE4.17

For those of you who haven’t noticed this on the UE roadmap… Trello

Yes I will be supporting that in the RMC for 4.17. This means that collision cooking, which is the biggest cause of hitching in the RMC today can be moved off game thread, and even doing multiple of them in parallel.

I also just opened a new PR to Epic to add on a few things to cooking to allow for more control over speed vs quality of cooking, as well as to help in fixing one potential issue with the new async cooking. That can be found here… https://github.com/EpicGames/UnrealEngine/pull/3704 hopefully it will make it to 4.17! (If that link shows up as a 404 for you, make sure you’re logged into GitHub and have your account linked with your UE4 account)

Great to hear from you @ with the news. Itching to upgrade my project to 4.16… wish if Epic was faster at updating the marketplace.

Very happy to see you still so much invested in this @!

Yes thats great news @, thanks again!
What we can do for speed up marketplace approval? Its almost one month for 4.16 version…

Just a quick notice to all that the marketplace has been updated. Got the notice an hour ago. As usual, let me know of any problems.

Downloading now. Thank you very much indeed! You do the best work :slight_smile:

Downloaded the 4.16 plugin, all seems to be working great. Quick couple of questions, wondering if anyone knows about either…

  1. Converting from a RMC mesh to a Static Mesh. I saw in the notes this should be possible, “RMC -> SMC in editor. (new)” but cannot figure out how to actually hook this up in blueprints. Had a quick look in the docs and didn’t see much.

  2. Updating an instance of a RMC, being used as a component inside a blueprint, from an existing RMC. For example, I have a RMC instance as part of an actor blueprint. I want to update this existing component at runtime, but currently cannot as far as I can tell. If using normal static meshes, I can just call Set Static Mesh, but can find no comparable for either the existing UE4 procedural mesh component or the RMC. Ideally I’d like to be able to call Set RMC Mesh and pass in an existing RMC, the result from a slice operation for example.

Thoughts?

  1. Unfortunately right now it’s not really possible in blueprints. I’ll keep that in mind for the next version.

  2. Well first up, the next version is being redesigned so it could do exactly this. As for slicing, you’d end up with a new full RMC which can be added to the current actor or a separate actor so not exactly sure what you’re attempting to do here.

Thank you for your explanation. It works now. Interestingly, i simply had to delete and recreate the ‘Add RMC’ node to get the collisions to work properly.

Is there a way to READ/FETCH the vertex/normal/uv etc data from a mesh section?

And is there a comfortable way to have multiple mesh sections share a set of triangles?

Well that’s good it works, but hilarious that it worked after that…

There are ways to read it in c++, BP on the other hand is severely limited. That’s something I want to look into for v3 but that might be a while. As for sections sharing triangles, what are you trying to do? Multiple sections within one RMC use the same vertices? partial sharing between sections in the same RMC? Or sharing mesh data between multiple RMCs? The last one there is coming in v3, and is part of the core so it’ll be ready relatively quickly hopefully, the other 2 I’m not sure I’d want to try to support unless there was a really good case, the first one wouldn’t be too bad, the second would be interesting to near impossible.

I’m trying out the 4.16 plugin, but I’m having weird results when attempting to get collision up and running.

My goal is have the player generate the procedural mesh at runtime and when they are finished, allow them to interact with the mesh (grabbing, throwing, etc.) and have it simulate physics. My attempts at this:
1.) Create a simple box mesh and use ‘add collision convex mesh’ exactly like in your example template. The box falls extremely quickly then bounces into the stratosphere. No idea why.
2.) Create a simple box mesh and use ‘set mesh collision section’ and ‘set mesh section collision enabled’ currently has no effect. The object falls right through the floor.

Could this be a problem with the 4.16 update? Any help would be appreciated.

And thanks for the awesome work on the plugin! Cheers to all the hard work.