Generate Procedural Mesh

Hi All, thanks to whos worked on this. It’s been a real help in my project.

I’m currently working on a procedural spline mesh which is generated from a spline component. I’ve got it working pretty well:

I’m playing around with the vertex colors, I want to be able to use them to drive the emissive output of the mesh with alpha controlling the intensity. The problem I’m facing is that currently vertex colors use FColor instead of FLinearColor. I want to be able to have values of more than 1.f for my vertex colors so I can create bloom. Does anyone know if it’s possible to change the procedural mesh so that it will use FLinearColors for the vertex color values instead? Or any other way to pass per vertex data into the material?

Edit:
I’ve dug around in the engine code a bit and found this comment in FLocalVertexFactory::SetData()



void FLocalVertexFactory::SetData(const DataType& InData)
{
	check(IsInRenderingThread());

	// The shader code makes assumptions that the color component is a FColor, performing swizzles on ES2 and Metal platforms as necessary
	// If the color is sent down as anything other than VET_Color then you'll get an undesired swizzle on those platforms
	check((InData.ColorComponent.Type == VET_None) || (InData.ColorComponent.Type == VET_Color));

	Data = InData;
	UpdateRHI();
}


So it looks like it’s not possible to use a float4 for vertex color at the moment with out modifying the engine code significantly.