Help with 3D Layer Position Expression


hi all,

 

i hope 1 can me – have been looking , trying solve expression problem have run in - have limited expression knowledge.

 

i need move layer in 3d space, z axis: lets -50 0 (based on start of layer) , stop , move 0 50 (again based on end of layer)

 

i have multiple layers of different lengths want add to…then adjust layer time displayed on screen.

 

i have used code harry frank, auto fade code (which god sent) , have tried make above movement possible, sections of code, close no cigar – code:

 

//auto move z

x = 0;

y = 0;

z = 50;

transition = 20;       // transition time in frames

if (marker.numkeys<2){

tsecs = transition / ( 1 / thiscomp.frameduration); // convert seconds

linear(time, inpoint, inpoint + tsecs, thislayer.position + [x,y,z],0) - linear(time, outpoint - tsecs, outpoint, thislayer.position +  [x,y,z],0)

}else{

linear(time, inpoint, marker.key(1).time, thislayer.position + [x,y,z],0) - linear(time, marker.key(2).time, thislayer.position + [x,y,z],0)

}

 

it moving it’s moving on axis , out moving backwards instead forwards. plus has moved centre position.

 

any appreciated, thank in advance help!

 

cheers breon

 

message edited by: breonsnow - spelling

i think you're asking for:

 

z = 50;

tf = 20;

 

tsec = framestotime(tf);

if (time < (inpoint + outpoint)/2)

  linear(time,inpoint,inpoint+tsec,value-[0,0,z],value)

else

  linear(time,outpoint-tsec,outpoint+tsec,value,value+[0,0,z])

 

 

dan



More discussions in After Effects Expressions


adobe

Comments