Is there any way to get a per-material-instance random for plain StaticMesh?
I want the behavior of PerInstanceRandom, except I want it for each StaticMesh instance of a particular material I've built. I do not want to turn the mesh into a blueprint and have a construction script that creates a dynamic instance for each and configures the random number if I can avoid it. Given that each render of a given shader needs per-instance updates anyway (for things like world position, light positions, etc) then this should be possible without slowing down the renderer or requiring significantly more resources.
What I want to use it for is making procedural materials not all animate in sync.
asked Jun 08 '14 at 12:52 AM in Rendering
Hi jwatte -
I think I have a better handle on what you are trying to do, here is one option by using an overlayed texture which is setup via Object Position (WS) so it will change based on where the static mesh is placed in the world. One caveat on the material, I have masked out RG from Object Position so the mesh only response to left to right movement and not up and down. You can change this based on what you mask out of the Object position.
Hope this helps you out, or at least gets you started -
answered Jun 09 '14 at 01:39 PM
Lovecraft_K ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here