I had this idea in my head to use luminance values to animate a logo and I'm so happy I found this tutorial so quickly. Wish the rest of life could be this easy.
Just a secondary thought and obviously super late in the game here! But if you precompose the shape layer and add your expression to that, you could easily change out your shape later on and not have to duplicate and line up all those layers again. Would love to hear your thoughts. Thanks for the tutorial!
This is exactly what I did it works way better only issue is still the grid is a nightmare and if you ever want to change the amount in the grid good luck
here is a more efficient way using time displacement: animate the size in comp then use time displacement effect and what ever the gray scale map, then you are be able to make is 100* faster and won't slow down a bit even if you double the amount of the dots
@@jambones12 using time displacement instead of using sampleimage, all the underlying layers will be time remapped according to a animated grayscale comp.
Trying to figure out how to adjust this to work on a 3D layer, but get it to change the orientation. Suggestions (ima go back and watch a few more times, think I might've missed something that answers that)?
Awesome! Yeah, I'm trying to learn expressions, but my man a lot of it goes right over my head. Part of the reason is there are so may expression functions that can do awesome stuff that isn't easy to find. Like I didn't even know about sampleImage until I searched the forms at CreativeCow and found motionscripts.com.
@@moboxgraphics Instead of creating the expression and then creating the grid - you could create the grid in Illustrator create the expression on one layer. Right click on the property, "Copy Expression Only" and the select all layers within the grid and hit paste.
7 years bit late but why is it only reacting to linear gradient ramp but not circular gradient if i apply circular shape of matte inside Gradient comp?
Yeah sampleImage is a new one for me, but it certainly offers a lot of creative freedom. During my research I found people creating RGB color pickers and much more. Really cool stuff
9:14 - Now the size controller seems to scale the dots around an invisible anchor point I can't change? In your video they shrink down to the center of the shape.
This expression doesn't quite work for me in Adobe AE 2021... For some reason it causes my shape layer to change position as well as scale (I have applied the expression to Transform -> Scale). If I adjust the gradient from white to black, then the shape will start in the center of the composition and move toward's it's original position in the comp whilst also changing scale from 0 to 100%. Any idea what is causing the position to transform as well as scale?
Is there any possibility to create this in Photoshop or illustrator? I need exactly like this, but controlled by the black/white value of any image/mask.
Hi.. Thank you, man, for this great tutorial. Is it possible to do the same thing to "Opacity" of the layer.? If yes, would you please tell how to change the expression code for that purpose.?
Was wondering what it would look like if it was opacity linked to the white level of the other layer instead. So it would sample any area of a noise layer or gradient and would vary in opacity as it travels around the screen.
7:22 what do you mean by "I'm turning this into a string"? I can see from some research it seems to do with Python but I'm an After Effects guy and I don't understand what is happening or what that means. Some explanation would be much appreciated!
Sorry, so basically [0] means I want the first component of the string. The string is [0,1,2,3] so basically they are the components of the color information. In this case it's 0.51 ish and I want the first value [0.51,x,x,x]
hey, I'm a guy from the cgi world, never dug too much into AE but I'm getting the point here. Quick question : Is there a world where doing this kind of stuff would be possible without writing any line of code, like plug and play, like "scale = this grayscale layer, remap value and done" Because what I see is absurdly complicated. Maybe a plugin exist ?
What you're going to find is that everything in Ae is overcomplicated, slow, etc. It's one of those programs that can do a lot, but it's so old that nothing is fluid or simple unless you stick to the core functionality.
Thank you very much for this tutorial. Any idea why if I parent the dots to something the expression dies? I need to also rotate them linking them to Null but some of them disappear if I parent them...
I don't think the expression dies... but when you parent something - it's position value changes from where it's currently at relative to the top left corner of the comp - and now the position value is relative to whatever you have now parented to - so now it's sampling in a different area.
Great tutorial, thanks! Quick question, is there a way to attach that expression to the colour? So if I want the colour to be darker when its smaller and brighter when its bigger?
So, what would this look like if you wanted to change the Y Position relative to the gradient color? That is, if you had the grid set up the same way, but you want all the circles to do "the wave."
I just worked this out... Instead of a gradient layer though I have "FN Layer" as I'm trying this with fractal noise... POS=transform.position; //position of current Layer x = thisComp.layer("FN Layer").sampleImage([POS[0],POS[1]], [.5,.5]/2, true, time)[0]; // Returns the 0 value of sampleImage() Array from this layers position on a fractal noise layer "FN Layer" [transform.position[0],transform.position[1],linear(x,0,1,-1000,1000)] //Specifies the return of values leaving x and y position unchanged and editable while making the z value fluctuate back and forth in space when var x goes from 0 to 1, will adjust the z value from -1000 to 1000
Would this script be able to be used for example to position a layer in 3D space? When I enable 3D on the layer, I get the error message of "argument 1 to sampleImage() must be 2 numbers". I'm guessing I need to add in another parameter somewhere since the scale now has 3 parameters instead of 2, but I really can't figure out for sure where that is. The expression works perfectly when 3D is not enabled. Thanks for the tutorial!
Just a tip guys - as this had me stumped, initially. If you don't see a property called "Size" with a stopwatch beneath Shape Layer 1 > Contents > Ellipse 1 > Ellipse Path 1, then - like me - you drew your shape with the Bezier Path option ticked. I simply deleted my first circle, select the circle drawing tool again, unticked the Bezier Path checkbox, then drew again. Now the shape has the Size property.
CC 2017 Trial - same as you I think :) With Default workspace it shows up in the top bar above my preview when I have the ellipse shape tool selected, ready to be ticked or not ticked. I am at the end of my 7 day trial now though, so having picked up a lot of stuff over the last week from a udemy course and videos like yours (much thanks, by the way - loving your content!) I'm well and truly hooked and going to take the plunge on a monthly license.
Cool video. How do we overcome situations where there's a vector layer containing 800 different dots... Since your approach cannot work with those kinds of shapes layers that contain subgroups, how could we go about extract those subgroups as individual layers? Would probably overwhelm the program? Is there a way around that?
I think if you convert vector to shape layers (assuming that the layers are separated in Ai), you can copy expression and paste on the new layers. But be warned, this will kill most computers.
Here's the biggest tip I can give someone first starting out: Have something to offer. The only way to get someone to give you something is to have something of value to give in return. For large channels, that is exposure, for smaller channels it's a bit harder. You need to be able to offer technical skills, quality, specialty abilities. Something. Big channels get 100+ messages per day about shoutouts or collaborations. Demand is high, supply is low. Differentiate yourself, bring something to the table and make sure you have something to offer. Best of luck to you!
@@moboxgraphics I just worked this out... Instead of a gradient layer though I have "FN Layer" as I'm trying this with fractal noise... POS=transform.position; //position of current Layer x = thisComp.layer("FN Layer").sampleImage([POS[0],POS[1]], [.5,.5]/2, true, time)[0]; // Returns the 0 value of sampleImage() Array from this layers position on a fractal noise layer "FN Layer" [transform.position[0],transform.position[1],linear(x,0,1,-1000,1000)] //Specifies the return of values leaving x and y position unchanged and editable while making the z value fluctuate back and forth in space when var x goes from 0 to 1, will adjust the z value from -1000 to 1000
Hi! Awesome tutorial! I have one question, I'm trying to change the gradient wipe to a black/white image (jpg), but it doesent work. It makes the dots scale at wrong place. Like as if the image isnt where it is showing on screen. Any ideas?
Fantastic tutorial. Thank you! Would love to be able to link the fill color to the gradient control too. eg: the smaller shapes are green and larger shapes are red. I am sure there is a way, but my expression skills are lacking.
i know Im asking the wrong place but does anyone know of a method to get back into an instagram account..? I was stupid lost my account password. I love any tricks you can offer me!
@Kade Matthias I really appreciate your reply. I got to the site on google and I'm trying it out now. Looks like it's gonna take a while so I will reply here later with my results.
Hi. Great tutorial! I want to move multiple objects with a null object, but when I parent my my shapes to a null, the script stops working. Is there a way to parent multiple object?
I just saw your comment as I was trying to make a similar thing happen. I had everything parented and it locked down and used the parent as the "sensor". I ended up having to un-parent it to make it work properly. I'd love to find a solution as well where the parents can stay linked
@@jozefgunter5755 can't really help you sadly. I had it figured out sort of but i looked horrible for my animation so i think i scrapped it bc im looking through the project and i can only find the scale effect like in the video.
@@dukkiegamer1733 I did some more digging and found the solution. You put the expression in opacity instead of scale but remove the final x in the expression. So it'll look like this x = thisComp.layer("Gradient").sampleImage(transform.position, [.5,.5]/2, true, time)[0]; 100*[x] So everything is the same except instead of [x,x] it's [x]. Thank for replying.
So, I'm trying to replicate this effect, but using the expression to modulate the opacity of the layers. This isn't working, considering that position is two dimensional and opacity is 1. Do you know how I might translate the position data into a one dimensional form that can change opacity? Even color would be cool, but I don't know how that'd work.
heyy! thank you so much for this tutorial! i did it perfectly (only took a couple tries lol) but i am also trying to figure out a way to add a full image inside these circles. Do you know how to do that? i want like the image to somehow make this effect by being inside of them somehow. idk hopefully that makes sense haha
This is super late but in case you are still interested: Place your image at the very top of all the layers, then activate "Preserve Underlying Transparency" (google where that is if you're not sure). hope that helps!
I had this idea in my head to use luminance values to animate a logo and I'm so happy I found this tutorial so quickly. Wish the rest of life could be this easy.
I spent 2 days trying to made this thing in repeater... And finally RUclips recommend me this video.
THX man. And YT algorithm of course.
In place of a black & white gradient, you could also use the fractal noise for more wilder effect.
Just a secondary thought and obviously super late in the game here! But if you precompose the shape layer and add your expression to that, you could easily change out your shape later on and not have to duplicate and line up all those layers again. Would love to hear your thoughts. Thanks for the tutorial!
This is exactly what I did it works way better only issue is still the grid is a nightmare and if you ever want to change the amount in the grid good luck
@@reecet-p347 the script works for me on a shape layer but not on anything precomposed, what am I doing wrong?
Thanks for the tutorial! Fractal noise could be pretty cool to use as a driver for this effect also.
This is beautiful. Thank you for making this tutorial (looks incredibly complex but under the hood is a clever and easy to replicate solution).
here is a more efficient way using time displacement: animate the size in comp then use time displacement effect and what ever the gray scale map, then you are be able to make is 100* faster and won't slow down a bit even if you double the amount of the dots
Could you explain? I need more dots and more speed!
@@jambones12 using time displacement instead of using sampleimage, all the underlying layers will be time remapped according to a animated grayscale comp.
Now you can track matte to the single gradient to control the opacity as the shapes scale. TY
Trying to figure out how to adjust this to work on a 3D layer, but get it to change the orientation. Suggestions (ima go back and watch a few more times, think I might've missed something that answers that)?
Awesome dude, this is super helpful. Like your description too, so informative.
Thanks lots for the tutorial! Expressions give a lot of creativity space in AE. Huge fan of yours ✌️
Awesome! Yeah, I'm trying to learn expressions, but my man a lot of it goes right over my head. Part of the reason is there are so may expression functions that can do awesome stuff that isn't easy to find. Like I didn't even know about sampleImage until I searched the forms at CreativeCow and found motionscripts.com.
@@moboxgraphics Instead of creating the expression and then creating the grid - you could create the grid in Illustrator
create the expression on one layer. Right click on the property, "Copy Expression Only"
and the select all layers within the grid and hit paste.
This right here is an awesome tutorial!
Thank you for making this tutorial !!
7 years bit late but why is it only reacting to linear gradient ramp but not circular gradient if i apply circular shape of matte inside Gradient comp?
Great tutorial!
Thanks for inclusing the project file too
The result is mind blown!
Very cool tutorial man
Really nice gradient!
Hун bro, how to switch places?
On black to increase the shape of the balls?
i did not understand the text about fill and color changing that shows up at 3:03 . anyone?
How would i write the script to alter the vertical position of the letter, rather than its scale?
So it only moves up and down on one axis
thank you for making these cool tutorials
Really cool. I've been wondering what all you could accomplish by tying seemingly unrelated properties together. Nice example.
Yeah sampleImage is a new one for me, but it certainly offers a lot of creative freedom. During my research I found people creating RGB color pickers and much more. Really cool stuff
9:14 - Now the size controller seems to scale the dots around an invisible anchor point I can't change? In your video they shrink down to the center of the shape.
any ideas on how I could map this same expression to control rotation?
Maybe you should apply expression to rotation, but not to scale how it maded in video
Thanks a lot! it was quite useful for me 🙌
This expression doesn't quite work for me in Adobe AE 2021... For some reason it causes my shape layer to change position as well as scale (I have applied the expression to Transform -> Scale). If I adjust the gradient from white to black, then the shape will start in the center of the composition and move toward's it's original position in the comp whilst also changing scale from 0 to 100%. Any idea what is causing the position to transform as well as scale?
Is there any possibility to create this in Photoshop or illustrator? I need exactly like this, but controlled by the black/white value of any image/mask.
Great tutorial! I've been looking for ways to use expression in motion graphics.
great video as always :)
Why is the size control null needed? It isn't used at all. I replicated your tutorial without the size control null object and it worked fine.
would it be possible to make a 3D version of this expression by altering the Z position instead of the scale?
You Just saved me a lot of time
Dan Ebberts the god! Love the video! tks
Awesome tutorial. Thanks!
i dont understand, as soon as i remove the gradient ramp from the gradient layer, everything stops working. pls send help
Hi.. Thank you, man, for this great tutorial. Is it possible to do the same thing to "Opacity" of the layer.? If yes, would you please tell how to change the expression code for that purpose.?
transform.Opacity = thisComp.layer("Gradient").sampleImage(transform.position, [1,1]/2, true, time) [0];
100*[transform.Opacity]
@@Bbnvts Thank you so much. I'm gonna try that out. Highly Appreciated.
7:52 - Size control layer stops working. Wont let me adjust the size of the shape with the slider control anymore?
amazing! thanks for this tutorial
Wow! This video really helped me a lot! Thank you
I can't get this to work as well as it used to. There is no gradual scale only 0 or 100, and nothing in-between. Even with a very soft graduation.
Was wondering what it would look like if it was opacity linked to the white level of the other layer instead. So it would sample any area of a noise layer or gradient and would vary in opacity as it travels around the screen.
So siiiick. Thank you!
Can this be done with just opacity instead of size?
7:22 what do you mean by "I'm turning this into a string"? I can see from some research it seems to do with Python but I'm an After Effects guy and I don't understand what is happening or what that means. Some explanation would be much appreciated!
Sorry, so basically [0] means I want the first component of the string. The string is [0,1,2,3] so basically they are the components of the color information. In this case it's 0.51 ish and I want the first value [0.51,x,x,x]
@@ekimoleksander6068 That makes sense, thanks for explaining! I'm used to the [0] being like position x and things like that.
Does anyone know if this works to control opacity as well?
great tutorial!!
thanks man! helped me a lot!
hey, I'm a guy from the cgi world, never dug too much into AE but I'm getting the point here. Quick question : Is there a world where doing this kind of stuff would be possible without writing any line of code, like plug and play, like "scale = this grayscale layer, remap value and done" Because what I see is absurdly complicated. Maybe a plugin exist ?
What you're going to find is that everything in Ae is overcomplicated, slow, etc. It's one of those programs that can do a lot, but it's so old that nothing is fluid or simple unless you stick to the core functionality.
@@moboxgraphics I get it. If only we had a combinaison of illustrator and houdini for 2D mograph. thx for your answer
can i get code of alt+size...
What do you click to see that panel in size? (Im spanish, sorry for the bad english)
I am really struggling to get the expression for colour sorted
it gives an error at the sampleImage: the first parameter has to be two numbers... How can I fix this?
Uncheck 3D box on your layer, fixed it for me
Thanks a lot, i've a question, why you didn't use a repeater for a dots, and duplicated them manually?
beautiful
OMG this is brilliant
Hi! Where cool tutorial! Can u advice how to use this method for 3D layers in AE please?
great tutorial, thanks
Nice tutorial , thanks
how we can achieve this for lottie ?
Thank you very much for this tutorial. Any idea why if I parent the dots to something the expression dies? I need to also rotate them linking them to Null but some of them disappear if I parent them...
I don't think the expression dies... but when you parent something - it's position value changes from where it's currently at relative to the top left corner of the comp - and now the position value is relative to whatever you have now parented to - so now it's sampling in a different area.
What if your layers are 3D?
GJ I LIKE IT!
Great tutorial, thanks! Quick question, is there a way to attach that expression to the colour? So if I want the colour to be darker when its smaller and brighter when its bigger?
So, what would this look like if you wanted to change the Y Position relative to the gradient color? That is, if you had the grid set up the same way, but you want all the circles to do "the wave."
Super Nice
Any idea how to add colour to this? Meaning when the object gets smaller it changes to a certain colour? really need help )
Question: How would you use this to affect the position of the shape layer. I.E. Like you would with a cloner/plain effector in C4D.
I just worked this out... Instead of a gradient layer though I have "FN Layer" as I'm trying this with fractal noise...
POS=transform.position; //position of current Layer
x = thisComp.layer("FN Layer").sampleImage([POS[0],POS[1]], [.5,.5]/2, true, time)[0]; // Returns the 0 value of sampleImage() Array from this layers position on a fractal noise layer "FN Layer"
[transform.position[0],transform.position[1],linear(x,0,1,-1000,1000)] //Specifies the return of values leaving x and y position unchanged and editable while making the z value fluctuate back and forth in space when var x goes from 0 to 1, will adjust the z value from -1000 to 1000
great tut!
Would this script be able to be used for example to position a layer in 3D space? When I enable 3D on the layer, I get the error message of "argument 1 to sampleImage() must be 2 numbers".
I'm guessing I need to add in another parameter somewhere since the scale now has 3 parameters instead of 2, but I really can't figure out for sure where that is. The expression works perfectly when 3D is not enabled.
Thanks for the tutorial!
Cool! Would it be possible to control Stroke Width, with this expression?
Hey is there anyway I can animate individual paths within a shape in this way? cheers
cool tut!
This guy named Dan should have a youtube channel, This guy named Dan
Just a tip guys - as this had me stumped, initially. If you don't see a property called "Size" with a stopwatch beneath Shape Layer 1 > Contents > Ellipse 1 > Ellipse Path 1, then - like me - you drew your shape with the Bezier Path option ticked. I simply deleted my first circle, select the circle drawing tool again, unticked the Bezier Path checkbox, then drew again. Now the shape has the Size property.
+Andrew Jaques Ahh I see. You must be using cs5? Bezier Path is no longer a toggle in CC. Thanks for the input!
CC 2017 Trial - same as you I think :) With Default workspace it shows up in the top bar above my preview when I have the ellipse shape tool selected, ready to be ticked or not ticked.
I am at the end of my 7 day trial now though, so having picked up a lot of stuff over the last week from a udemy course and videos like yours (much thanks, by the way - loving your content!) I'm well and truly hooked and going to take the plunge on a monthly license.
Can I use this video to make sound effect on this point?
Legend
Cool video. How do we overcome situations where there's a vector layer containing 800 different dots... Since your approach cannot work with those kinds of shapes layers that contain subgroups, how could we go about extract those subgroups as individual layers? Would probably overwhelm the program? Is there a way around that?
I think if you convert vector to shape layers (assuming that the layers are separated in Ai), you can copy expression and paste on the new layers. But be warned, this will kill most computers.
@@moboxgraphics Kind of what I assumed... thanks. Probably a practice best done in chunks...
Boi thank you!!
Any tips on how I could make this work for a 3D layer?
Thanks, help me a lot
Thanks bro you really help me :-)
It's a little complicated and kind of slow, but I don't see another way to do it and have as much control.
MOBOX Graphics i have a question bro do you know someone who can shout out my channel???
Here's the biggest tip I can give someone first starting out:
Have something to offer. The only way to get someone to give you something is to have something of value to give in return. For large channels, that is exposure, for smaller channels it's a bit harder. You need to be able to offer technical skills, quality, specialty abilities. Something. Big channels get 100+ messages per day about shoutouts or collaborations. Demand is high, supply is low. Differentiate yourself, bring something to the table and make sure you have something to offer. Best of luck to you!
MOBOX Graphics Thanks bro great tips i will follow them thanks again:-)
EverTopTube I
Thank you for this tutorial, but I have a question : How can I apply this expression on the z axis to control it like you do with the scale ?
I'm sorry, but without trying it, I could not be certain. Maybe I'll make a tutorial on it soon? Keep an eye out.
@@moboxgraphics
I just worked this out... Instead of a gradient layer though I have "FN Layer" as I'm trying this with fractal noise...
POS=transform.position; //position of current Layer
x = thisComp.layer("FN Layer").sampleImage([POS[0],POS[1]], [.5,.5]/2, true, time)[0]; // Returns the 0 value of sampleImage() Array from this layers position on a fractal noise layer "FN Layer"
[transform.position[0],transform.position[1],linear(x,0,1,-1000,1000)] //Specifies the return of values leaving x and y position unchanged and editable while making the z value fluctuate back and forth in space when var x goes from 0 to 1, will adjust the z value from -1000 to 1000
how to restrict thing position in range
What do I do; when I off my gradient, the circles are gone?
This gradient expressions doesn't works , i copy it , but after past, it says effort. I use AEcc2014 , is that my version due to this effort? rsvp~
Thank you
ECAbrams? Anyone? Just me?
Cool Tutorial Mobox
Yeah EC Abrams is awesome. Wish he uploaded more frequently!
Hi! Awesome tutorial! I have one question, I'm trying to change the gradient wipe to a black/white image (jpg), but it doesent work. It makes the dots scale at wrong place. Like as if the image isnt where it is showing on screen. Any ideas?
It doesnt work if you have the images you want to scale with the gradient are picked to null object. Had the same problem today.
Fantastic tutorial. Thank you! Would love to be able to link the fill color to the gradient control too. eg: the smaller shapes are green and larger shapes are red. I am sure there is a way, but my expression skills are lacking.
i know Im asking the wrong place but does anyone know of a method to get back into an instagram account..?
I was stupid lost my account password. I love any tricks you can offer me!
@Jensen Damon instablaster ;)
@Kade Matthias I really appreciate your reply. I got to the site on google and I'm trying it out now.
Looks like it's gonna take a while so I will reply here later with my results.
@Kade Matthias it did the trick and I actually got access to my account again. I'm so happy:D
Thanks so much, you really help me out :D
@Jensen Damon You are welcome =)
Very nice.
Very helpful
Hi. Great tutorial! I want to move multiple objects with a null object, but when I parent my my shapes to a null, the script stops working. Is there a way to parent multiple object?
I just saw your comment as I was trying to make a similar thing happen. I had everything parented and it locked down and used the parent as the "sensor". I ended up having to un-parent it to make it work properly. I'd love to find a solution as well where the parents can stay linked
expression can't work :-:
I'm tryng to make this but instead of scaling trying to control the opacity with it but I'm just not getting anywhere.
Did you ever figure this out? I'm having the same issue.
@@jozefgunter5755 can't really help you sadly. I had it figured out sort of but i looked horrible for my animation so i think i scrapped it bc im looking through the project and i can only find the scale effect like in the video.
@@dukkiegamer1733 I did some more digging and found the solution. You put the expression in opacity instead of scale but remove the final x in the expression. So it'll look like this x = thisComp.layer("Gradient").sampleImage(transform.position, [.5,.5]/2, true, time)[0];
100*[x] So everything is the same except instead of [x,x] it's [x]. Thank for replying.
So, I'm trying to replicate this effect, but using the expression to modulate the opacity of the layers. This isn't working, considering that position is two dimensional and opacity is 1. Do you know how I might translate the position data into a one dimensional form that can change opacity? Even color would be cool, but I don't know how that'd work.
learn value expression thats will solve your problem
transform.Opacity = thisComp.layer("Gradient").sampleImage(transform.position, [1,1]/2, true, time) [0];
100*[transform.Opacity]
Tks!!!
Thank you bro!!! Спасибо!
heyy! thank you so much for this tutorial! i did it perfectly (only took a couple tries lol) but i am also trying to figure out a way to add a full image inside these circles. Do you know how to do that? i want like the image to somehow make this effect by being inside of them somehow. idk hopefully that makes sense haha
Wouldn't making the circles precomps instead(and resizing the precomps) and then masking the photo to the size of the circle work?
This is super late but in case you are still interested: Place your image at the very top of all the layers, then activate "Preserve Underlying Transparency" (google where that is if you're not sure). hope that helps!
great tut! thanks, but i can´t find the project file...
Project Files - www.patreon.com/posts/16937315