I've asked here: When making a Gradient Ramp can the Start/Stop be relative to the object? but it hasn't generated any answers for me. If anyone is into the StackExchange scene and wants to answer there too it would be great.
What I'm trying to figure out is if there's a simple way to have a Gradient Ramp's Start and Stop positions be relative to the object the effect is applied to. I guess I could do some tricky Pickwhip stuff but it seems like there should just be a tick box somewhere for this. It seems like a very obvious thing to me. I select a shape, apply a gradient ramp, if I move that shape I want the gradient ramp to move as well. Otherwise the shape looks drastically different if not entirely flat.
Is there a simple way to do this?
I know, the first time I encountered that I was like "what the heck is going on"!?
You can pre-compose the item with the ramp on it - this will "rasterize" the effect (so to speak) so when you move the object around the screen, the ramp will stay where it should.
Pre-compose or, better yet, use a shape layer with a ramp fill. Much better control, more flexible gradients, works for things like displacement maps without pre-composing.... Shape layers with gradient fills are the bomb. A linear gradient with the lighten blend mode over a 4 color linear gradient on a shape layer.
The other great thing is that you can use an expression to tie the start and end points of a gradient to the position of another layer or any other effect that has position data with a simple pick whip expression. You just grab the position of your 'mover' and then subtract half the width and height.
thisComp.layer("end mover").transform.position - [width/2, height/2 ]
If you wanted to get real fancy you could even factor in the shape layer's position or the shape position, scale, and rotation.
I haven't use gradient ramp for much of anything since shape layers were implemented.