Download

[Material] Gradient by Actor Bounds?

Hi,

how can I get a gradient by actor bounds? Only found a tutorial with object bounds:

As you can see, the gradient gets applied on every single mesh, but I need a gradient for the entire Actor (object).

Are you asking about a specific material function to get the actor bounds?

The easiest way I can think of would be to read the actor bounds in the actor setup code, and configure a parameter on the material for what the bounds are. Will that not work for you? (Also, maybe there is some actor bounds material expression and I just can’t think of it right now?)

I replaced “object ws” with “actor ws” and set the bounds to max. It’s a bit hacky, cause I can’t mask the z axis gradient completly, but it is o.k.

Thx