Download

Manipulating mesh vertex positions at runtime

Hi.
I’m still quite fresh to all this but have what seems like it should be a simple enough task…

I would like to be able to transform (well - move in the x,y,z) the position of an individual vertex of a mesh at runtime.
A basic example would be to take a cube and warp it so it was a trapezoid shape by moving the vertices at its base outwards.
Is this possible with a static mesh? If so could you point me in the direction of how to setup a blueprint network to access and change the position properties.
Or would it have to be done using a procedural mesh?
Or is that even possible?

Thanks!

Check out World Position Offset.

If you’re talking about moving them in material then ryans suggestion of World Position Offset. If you’re talking about being able to, for example, edit the mesh during runtime using player input or something then you’re going to want to look at procedural meshes. Static meshes aren’t able to be edited as far as I know outside the editor.

Koderz - your RMC is exactly what I’m looking for. Thanks!
I’ve had a little play and can create and update my simple cube example at runtime. Perfect :slight_smile:
Would you be able to recommend a best practise for populating the initial data (in Create Mesh Section) with verts, triangles, normals, tangents and UV data imported from a file? For example an .fbx file or similar?
Now what I’m looking to do is take some more complex geometry and manipulate the vertex positions at runtime.

Thanks again!

Sorry I forgot to mention - I’m using the RMC from Blueprints rather than direct c++.
Is there a direct way for loading mesh data and passing it through to the correct node expressions? Or would that have to be done in code?

Sorry about the delay, didn’t get a notification on your reply, and just sort of happened upon it.

Loading model files like .fbx can get a bit complicated quick, and it’s been a while since I needed to do this (did it like 4 years ago for a mini custom 3d printer pathing program) so not sure of best way to do t now but I see people mentioning Assimp at times. Loading files like that is probably not possible with pure blueprint.

Hey, my bad, should have quoted I suppose so it replied to you.
No worries - in the meantime it has forced me to start writing c++ code and learning how to do that rather than BP :slight_smile:
I’m getting there - have successfully passed a model’s data (handwritten struct of verts, tris and normals for now) into a BP which has an RMC added to it. I’m then creating a mesh section, pulling the data from my class and populating it to create my mesh.
So far so good, I’m going to attempt to load and parse an .obj file of a cube now. I don’t think I’ll have any need for .fbx I just need simple geometric forms, will add all materials within the engine.

Hey thanks for your help though - and the plugin! keep up the good work :slight_smile: