How can i lock my gradient on scaled meshes ?

Hi first of all english is not native language.
I would like my gradient stay always at the top of my cube.
I don’t want him to be influenced by an enlargement, currently this my material.

You can lock the gradient to the object:

Thanks you but I don’t know how can I apply this in my gradient

I haven’t watched the vid for a while, but he shows you how to apply a gradient to an object, and that gradient will scale with the object. That’s what you want, right?

I hope this picture can explain what I want

Ok, so this isn’t a material problem, you just don’t want the top of the cube to get too big?

yes, I want an uniform gradient

Then you just have to not scale the cube on that axis. Am I missing something here?

I want to keep the scale of my gradient when I change the scale of my cube

Ok, that’s a world aligned material, which is what you have.

How can I do that ?

This is your basic world aligned material:

When you scale the object, nothing happens to the material:

344785-ezgifcom-gif-maker.gif

Yes I know this node but it is only for a T2D texture. It’s not compatible with a linear gradient

Here’s one that works just for the Z faces:

344787-ezgifcom-gif-maker1.gif

If you want it to work on all faces, you need to write the other 2 sides. Don’t think you can do it with those world position functions.

That I’m not sure of…

Thanks you a lot it’s working and how can i do this with a constant 3 vector ?