Help with Instance Static Mesh data in materials

I’m working with multiple Instance static meshes on a single actor. These ISMs have the same material and we have positional grunge. There are a few problems that I am running into with this.

If the ISM rotates in X/Y it breaks the positional grunge on all ISMs

If the ISM translates in Z up or down it breaks as well.

My question is: How can I work with an upvector gradient per instance?

Hey there! Usually you’d want to transform your Absolute World Position into Instance and Particle Space, or using the new LocalPosition material expression. That way even effects in the pixel shader will work on a per-instance basis. Let me know if that helps, we can go deeper if need be.

MATT!

This makes sense, however, the problem will still persist with rotations.

My current thinking is to push the per instance data in when it’s being instanced.

If all of our ISMs were on the same plane as the actor and would only rotate on the Z axis then your suggestion works well, but that’s very restrictive.

In my testing, using the Local Position input node accounted for instance rotation in X, Y, and Z. Is that not what you’re seeing?