Is there anyway from where I could get information about the triangles of an staticmesh through c++
Each model is made of a number of triangles is there anyway by which I could get all the information of all the vertices of all the triangles present in a static mesh.
Currently I am working on an awesome plugin I have written the algorithms for it all I need to make it complete is to get information of all the triangles present in a static mesh to complete it.
It will be really helpful if some one from epic could answer it. I searched the StatichMesh.h class and other related classes but couldn’t find any information regarding what I was searching.
The module I am going to create is a editor only thing but I want to test it before implementing it. Are there any hacks to access
WITH_EDITORONLY_DATA
in game?
Did you ever get this sorted? I am in a similar position. At run time I need to get the vertices, triangles, normals & UVs of a mesh; apply some processing; then rebuild a static mesh from them. Getting the data and rebuilding looks extremely undocumented, is it even possible?
I’m currently thinking that I need to use a USkeletalMesh instead.
I didn’t use it yet but this gives a solution. This didn’t give a method to access the triangles yet. Hope you can find something. Also it would be helpful if you can link here how you did it.
I am in a similar position. Although I am using a skeletal mesh, it stores the model in a similar way. I’ve gotten verticies, and found ‘RawIndicies’ but have yet to find proper triangle information. That is based around the class
For example in the first person template:
TArray TrianglePoints; Mesh1P->SkeletalMesh->GetImportedResource()->LODModels[0].GetVertices(TrianglePoints);
TrianglePoints[Index].Position for the verticies
Although a confusing read, i got the information from here: