PerInstanceRandom material input not working?
I'm trying to set up an opaque broken window material to apply on destroyed building windows.
I don't want every window to be broken in exactly the same way, so I'm trying to randomly rotate and pan my broken window texture by a fixed random number, before applying it on the rest of my material.
To achieve this I'm using the PerInstanceRandom node, the only random node usable in materials. Weird thing is, it doesn't seem to work.
It looks like this:
If I use a constant instead, the texture pans and rotates as intended, but as soon as I plug in the random node, the texture resets to its default position.
Does anyone have a clue about what the problem is here? I tried to change the default speed of the rotator and panner nodes, to multiply my random number by diverse constants... Whatever I do, it doesn't seem to work.
asked Sep 13 '15 at 09:49 AM in Blueprint Scripting
I see this is an old post but I just came across it looking for more info on PerInstanceRandom.
Your problem might be that your not using instanced meshes. That node seems to only work if you apply it to an instanced mesh, otherwise it stays it's default value. But it worked for me by applying it to an InstancedStaticMesh component in a blueprint.
answered Nov 16 '15 at 09:05 PM
Old post but I'll add this anyway. Another way you could probably do this that doesn't rely on instances is to use the world position to offset the UVs, used here just to make a bunch of objects not flash in sync.
![alt text] : /storage/temp/250392-capture.jpg
answered Aug 13 '18 at 03:07 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here