Fill an array of vertices array and array of triangles(integers) to create two square surfaces, that are perpendicular to each other, with 6 or 8 vertices.
Calculate tangents and normals
Add Spline Mesh Component with these data.
Result: Whether you make faces separate by duplicating vertices on the merge points, or not, result is same: Transition is smooth.
I am unable to produce hard edges with procedural mesh generator in blueprints.
I was able to fix this issue by coding my own “Calculate Sharp Normals” function. Looks like, existing “Calculate Normals and Tangents” function in the engine matches vertices by their coordinates, not indices; and this is a wrong approach to calculate normals in most cases. Instead, I assigned averages of matching triangles’ normals to each vertex.
Here is the comparison. Base Color input of the material is connected to VertexNormalWS node.
I have a function library which have this function: “Calculate Normals Non Pure”. This function calculates normals correctly, which Kismet’s function can’t do.
Even it is made with only blueprint, it is faster than native calculation function of Epic’s Kismet Function Library.
You can create smooth or sharp normals. Also you can use smoothing groups too.
Links:
Alternative:
CAN SOMEONE FROM EPIC ADD THIS TO THE ENGINE AS A NATIVE FUNCTION? YOUR EXISTING FUNCTION IS CALCULATING VERY WRONG NORMALS