Copy link to clipboard
Copied
Hello, it's the first time I post here so sorry if I get something wrong!
I am trying to create a lamp with a light beam made of a grid of dots, and I want this lamp to rotate left and right. The particular things that I want to add to this animation is making these dots disappear (changing the scale) when they go behind the text. I have created an expression following this tutorial (bearing in mind I am no good in expressions) and it works perfectly.
Unfortunately as soon as I parent it it a null some of them become scale 0 and the expression stops working.
Is there a way to rotate all of these dots together to achieve that effect?
Image below will help to understand
This is before parenting, the scale expression works perfectly
This is after parenting, the expression changes behaviour
The expression I have used on scale is this:
x = thisComp.layer("Gradient").sampleImage(transform.position,[1,1]/2,true,time)[0]; 100*[x,x];
And the gradient layer is just a black shape following the area of the text.
Is it possible to parent them in a different way to a Null?
Thank you!
Copy link to clipboard
Copied
Well, why even make it so complicated? This could easily be achieved with Card Dance or good old particle playground without any expressions and feeding whatever maps you generate into them directly. Otherwise your expression will of course break down without a layer space transform such as toComp(). The sampler otherwise will be relative to the layer.
Mylenium
Copy link to clipboard
Copied
Hi Mylenium, thanks for your response. I can't manage to use those two effects to achieve a perfectly distanced dots grid, could you suggest me how to do it?
Thank you!