PerInstanceRandom and Instanced Static Mesh bug.

Naifu
Fri, 11 Aug 2017 06:20:02 +0000
Rendering

In 4.17, unlike 4.16.3, “PerInstanceRandom” node in material doesn’t change value with instances of Instanced static mesh component, if they are NOT added in construction script or directly to component.
Reproduction steps:

1. New project or any other.

2. Create new material with PerInstanceRandom connected to “Emissive Color”. Will have to set it to use with Instances as automatic doesn’t seem to work.

3. Create new actor and connect “Add Instance Static Mesh Component” to “Event BeginPlay”.

4. Set mesh to anything and material to the one created in “2.”.

5. After component, connect multiple “Add Instance” nodes with random locations or use for loop.

6. Observe as all instances have the same color.

If you do this in Construction script or directly click + to add instances to mesh component, PerInstanceRandom works. If you than use Update Instance Transform on the same instances PerInstanceRandom doesn’t work.

12 posts - 1 participant