Per Instance Random not working on Material Layer

Hello. Im trying to use Per Instance Random node inside Material Layer Asset. But it always return black unlike when plugged into Master Material. Anyone know how to fix this?


Hello @SyedHafiz you can do that using te tool foliage, it has color variation, scale, rotation, … a lot of tools and is so easy to use

You can take a look in here

Thanks for the reply @alberto . Sorry I actually want to use Per Instance Random specifically for this case inside a Material Layer asset. It actually works in UE4 but when I migrate to UE5 the Per Instance Random always return zero.

@SyedHafiz If always returns 0 I think the problem is in the platform, check if you are using some and if you have an error:

image
For example I just notice mine I disaster :joy:

I actually solved it by using PerInstanceRandom node in the master material of the material layer and connect it to the CustomizedUV output. I then use the TexCoord to access this data inside the material layer itself.


image

1 Like

Huge thanks you saved me a lot of time with this post. This solution also works for ‘per instance custom data’ which allows for some pretty cool stuff.