Skip to main content
Kevin J Moran
New Participant
August 15, 2023
Answered

Nulls to Points in 3D space

  • August 15, 2023
  • 2 replies
  • 1332 views

Hello. I am wanting to apply nulls to points in a shape in a 3D space. From script "Create Nulls From Paths" I select my path from a 3D shape layer and click "Nulls Follow Points" and it does create the nulls, but only in a projected view as 2D, ignoring any Z positioning. I have tried separating the postions and seeing if I can force the Z positioning out in the expression with no luck. 

 

My goal is to use the shape to control the null positions which I can attach images/comps to. 

Correct answer Dan Ebberts

The resulting expression for a null to follow a particular point in 3D would look something like this:

pointToFollow = 0; 

L = thisComp.layer("Shape Layer 1");
path = L.content("Shape 1").content("Path 1").path;
p = path.points();
L.toWorld(p[pointToFollow])

 

2 replies

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
August 15, 2023

The resulting expression for a null to follow a particular point in 3D would look something like this:

pointToFollow = 0; 

L = thisComp.layer("Shape Layer 1");
path = L.content("Shape 1").content("Path 1").path;
p = path.points();
L.toWorld(p[pointToFollow])

 

Kevin J Moran
New Participant
August 15, 2023

Mylenium, I don't want to take away from your help, but Dan here has my answer.

Dan, this did EXACTLY what I needed it to! Thank you!

Mylenium
Legend
August 15, 2023

Long and short: No. There's no accommodation for this with the built-in functions and technically it doesn't really make sense. One could of course create a convoluted formula with multiple nested to World() layer space conversions and assuming certain things in a custom expression, but at the end of the day it's not really exact and quite clunky. It would probably make a lot more sense to either reverse the workflow and make a 2D path follow 3D nulls or buy a plug-in like Plexus that has all this stuff built-in.

 

Mylenium

Kevin J Moran
New Participant
August 15, 2023

Thank you, Mylenium. I was afraid of the answer. I have a couple of thoughts to make my vision work, but this one seemed the easiest. It just seems odd that one can't access the coordinates INCLUDING the Z axis at anytime and apply to a null or another layer. C'est la vie.