Is anyone aware of whether there is a nice way to make UInstanceStaticMeshComponent’s PerInstanceRandom material node be enumerated instead of random?
This has many nice applications. For example, in a forest scene, you could easily control whether a tree is burning, by indexing into a texture that contains the burning state of each tree in the scene.
I’ve managed to make it not random in my own code by hacking the data before it makes it onto the GPU. But, is there a nicer way to do this? Any chance Epic could give us a PerInstanceID material node, along with an InstanceCount material node?
A - Change a foliage instanced actor to your own instance class that is burning (using your own Blueprint volume that changes from foliage actors to your own class),
B - Create a forest using your own Blueprint foliage actors with variables per-object for a burning state or not
C - Have 2 meshes, one with a burning material and one without, then use the foliage painter to mark the differences between both
Of course, if you are using the material for variance, you can always use power, multiply, add, subtract, lerp, etc. to change the values from a linear 0-1 to whatever you need.