CreateMeshSection Node uses ColorStructure instead of LinearColorStructure

Hi there!
Im using the new procedural mesh component, and when trying to set vertex colors for a new mesh section the node asks for an array of Color Structures. For some reason we cant make variables out of color structures (see [this previous][1] issue) so the only option here is to make a new array on the go. This, of course, severly limits the functionality of the vertex color feature. Im guessing it is supposed to be taking in an array of Linear Color Structs instead of Color Structs?

Are there any possible workarounds here? Either make the node take Linear color structs or make the color structs variables available?

Hello randomallfront,

Could you try the following example and let me know if this works for you?

Example:

In this example I have taken a “Make linear color” node and I have converted it to a color struct (I dragged off of the linear color pin and dropped it onto the make array node).

Make it a great day

Thanks for your answer !
Well that is one possiblity, but it doesnt really help in the long run. You can translate linear colors to color structures, but you still cant use arrays, other than the one you make there on the spot. The VC array must be the same length as the vertices array, and in my example the vertices array may vary in length. There is no way to do this without using actual arrays for the color structures.

I did try your idea in an earlier setup, it works kinda… If the number of vertices is fixed. But it does look ridiculous… :slight_smile:

Hello randomallfront,

Have you tried using a combination of loop and/or resize array nodes to assign your colors?

I would if I could… But the array i made for the vertex colors cannot be altered in any way, because as mentioned the color struct and the color struct array, cant be promoted to a variable. It can only be made like shown in the last screenshot.

Hello randomallfront,

I took another look at the issue and I have written up a feature request ( UE-20093) to allow the Vertex Colors pin to be promoted to a variable. I have submitted this report to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information.

Make it a great day

Hi , any update on this? I’m creating a procedural mesh and am running into this identical problem.

I’ve tried the suggestion of using makeArray to generate a color struct array however adding to this array by referencing the makeArray node creates a new array every iteration of the loop leaving the length to be always 1.

The problem remains: color struct arrays can’t be promoted to variables and there is no direct translation from linear color struct arrays to color struct arrays.

Hello ,

I went ahead and double checked on this issue for you and it has been fixed internally. This solution will be available in a later release of the engine. Thank you for your time and information.

Make it a great day