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

Auto-transforming layer duplicates

Explorer ,
Jan 28, 2022 Jan 28, 2022

Hey guys!

 

I need to tile a layer.

For the effect I'm going for, I can't use repetile.

Duplicating by hand is too painful.

I've found this expression:

x = (index-1)*50;
[x,transform.position[1]];

 It works for duplicating my layers (each one is 50x50px, so, perfect).

However, this only gets me a row of layers, right.

I'm sure there's a way to do this for the Y axis.

I've tried manually doing one column and then duplicating the layers, but that doesn't work because it shifts each layer 50px more on the X axis each time I duplicate...

TOPICS
Expressions
223
Translate
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

correct answers 1 Correct answer

LEGEND , Jan 28, 2022 Jan 28, 2022

You divide the index with the modulus:

 

(index-1) % numCols

 

This will return the index inside row and then you just need to multiply it with incremental indices per row. This is used in this old tutorial of Dan Ebberts:

 

http://www.motionscript.com/expressions-lab-ae65/random-grid-movement.html

 

You can easily find other examples for grids and tables using this technique in a simple web search.

 

Mylenium

Translate
LEGEND ,
Jan 28, 2022 Jan 28, 2022

You divide the index with the modulus:

 

(index-1) % numCols

 

This will return the index inside row and then you just need to multiply it with incremental indices per row. This is used in this old tutorial of Dan Ebberts:

 

http://www.motionscript.com/expressions-lab-ae65/random-grid-movement.html

 

You can easily find other examples for grids and tables using this technique in a simple web search.

 

Mylenium

Translate
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
Explorer ,
Jan 28, 2022 Jan 28, 2022
LATEST

Thank you!

Translate
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