Unreal Engine 5 - Change Base Color based on random value for each item in mesh

Viewed 10

I am learning Unreal and currently building tree models. I am wanting to change the colour of the leaves between 3 texture samples based on random numbers, and while I have created a blueprint that can compare between numbers and output the correct colour, I can't find an input node that will assign a random number to each of the leaves.

The tree model is all one mesh however the vertices for the leaves are not connected between leaves. If I go into Unreals Modelling Mode and choose the TriSel (Triangle Select) tool I can select each leaf separately with one click, though I cant figure out any way to use this in the material editor.

I have attached a screenshot of the node group to select the base colour image below (the output of this group goes to the "Base Color" input). Currently the "Temp" value is changed manually (which changes the colour of all the leaves with this material), however that is where I want to input the random value for each leaf, if I can.

Node Group

Thanks,

Dan

0 Answers
Related