How to make hexagon grid in After Effects - 150
Вставка
- Опубліковано 3 лип 2020
- In this tutorial: The way to create a grid of evenly spaced hexagons. The color of each hexagon is the color of the gradient at the center of the hexagon. Each hexagon acts as a pixel. In the tutorial that use expressions. You don't need third-party plugins or scripts.
Expressions in top comments
Hope it is helpful to you.
Thanks for watching. - Навчання та стиль
s=thisComp.layer(index);
rongComp=thisComp.width;
rongHinh=s.sourceRectAtTime(time-s.inPoint,true).width;
caoHinh=s.sourceRectAtTime(time-s.inPoint,true).height;
x=rongHinh*(index-1);
socot=Math.floor(rongComp/rongHinh)+1;
y=Math.floor((index-1)/socot)*(caoHinh-caoHinh/4);
if(Math.floor((index-1)/socot)>0)
{
if(Math.floor((index-1)/socot)%2==1)
x=x-socot*Math.floor((index-1)/socot)*rongHinh+rongHinh/2;
else
x=x-socot*Math.floor((index-1)/socot)*rongHinh;
}
[x,y]
I don't understand about this code. HIHI. But the hexagon looping is so beuatiful. Thank so much
For me After effects gives me an error message and says (translated from french) s.sourceRectAtTime is not defined, expression deactivated. How can i fix this?
I have a problem
when I duplicated hexagon. They are duplicate at a greater distance
Can you help me to solve this problem?
I figured it out: it's probably your scale that isn't set to 100%, probably because you played with the slider layer as I did. Then, be careful when a line is filled, only the first shape on second row will appear right, it is this one you need to duplicate so the code works. Hope it helps@@29031998100
hello, thank you for this great tutorial. I have a problem. when I add stroke to my shapes, there is a gap between them, can you help me please?
thisComp.layer("Gradient").sampleImage(transform.position, [.5,.5]/2, true, time)
Its amazing how you are giving these expressions for free! Thank you so much, this blew my mind!
Thanks 😍
Great video! Thanks for helping me learn!
It's beautiful AND we learnt something fabulous! Crap! I'm not angry, just disappointed... Thank you. Now where we? Vodka goes in this end, bullets go in that end...
Thank you so much, ur script made things so easy!!
Thank you😘
Thank you very much.. I am actually learning to write expressions, so i will try to modify this to scale hexagons by another gradient map.. :)
🥰
excellent tutorial.. thanks for sharing!
🥰
This is amazing! Thank you
🥰
wow, impressive, thank you!
🥰
thanks for the awesome tutorial and the music :)
🥰
BEAST! Thank you 😀
😘
Genial, gracias!
This is awesome! However I was following along nicely, pasted the code into the position transform and cannot replicate how I see you doing it. I'm not sure what I'm doing wrong? I may have to lay out my hexagons by hand.
Thank you so much! I've tested a lot of things with the gradients in the hexagons making really looking graphics, but It came to mind to rotate the hexagon 90º to make the top of the hexagons plane and when they repeat they dont fit u__u any way to solve it? Clearly the answer is in the code but I tried to change some things and as i don't know expresions yet I couldnt do anything lol
Hello cool. How to make shapes increase and decrease when an object moves under them?
THANK YOU SO MUCH
🥰
Thank you!
🥰
Coool! What's the music ?
Thanks for this tutorial, its been a great help. How did you make that rectangular box reveal the colors your hexagons were covering in :013? I really want to replicate that as well.
The image in the rectangle is the Gradient composition, the outline of the rectangle is a mask. How to do it: When you are done as the tutorial, you place a Gradient composition on top and then create a rectangular mask over the gradient, for the mask to move, you will have the results you want.
VERY NICE
Thanks
OH MY GOD THANK U
🥰
Can we make a new solid after we have completed this effect and adding a CC Sphere to that layer I think it will be converted to an energy field
The same technique, but with each person's creativity, we will have different results. Try it and show me the results 🤗
thanks :)
🥰
Hi @Octopus effect, this is great! though its giving me a wrong spacing for each shape, like there's so much space each shape. Can you help me with this.. Thanks!
Adjust the space between shapes at 6:52
I was having this same problem and it took me a while to solve. The problem is the sourceRectAtTime function looks at the size of the hexagon if scaled to 100.
In order to adjust the size of the hexagons go to shape layer -> contents -> Polystar 1 -> Outer Radius . If you set your scale to 100 and then change the outer radius to the desired size then the expression code should work.
Hi, Would you be able to give provide me with a expression for when I'm duplicating the shape as squires instead of hexagons please.
Thank you
no need to change the expression, go to your shape layer
Contens - polystar Path 1- change points to 4 - change rotation to 45 then duplicating will arange properly.
Also , instead of linking the Scale property to the Null object's slider control, you can link the Outter Radius of the polystar path 1 and change the size of your polygon from there and the expression would work for resizing as well. cheers
Thank you but im not that good I may need a tutorial 🤭
nice
Thank you
@@OctopusEffects No, man. Thank YOU!
What about blender? Go more : )
@@liteleak4049 It will be available next Saturday