Hi, I am using a procedural mesh (only 5K vertices) which has vertex animation (540 frames). Now for each frame I want to precompute the normals and tangents and I use UKismetProceduralMeshLibrary::CalculateTangentsForMesh which works great. The problem is that its very very low and it takes over 10 secs to compute 540 frames. I was in DebugGame Editor config but switched to Development Editor but still its slow. Are the usual floating point fpu acceleration off or something ? And will the Shipping configuration speed up things ?
Hey - I’ve looked at the implementation of the function and the problem is, that it has an exponential runtime, depending on the number of vertices in your MeshSection.
You can kind of mitigate the problem by limiting the number of Vertices in each MeshSection and create multiple MeshSections, for example: Instead of one MeshSection with 10.000 Vertices, you make 10 MeshSections with 1000 Vertices.
Problem: The more MeshSections you have, the worse the runtime performance is, because of the increased number of draw calls
Looks more and more like a self-written tangents/normals solution is the only one that will work. I’ve seen lots of people do it by now so clearly it must work.