<p>I am dabbling in After Effects and I thought I'd create a sequence that mimicks how an old camera focused. This means I need to do the following:</p>
<ul>
<li>Offset some layers in one direction, others in other directions</li>
<li>Apply blur effects to layers</li>
</ul>
<p>All this has to be animated.</p>
<p>Now, since I'm a complete beginner, and I just found out about the NULL object, I did the following:</p>
<ol>
<li>Added a NULL object to my composition</li>
<li>Linked the x-position of one of my layers to the x-position of the NULL object, and then adjusted the expression so that it moves in the direction</li>
<li>I then linked the blur amount to the same x-position of the NULL object</li>
</ol>
<p>Now, I have made all the layers, they move and blur exactly like I want. Additionally, I can animate this single x-position of the NULL object to get all the other layers to animate like I want.</p>
<p>However, I now want to adjust the blur strength. If I want to keep the blur amounts linked to the x-position, is there a way for me to add a new custom property somewhere, like a number, and then incorporate this property into the expressions?</p>
<p>This is what the expression looks like now:</p>
<pre><code>Math.abs(thisComp.layer(&quot;TRANSFORM&quot;).transform.xPosition)*10
</code></pre>
<p>rather than just adjusting the 10 there, in all those expressions, I would like to have a property somewhere so that I could do:</p>
<pre><code>Math.abs(thisComp.layer(&quot;TRANSFORM&quot;).transform.xPosition)*thisComp.layer(&quot;TRANSFORM&quot;).Factor
</code></pre>
<p>Like, naively what I looked for:</p>
<ul>
<li>Right-click the NULL object, &quot;Add custom property&quot;, name it Factor, then go back to all those expressions and add support for this property?</li>
</ul>
<p>Or do I just need to (ab)use one of the other properties of the NULL object as my scaling factor in this case? I could of course just link the blur amount to the y-position, but I'd rather have to animate just one and have them all linked.</p>
<p>Is there such support? If so, where? Or am I perhaps not making any sense whatsoever?</p>
<p>Or, if what I want to accomplish is in fact easier or rather &quot;more appropriately&quot; done in a completely different manner, feel free to school me in the comments, as long as you guide me in the right direction :)</p>

CC BY-SA 4.0
2022-09-16T17:29:28.663Z
Apoligies if this is obvious, but couldn't you use a slider as the controller for all of these things, then connect the slider to your position and blur controls with the appropriate mathematical factors on the position and blur expressions?
tomh
CC BY-SA 4.0
2022-10-06T07:44:33.650Z
I didn't know about the slider and sibling controls. I do now, if you want to leave it as an answer I would be happy to accept it.
Lasse V. Karlsen
<after-effects>
Create custom properties in After Effects?
Lasse V. Karlsen
# Create custom properties in After Effects?

(Asked by: username_0 on 2022-09-16)

I am dabbling in After Effects and I thought I'd create a sequence that mimicks how an old camera focused. This means I need to do the following:

Offset some layers in one direction, others in other directions
Apply blur effects to layers

All this has to be animated.
Now, since I'm a complete beginner, and I just found out about the NULL object, I did the following:

Added a NULL object to my composition
Linked the x-position of one of my layers to the x-position of the NULL object, and then adjusted the expression so that it moves in the direction
I then linked the blur amount to the same x-position of the NULL object

Now, I have made all the layers, they move and blur exactly like I want. Additionally, I can animate this single x-position of the NULL object to get all the other layers to animate like I want.
However, I now want to adjust the blur strength. If I want to keep the blur amounts linked to the x-position, is there a way for me to add a new custom property somewhere, like a number, and then incorporate this property into the expressions?
This is what the expression looks like now:
Math.abs(thisComp.layer("TRANSFORM").transform.xPosition)*10

rather than just adjusting the 10 there, in all those expressions, I would like to have a property somewhere so that I could do:
Math.abs(thisComp.layer("TRANSFORM").transform.xPosition)*thisComp.layer("TRANSFORM").Factor

Like, naively what I looked for:

Right-click the NULL object, "Add custom property", name it Factor, then go back to all those expressions and add support for this property?

Or do I just need to (ab)use one of the other properties of the NULL object as my scaling factor in this case? I could of course just link the blur amount to the y-position, but I'd rather have to animate just one and have them all linked.
Is there such support? If so, where? Or am I perhaps not making any sense whatsoever?
Or, if what I want to accomplish is in fact easier or rather "more appropriately" done in a completely different manner, feel free to school me in the comments, as long as you guide me in the right direction :)

**Tags:** after-effects

> **Comments:**
> **username_1**: Apoligies if this is obvious, but couldn't you use a slider as the controller for all of these things, then connect the slider to your position and blur controls with the appropriate mathematical factors on the position and blur expressions?  
> **username_0**: I didn't know about the slider and sibling controls. I do now, if you want to leave it as an answer I would be happy to accept it.  

---

## 0 answers

