Vertex, Triangles, UVs and Normals arrays for Procedural Mesh = Nightmare
The main is that I’m doing everything manually, because I couldn’t find any other way around with blueprints only.
For example, I create an array of vertices with their coords. In another array I set the amount of triangles keeping the order relative to the vertices array. Then I create a Procedural Mesh with these arrays. Right now I can’t find a simple way to deal with UVs… anyway, I can get a nice cube (or similar) with collisions and some normals calculated by the “Calculate Mesh Tangents” node (I guess that’s the node name).
So… what’s the? The comes when dealing with 50 or more vertices (and not creating a simple cube). Let’s say that I want to resize the window hole of a wall, where I have other holes. In a mesh like the vertices count could reach to 80, and having an array with 80 vertices and links/cables attached to it is not fun at to work with. Plus, at first, I have to “guess” where each vertex goes and keep the right order to get a working mesh. Hours go by and my mesh still looks wrong… Finally when I have it “looking good”, Normals and UVs are wrong and materials won’t look good. In the end I have an “infinite” set of arrays, and if there was something wrong (like a vertex misplaced in the right order, or a miscalculation with triangle count and order) I have to start from scratch because of the workflow applied.
The main idea is to have a blueprint node to read data (vertices, triangles, uvs, normals) from a Static Mesh, and then create a new Procedural Mesh where I modify, lets say, vertex number 4 and 5 to make it wider… and vertex 6 and 7 to make it taller. That would keep the window and door holes when changing these sizes, without me having to set every vertex manually, just modifying the ones I need.
Right now I can make it work using the method explained (with the wrong uvs), but something that could take 30 minutes (with the right UVs!), took 2 days of my life (doing research of course) and I’m just working with a box with a hole. I can’t imagine doing with a full pack of meshes for my procedural level.
Your plugin solves the vertices problem, but I find it really complicated to deal with the right order for the triangles and the UVs.
Thank you for your interest in subject, it feels good to receive feedback!
(aaand sorry for the 5am english of a spanish speaker!)