ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Position Expression from Multiple 3D Layers

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tav Flett
Position Expression from Multiple 3D Layers
on Dec 15, 2016 at 11:41:38 am

Hi there,

Is there anyway to add a layer slider or layer control to be able to keyframe and select a 3D layers position based on another 3D layer or multiple 3D layers?

I'm needing to create some lightning within AE and am using a 2D lightning effect with the start and end positions linked to several 3D Nulls giving the effect the lightning is bouncing around my 3D scene.

Ideally I would like to create multiple 3D nulls for the start and end positions and have the lightning plugin able to cycle through these, perhaps controlled by a wiggle expression.

So far I've come as far as linking the lightnings "core start" and "core end" properties to two 3D control nulls I've created via

thisComp.layer("coreStartNull").toComp([0,0,0]);
thisComp.layer("coreEndNull").toComp([0,0,0]);

I was then thinking of adding an expression "slider control" or perhaps a "layer control" to access and control a number of 3D nulls in the scene I'd like to link to the lightning. This is where my knowledge begins to fall down.

Any help greatly appreciated

Cheers,
Tav


Return to posts index

Dan Ebberts
Re: Position Expression from Multiple 3D Layers
on Dec 15, 2016 at 6:19:04 pm

I'd create another null named "controls" and add a Layer control and a Point control to it. The Point control would have an expression like this:


try{
L = effect("Layer Control")("Layer");
L.toComp([0,0,0]);
}catch(err){
value;
}


Then your lightning effect point would have an expression like this:

fromComp(thisComp.layer("controls").effect("Point Control")("Point"));

Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]