• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Scale expression with gradient and parenting

Community Beginner ,
Mar 17, 2020 Mar 17, 2020

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

Screenshot 2020-03-17 at 12.43.05.png 
This is before parenting, the scale expression works perfectly

Screenshot 2020-03-17 at 13.06.47.png 
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!

TOPICS
Error or problem , Expressions , Scripting

Views

613

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 17, 2020 Mar 17, 2020

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 17, 2020 Mar 17, 2020

Copy link to clipboard

Copied

LATEST

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines