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

Fake parallax effect with 2D layers and a null?

Explorer ,
Oct 04, 2025 Oct 04, 2025

Hi. I want to create a more handmade style of parallax for a short 2D animated film - so in this case I feel 3D layers would feel too "accurate" and mechanical to work as I want it to.

However would it be possible to link 2D-layers to a null but add an offset for each layer in % of the nulls motion? Maybe a script will be able to do this?  (I'm not even beginner level when it comes to scripting though)

Let's say front layer follow the null with no offset but the layer behind has an offset of xx% of the nulls values, and so on. Would this be at all possible to do? Would it be too advanced to even bother? I guess this would be used to control x/y position and scale.

The prospect of keeping track of these offsets manually is a bit daunting, thats why I'm looking for alternative workflows. Also I feel some sort of automation would save alot of time.

 

Let me know if you have some easy ideas or examples I can try out.

Thank you.

/Marten

 

TOPICS
Expressions , How to , Scripting
150
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 3 Correct answers

Community Expert , Oct 05, 2025 Oct 05, 2025

I recorded this tutorial in my character animation tutorial series showing how to create such a 2D parallax background in After Effects with my (paid) extension iExpressions:

 


To create a paralax effect,  the key is that the layers don't just have a fixed offset: The more far away the objects are, the less they need to move.

Translate
Community Expert , Oct 05, 2025 Oct 05, 2025

Here's a simple example to give you an idea of how you could do it with expressions. Add a null to your comp (called "Null 1" in this example) which will act as the motion leader for the other layers, but don't parent your 2D layers to it. To each of the 2D layers, add a Slider Control named "Parallax" and set its value to what percent (0 - 100) of the null's motion you want the layer to receive. Then add this position expression to each 2D layer:

center = [thisComp.width,thisComp.height]/2;
lea
...
Translate
Explorer , Oct 08, 2025 Oct 08, 2025

I also found Duik Angela has a 2D camera tool that might work as well....

Translate
Community Expert ,
Oct 05, 2025 Oct 05, 2025

I recorded this tutorial in my character animation tutorial series showing how to create such a 2D parallax background in After Effects with my (paid) extension iExpressions:

 


To create a paralax effect,  the key is that the layers don't just have a fixed offset: The more far away the objects are, the less they need to move.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
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
Explorer ,
Oct 05, 2025 Oct 05, 2025

Thank you. I will check these out.

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
Community Expert ,
Oct 05, 2025 Oct 05, 2025

Here's a simple example to give you an idea of how you could do it with expressions. Add a null to your comp (called "Null 1" in this example) which will act as the motion leader for the other layers, but don't parent your 2D layers to it. To each of the 2D layers, add a Slider Control named "Parallax" and set its value to what percent (0 - 100) of the null's motion you want the layer to receive. Then add this position expression to each 2D layer:

center = [thisComp.width,thisComp.height]/2;
leader = thisComp.layer("Null 1");
offset = leader.position - center;
parallax = effect("Parallax")("Slider");
value + offset*parallax/100

Each 2D layer will receive the appropriate percentage of the null's movement away from the center of the comp (the null is assumed to begin at the center of the comp). There are lots of ways to modify/enhance this, but it might be a good place to start.

 

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
Explorer ,
Oct 05, 2025 Oct 05, 2025

Thank you. I will try this out and see if I can get it to work.

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
Explorer ,
Oct 08, 2025 Oct 08, 2025

Hi again. It works gloriously, thank you. How would I adjust the script to work for scale value? If I could just add a slider for % of scale (or use same slider) as well I'm good to go 😄

 

Did some experiments on my own but I couldn't get it to scale with the null, only to scale when null changed position (-_-*)

 

/M

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
Community Expert ,
Oct 08, 2025 Oct 08, 2025
LATEST

Not sure what you're after exactly, but try this scale expression (which uses the same slider as the position expression):

leader = thisComp.layer("Null 1");
parallax = effect("Parallax")("Slider");
value - ([100,100] - leader.scale)*parallax/100
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
Explorer ,
Oct 08, 2025 Oct 08, 2025

I also found Duik Angela has a 2D camera tool that might work as well....

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