In UE5, how to get the position information of all vertices of the skeletal mesh corresponding to each frame of an animation sequence asset?

I want to get the position information of all vertices of the skeletal mesh corresponding to each frame of an animation sequence, Is there any specific way?

That data doesn’t normally exist and is very difficult to get to because skeletal meshes are skinned on the gpu. You have the base mesh and each vertex knows how much influence each bone has over it. Then the skeletal mesh is animated in some way using an anim blueprint and the animations are blended together so the skeleton can be in completely arbitrary positions at any time. Also you can procedurally position the skeleton by just setting bone transforms.

You’d have to run some code to manually transform a vertex based on how it’d deform and get the data on cpu.

This is why you mostly just attach things to sockets or get the bone transforms themselves. You’d probably be better off doing something with that rather than vertices themselves because it’s almost always the better way than getting geometry data directly from an animated mesh

Thanks for your reply,in fact ,the animation I mentioned is the face expression animation of Metahuman’s face mesh,not including body.And I was thinking to get static mesh or vertex location of the animation sequence per frame.So,you meant I should run code,C++ or python?Can’t blueprint do it?

I think you can if you really want to, it’s just one of those things people would generally advise you not to do since there may be a better way.

If you’re doing something complex once or offline for later, it could be good, but not something you should do every frame.

It would also help to know what you’re trying to do with this data in case I do have an idea for how to do what you’re trying to do better.

It’s a huge amount of data and it’s all on GPU but not readily present on CPU except for the breif moment when the engine is loading the data from disk and later sending it to the GPU. The CPU is also slow at processing this stuff since it’s a huge thing you’d have to run a for loop on as opposed to letting the GPU run shaders and whatnot on it in parrelel, so people generally don’t even care about this data CPU side once it’s loaded into graphics for rendering.

I think there may have been some kind of checkbox also for keeping mesh data on CPU, which is usually a thing with procedural meshes since they’re changing CPU side from something, and you’d have access to it that way. It wouldn’t be per frame of animation though, and you’d have to simulate deforming it the same way the skeletal mesh animation would by getting the bone transforms and knowing all the vertex weights… Maybe Unreal does have apis for that though so it gives you the correct results without you guessing how their shader works and try to emulate it on CPU.

Now that I think about it also, what you mentioned is facial animations which work differently and are morph targets, not skeletal animations. That could potentially be easier since that is literally what morph targets are. They’re not deformed by bones and store how the vertices themselves deform and it’s all blended together based on weights of morph targets. If you’re trying to get at the vertex data of morph targets there aren’t really frames in an animation. The morph target just exists as the pose and it applies that morph target on top of the base mesh depending on its weight, so you’d have to interpolate between the base mesh vertex positions and the morph targets positions if you have an animation curve from an animation that drives it.

I got two plugins rencently,one plugin has a blueprint node can get vertex colors of skeletal mesh,another plugin has a blueprint node can get static mesh vertex locations.Embarrassingly, I want combine them to get skeletal mesh vertex locations,and I can’t program in C language…………

I tried to get vertex locations of a static head mesh with 35096 vertexs by frame,when the project is running, it became particularly stuck, or even crash.I don’t know if UE can bear a larger amount of calculation,maybe I should try to do this in other DCC software.

Did you solve this problem? I am trying to achieve the same thing right now. Also, could you please share the two plugins you mentioned? That would be so helpful, thank you a lot!

Not yet.