I am trying to get all the triangle’s vertices on a static mesh.
UStaticMesh has varable called RenderData which is FStaticMeshRenderData
there is LODResources which contains mesh data for each LOD
In there you can access VertexData and so on and other stuff, dive in to API refrence ;]
No sure if you need to do somethign before accessing this date, maybe you need to call Build() in UStaticMesh. It’s some breef info i dig out for you.
Thanks a lot for responding! I really appreciate it!
Unfortunately, I can’t find anything in either link that tells me what vertices make up each triangle.
Do you know how to expose the render data to cpu in a packaged build?
@Burnrate I believe there is a setting in the static mesh editor that states “check this box to keep render data on cpu”
There was a lot of high res meshes with multiple LODs I wanted info from so I didn’t want to keep all that in RAM.
I was able to setup some Enqueue render commands in order to read the specific vertex data I needed from the specific mesh and LOD and memcpy it into an array. Then I sent it to a thread to be iterated over and provide the information I needed during gameplay.