Home Unreal Engine

How to access vertex normals of static mesh in Unreal C++

I am working in UE5 and would like to get the vertex normals of a static mesh using the C++ API. I can successfully access the vertex buffer, and then get the PositionVertexBuffer and the StaticMeshVertexBuffer (link to docs). This yields the vertex positions and the vertex tangents. However, there seems to be no way to access the vertex normals. I believe I must be overlooking something because the vertex normals are so fundamental, but I have scoured the docs with no luck.

One idea is to use Blender to override the vertex tangents to store the vertex normals, and then import into Unreal. Then, fetching the vertex tangents in Unreal through the C++ API would actually provide the vertex normals. This seems very hacky though.

Can someone advise me on the best approach to get the vertex normals of a static mesh in Unreal C++?


Sign In or Register to comment.