Create Automatic Split Screens with this Adobe After Effects Expression
In today’s blog, we’re going over a free expression in Adobe After Effects that will allow you to create fast and easy split screens. What’s exciting about this expression is that it automatically creates split screens for you by just plugging the expression into the position and scale of your composition. This gridmaker expression was created by Jamie Dickenson, a great editor and colorist. You can find some additional free expressions as well as color trainings on his website.
Starting with a 1920x1080 landscape composition, you would drag your first video into the timeline.
Next, with video 1 selected, Press “P” to bring up the position controls. Hold the ALT key or the Option Key if you are on a mac and click on the stopwatch next to Position. This will activate expression. Next, copy the Position expression and paste it in the designated field.
Here is the position expression:
NumberAcross = Math.ceil(Math.sqrt(thisComp.numLayers)); W = thisComp.width/NumberAcross; H = thisComp.height/NumberAcross; gridPos = index ; col = gridPos % (NumberAcross+0.0001) ; row = Math.ceil(1/(NumberAcross/gridPos)); xPos = (thisComp.width/NumberAcross)*(col-1); yPos = (thisComp.height/NumberAcross)*(row-1); [(xPos+W/2) ,(yPos+H/2)]
And now do the same for the scale by pressing S to bring up the scale. Complete the same actions as you did with the expression in position but this time paste the scale expression in the designated field.
Here is the scale expression:
NumberAcross = Math.ceil(Math.sqrt(thisComp.numLayers)); xSize = (thisComp.width/width)*100/NumberAcross; ySize = (thisComp.height/height)*100/NumberAcross; [xSize,ySize]
For here, you can duplicate the layer, by pressing cmd+D on a mac or Ctrl+D on a PC. And you can continue to duplicate and it will automatically resize your videos.
The next step is replacing the video. Select the video layer you want to replace from the comp, then go to the project panel and select the video you want to replace it with. hold the ALT key or the option key and drag it into the comp and it will replace the video. You can repeat this process many times as you like until your split screen is complete and the audio will carry over with the video clip.
For the full tutorial and to find out how this cool Expression applies to square or vertical compositions, check out Premiere Gal’s tutorial on YouTube.
Until next time, stay safe & stay creative.