[=J. J. ]
Digging around even more just adds to my confusion. I see a custom mesh component and a procedural mesh component. The custom mesh at least has the ability to make an array of triangles and assign that array as the mesh. The procedural mesh has no such functionality. In fact I can find no docs on the procedural mesh component at all. However, the procedural mesh component seems to have a great deal more work put into it, such as info in its vertex struct that seem useful and apropos like normal, UV, tangent, color, etc. Alas, I can’t seem to make a variable of that struct. It’s just not an option. I can’t even promote the output of the makeProcMeshVertex function to a variable. What’s going on with that? And since I can’t make an array of the proc mesh vertices, I can’t define an array of triangles. I don’t even see a procMesh triangle struct. Only thing I can find that seems even close for the proc mesh comp is a CreateSection function, which instead of taking an array of procMeshTriangle structs, you have to use some completely different approach using arrays of vertices, integers, etc. If I could at least find any sort of documentation, I could try and work something out, but as it stands now it’s just a brick wall.
So, why the two different components that seem to do the same thing, both of which seem only partially implemented in wildly different ways and poorly documented, if at all. Is this a WIP that I stumbled upon by accident? Or is this an accidentally exposed functionality that really should not be seen let alone used by non-programmers. It feels as if someone started on making a way to create procedural meshes via blueprint only to give up or get sidetracked after barely getting started. It’s very frustrating to find what looks like the solution I’m looking for only to discover it doesn’t seem to work properly if at all and have absolutely no documentation on it.
I’m just trying to find a viable way to taking the amazing work that is doing and make it into a more functional base for an actual game. The approach I have taken so far, making the tile meshes by hand, just does not seem viable for the long term if we want to be able to do anything like add rivers, canyons, deformable terrain, evolving climates, etc. Is the take away from this just that I have to suck it up and learn C++?
J^2
[/]
Make sure to read the rest of the thread, since it does explain the difference between CustomMeshComponent and ProceduralMeshComponent and also why theres no doco on the latter (hint: Its brand new for 4.8 and still WIP). Here is a from an Epic Dev:
[=JamesG;282933]
I just wanted to give an update on something I have been working on for 4.8. Way more people than expected were using the CustomMeshComponent - it was only intended as an example of creating geometry! Anyway, there is clearly a lot of interest in creating geometry using Blueprints, so I’ve added a new ProceduralMeshComponent. This has a very different API, and some new features. I tried to just add features to CMC, but it just wasn’t feasible whilst still maintaining backwards compat. The new API is based on arrays of positions, indices, normals etc, rather than an array of ‘triangle’ structs. I’ve also added a new ProcMesh library of useful functions, and tried to keep the component fairly simple. The big new features are collision support, vertex UVs and colors, and automatic normal/tangent generation. Here is a screenshot of what it looks like in BP:
[/]
There should be more info regarding how to use the ProceduralMeshComponent following that.