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

random size shapes and follow text width

New Here ,
Jul 28, 2022 Jul 28, 2022

76b4f9da-106a-4382-aa7f-d16dd8c5e177.pngexpand image

 

09d12a2f-f28a-4807-b018-4f8b48049a8c.pngexpand image

 

제목 없음.pngexpand image

 

I want an expression where each shape has a random height and automatically adds a shape according to the text length.

 

please let me know if there's a good way

TOPICS
Expressions , FAQ
444
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

Community Expert , Jul 28, 2022 Jul 28, 2022

Maybe something like this:

minHeight = 25;
maxHeight = 50;
seedRandom(index,true);
h = random(minHeight,maxHeight);
r = thisComp.layer("text").sourceRectAtTime(time,false);
w = r.width;
[w,h]
Translate
Community Expert ,
Jul 28, 2022 Jul 28, 2022

Maybe something like this:

minHeight = 25;
maxHeight = 50;
seedRandom(index,true);
h = random(minHeight,maxHeight);
r = thisComp.layer("text").sourceRectAtTime(time,false);
w = r.width;
[w,h]
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
New Here ,
Jul 28, 2022 Jul 28, 2022
thank you for answer.

however, I mean that the width of the shape is not adjusted according to the text,
but a shape of random height is added like a repeater effect.

제목 없음1.pngexpand image

 

제목 없음.pngexpand image

 

 
 
 

 

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
LEGEND ,
Jul 28, 2022 Jul 28, 2022

Expressions cannot duplicate items nor can a Repeater have random sizes and that's pretty much all there is to say. You can randomize the size using the expression Dan provided just liek you can have their spacing calculated automatically, but you have to manually duplicate the rectangles. That said, it might be easier to just find a suitable dingbat font with a rounded square and type out the lines, then apply text animators for size with a wiggly/ random selector.

 

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
New Here ,
Jul 28, 2022 Jul 28, 2022
LATEST

thx!

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