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.
  • Навчання та стиль

КОМЕНТАРІ • 58

  • @OctopusEffects
    @OctopusEffects  4 роки тому +28

    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]

    • @HowToAnimateTutorial
      @HowToAnimateTutorial 4 роки тому

      I don't understand about this code. HIHI. But the hexagon looping is so beuatiful. Thank so much

    • @voovisualsyoutube
      @voovisualsyoutube 3 роки тому

      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?

    • @29031998100
      @29031998100 Рік тому +2

      I have a problem
      when I duplicated hexagon. They are duplicate at a greater distance
      Can you help me to solve this problem?

    • @mikaelgonzalez2739
      @mikaelgonzalez2739 11 місяців тому

      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

    • @hosnat5278
      @hosnat5278 6 місяців тому +1

      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?

  • @OctopusEffects
    @OctopusEffects  4 роки тому +28

    thisComp.layer("Gradient").sampleImage(transform.position, [.5,.5]/2, true, time)

  • @leftclot
    @leftclot 2 роки тому +3

    Its amazing how you are giving these expressions for free! Thank you so much, this blew my mind!

  • @DeputyBean
    @DeputyBean 7 місяців тому

    Great video! Thanks for helping me learn!

  • @passion_proh-jects
    @passion_proh-jects 9 місяців тому

    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...

  • @draftstation8963
    @draftstation8963 3 роки тому

    Thank you so much, ur script made things so easy!!

  • @ondrejstindl7123
    @ondrejstindl7123 2 роки тому +1

    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.. :)

  • @gaston.
    @gaston. 2 роки тому

    excellent tutorial.. thanks for sharing!

  • @aim__freakz8499
    @aim__freakz8499 4 роки тому

    This is amazing! Thank you

  • @petercarley9260
    @petercarley9260 3 роки тому +1

    wow, impressive, thank you!

  • @BladeSlayerr
    @BladeSlayerr 3 роки тому

    thanks for the awesome tutorial and the music :)

  • @andresroldan6194
    @andresroldan6194 Рік тому

    BEAST! Thank you 😀

  • @lucascz5523
    @lucascz5523 2 місяці тому

    Genial, gracias!

  • @jaimeechristensen1503
    @jaimeechristensen1503 3 роки тому +2

    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.

  • @K3Dvrk
    @K3Dvrk Рік тому

    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

  • @Sonic7979
    @Sonic7979 9 місяців тому

    Hello cool. How to make shapes increase and decrease when an object moves under them?

  • @ok-yz6wx
    @ok-yz6wx 3 роки тому

    THANK YOU SO MUCH

  • @sviktoriia
    @sviktoriia Рік тому

    Thank you!

  • @fellipequadros
    @fellipequadros 4 місяці тому

    Coool! What's the music ?

  • @prxno112
    @prxno112 3 роки тому +1

    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.

    • @OctopusEffects
      @OctopusEffects  3 роки тому

      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.

  • @mr.nikolson
    @mr.nikolson 4 роки тому

    VERY NICE

  • @daeizd
    @daeizd 3 роки тому

    OH MY GOD THANK U

  • @manas_verma3101
    @manas_verma3101 3 роки тому

    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

    • @OctopusEffects
      @OctopusEffects  3 роки тому +1

      The same technique, but with each person's creativity, we will have different results. Try it and show me the results 🤗

  • @chantebrand1581
    @chantebrand1581 3 роки тому

    thanks :)

  • @patrickarenas2951
    @patrickarenas2951 Рік тому

    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!

    • @OctopusEffects
      @OctopusEffects  Рік тому

      Adjust the space between shapes at 6:52

    • @petersherfey3852
      @petersherfey3852 Рік тому

      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.

  • @wintertondesign7603
    @wintertondesign7603 10 місяців тому

    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

    • @SimonLab
      @SimonLab 10 місяців тому

      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

    • @wintertondesign7603
      @wintertondesign7603 10 місяців тому

      Thank you but im not that good I may need a tutorial 🤭

  • @liteleak4049
    @liteleak4049 4 роки тому

    nice

    • @OctopusEffects
      @OctopusEffects  4 роки тому +1

      Thank you

    • @liteleak4049
      @liteleak4049 4 роки тому

      @@OctopusEffects No, man. Thank YOU!
      What about blender? Go more : )

    • @OctopusEffects
      @OctopusEffects  4 роки тому +1

      @@liteleak4049 It will be available next Saturday