make camera follow and animated ligth

Compositing and Motion Graphics

make camera follow and animated ligth

Postby 62935 on 08/17/2015, 11:45 am

How can I make camera follow an animated ligth? I'm trying with Sure Target 2 (of VideoCopilot) but doesn't work, neither with a null attached to camera, perhaps because of the ligth animated:
It is a ligth going ahead, to the infinite, and with curves movement sometimes... I'm trying to make the sensation that the camera (which is behind the ligth), is following the ligth (like the camera pursue the ligth) How can it be done?

the ligth is linked to a null, the blue path: (this is the rigth view:
Image


Thanks
62935
 
Posts: 108
Joined: 05/16/2015, 10:42 am
System Specs: Windows 8
Element 3D v.2, Trapcode v.2

Re: make camera follow and animated ligth

Postby Michael_Szalapski on 08/17/2015, 2:41 pm

Use an expression.
You could pick whip the position of the light into the position of the camera with +value.
That way, you can use the position of the camera to offset the camera from the light.
You might also consider adding a wiggle value somewhere in there as well to keep it from following exactly.

Alternatively,
Create a null. Parent the camera to the null. Parent the null to the light. Add a bit of wiggle to the null's position and maybe a tiny bit to its rotation.
______________
Michael Szalapski
Fast. Cheap. Good.
Pick two.
Michael_Szalapski
 
Posts: 8296
Joined: 02/2/2010, 1:06 pm
Location: Nashville, TN, USA
Twitter: thegreatszalam

Re: make camera follow and animated ligth

Postby 62935 on 08/18/2015, 2:20 am

I want to this, that you said, but I don't know why, can you tell me please more especific how to:

"Use an expression.
You could pick whip the position of the light into the position of the camera with +value. "

Please, please it is very important to me,¿first parent the position and then how to add +value?
62935
 
Posts: 108
Joined: 05/16/2015, 10:42 am
System Specs: Windows 8
Element 3D v.2, Trapcode v.2

Re: make camera follow and animated ligth

Postby hans123 on 08/18/2015, 2:41 am

Hello,

what Michael mean:

pick whip the Position (Light) to the Position of the Camera, "Value" is one way for the Offset
between Camera and Light Position. Or you can use this:

...transform.position + [x,y,z]

x, y, z are the Offset values, if you only want a x Offset: ...transform.position + [10,0,0]

See here:
https://forums.creativecow.net/readpost/227/10497

If you want learn more about expressions, see here:

https://helpx.adobe.com/after-effects/u ... asics.html

http://motionscript.com/


Hans
hans123
 
Posts: 1125
Joined: 12/28/2012, 1:37 am
Location: Paris / France

Re: make camera follow and animated ligth

Postby 62935 on 08/18/2015, 3:35 am

Hans you saved me! Only a question about it, can I "keyframe" o tell with some expression, that sometimes change the value offset? for example be: .transform.position + [10,0,0] and from frame 0:00:03:24 to 0:00:06:24 be .transform.position + [10,40,30]

There exist a way to "keyframe" the offset? because here don't tell how to keyframed it
https://forums.creativecow.net/readpost/227/10497
Thansk Hans
62935
 
Posts: 108
Joined: 05/16/2015, 10:42 am
System Specs: Windows 8
Element 3D v.2, Trapcode v.2

Re: make camera follow and animated ligth

Postby 62935 on 08/18/2015, 3:44 am

For/to keyframe the X and Y values I try this method and woks,but does not work for Z value.
https://www.youtube.com/watch?v=M1dww-vp7To

How to keyframe the Z value of an expression?

How can I, in some frames, stop the expression and animate the position of the Null without be it parent to the camera?
62935
 
Posts: 108
Joined: 05/16/2015, 10:42 am
System Specs: Windows 8
Element 3D v.2, Trapcode v.2

Re: make camera follow and animated ligth

Postby hans123 on 08/18/2015, 5:23 am

Hello,

- create sliders for the x, y and z values, set Start- and Endvalues to a usefull range.
- go to your Expression, select x (at the end into the brakets), so it's blue now
- pick whip now to the Slider control x
- do the same for the other values, y and z

Hans
hans123
 
Posts: 1125
Joined: 12/28/2012, 1:37 am
Location: Paris / France

Re: make camera follow and animated ligth

Postby 62935 on 08/18/2015, 5:31 am

Yes, I have created 3 slider: one for x, one for y and one for z.

It works with x and y, but Whe I parent the Z to the slider, appears an error:
Image


does not work the slider control for Z (And the object null where I put the expression has the 3D activate:
62935
 
Posts: 108
Joined: 05/16/2015, 10:42 am
System Specs: Windows 8
Element 3D v.2, Trapcode v.2

Re: make camera follow and animated ligth

Postby 62935 on 08/18/2015, 5:37 am

Please, help...How to keyframe the Z value of an expression? with the slider does not works the Z (and I don't wwant to be in 830 Z offset all the time)

How can I, in some frames, stop the expression and animate the position of the Null independently of the camera? can i stop the expression for some frames and the return to it?
62935
 
Posts: 108
Joined: 05/16/2015, 10:42 am
System Specs: Windows 8
Element 3D v.2, Trapcode v.2

Re: make camera follow and animated ligth

Postby hans123 on 08/18/2015, 10:18 am

Hello,

you have (normally) pick whip the Position of the Camera to the Light and at the end
of the Expression (Position Camera) >>...transform.position+[x,y,z], you select now
x or y or z and pick whip (expression position camera) to the slider control for x or y or z.
Maybe you have select more then only z ?
I don't know what is wrong, but if there is something wrong with the expression a window
pops up and show you a message.

In your picture, what is Position under Slider Control 3 ?

Please, if you want work with expressions learn the basics before:

https://helpx.adobe.com/after-effects/u ... asics.html

and see Dan Ebberts Site:

http://motionscript.com/

there you will find many helpfull things.


Hans
hans123
 
Posts: 1125
Joined: 12/28/2012, 1:37 am
Location: Paris / France

Re: make camera follow and animated ligth

Postby 62935 on 08/18/2015, 10:31 am

Now, it works, Thanks you a lot Hans, you've saved my life!
62935
 
Posts: 108
Joined: 05/16/2015, 10:42 am
System Specs: Windows 8
Element 3D v.2, Trapcode v.2

Re: make camera follow and animated ligth

Postby 62935 on 08/18/2015, 10:32 am

Also thanks for the links!
62935
 
Posts: 108
Joined: 05/16/2015, 10:42 am
System Specs: Windows 8
Element 3D v.2, Trapcode v.2

Re: make camera follow and animated ligth

Postby 62935 on 08/18/2015, 11:36 am

I also linked the rotation of the null (that is linked to the ligth) to the rotation of the camera (to feels the camera pursued the null (the ligth), but how to offset the rotation of the null (the ligth)?, how to make the sensation that the null (the ligth) rotated first and then the camera rotates second/following it? (and not rotate both at the same time)?

I try this, but both rotate in the same instant:
thisComp.layer("Cam Control").transform.zRotation + 40

perhaps instead of rotation offset, ¿how can I offset the time-speed?? can it be done...?

Thank you very appreciated to you!
62935
 
Posts: 108
Joined: 05/16/2015, 10:42 am
System Specs: Windows 8
Element 3D v.2, Trapcode v.2

Re: make camera follow and animated ligth

Postby hans123 on 08/18/2015, 1:14 pm

Hello,

for the time delay between light and camera, see here:

http://help.adobe.com/en_US/AfterEffect ... 7a15a.html

Your question Start Stop Expression and use other values:

See my Picture. The Light follows the Camera. Create a Null Layer and use the Checkbox Control Expression.

Use this Expression for the Light Position:

control = thisComp.layer("Null 1").effect("Checkbox Control")("Checkbox") ;

if (control == 1){
thisComp.layer("Camera 1").transform.position;
}else{
[640,360,0];
}


If the Checkbox is ON, the Light follows the Camera, ist the Checkbox is OFF the Values 640,360,0 are in use.
You can modify these values or Pick Whip them to sliders.

You can also try out iExpressions from Mamoworld >>Expression without writing code:

http://mamoworld.com/tools/iexpressions


Hans
Attachments
on off.jpg
hans123
 
Posts: 1125
Joined: 12/28/2012, 1:37 am
Location: Paris / France

Re: make camera follow and animated ligth

Postby 62935 on 08/18/2015, 1:34 pm

ir order to do it weel, first i tell you that I have:

The camera linked to a null (the null moves the camera) null is called "Cam control"

The ligth libnked to a null, the null is called "Nulo-deLigth"

The null of the ligth linked to the null of the camera with the expression + values (linked to sliders).

Then I have this:
Image

http://i.imgur.com/DfoveM8.jpg
____________________
Now my question is, ¿I must add this expression into the Null Position (I mean, into the Null which is linked to the Ligth), or into the Ligth?

control = thisComp.layer("Null 1").effect("Checkbox Control")("Checkbox") ;

if (control == 1){
thisComp.layer("Camera 1").transform.position;
}else{
[640,360,0];
}


_______________________________

To add my expression into yours, this is well?

MY TRY 1)

control = thisComp.layer("Null 1").effect("Checkbox Control")("Checkbox") ;

if (control == 1){
thisComp.layer("Cam Control").transform.position;
}+ [effect("Slider Control")("Slider"),effect("Slider Control 2")("Slider"),effect("Slider Control 3")("Slider")]{
[640,360,0];
}


MY TRY 2) above conserve the other expression that is linked to the sliders of offset

thisComp.layer("Cam Control").transform.position + [effect("Slider Control")("Slider"),effect("Slider Control 2")("Slider"),effect("Slider Control 3")("Slider")]

control = thisComp.layer("Null 1").effect("Checkbox Control")("Checkbox") ;

if (control == 1){
thisComp.layer("Camera 1").transform.position;
}+ [effect("Slider Control")("Slider"),effect("Slider Control 2")("Slider"),effect("Slider Control 3")("Slider")}
62935
 
Posts: 108
Joined: 05/16/2015, 10:42 am
System Specs: Windows 8
Element 3D v.2, Trapcode v.2

Re: make camera follow and animated ligth

Postby hans123 on 08/18/2015, 1:49 pm

Hello,

use the Expression for that Layer Position, that should be delayed.

Hans
hans123
 
Posts: 1125
Joined: 12/28/2012, 1:37 am
Location: Paris / France

Re: make camera follow and animated ligth

Postby hans123 on 08/18/2015, 1:58 pm

Hello again,

sorry, my mistake:

put the Expressions in that Layer Position, that you want link/unlink from the other moving object via the Checkbox.

Hans
hans123
 
Posts: 1125
Joined: 12/28/2012, 1:37 am
Location: Paris / France

Re: make camera follow and animated ligth

Postby 62935 on 08/18/2015, 2:06 pm

I am very sorry about this question, and I am very grateful to your help, but... I don't know really how to replace that:

control = thisComp.layer("Null 1").effect("Checkbox Control")("Checkbox") ;

if (control == 1){
thisComp.layer("Camera 1").transform.position;
}else{
[640,360,0];
}



where to add my expression, there, where says "else? or there, between brackets?

the expression that I have on the layer that want link/unlink from the other moving object, is this:
thisComp.layer("Cam Control").transform.position + [effect("Slider Control")("Slider"),effect("Slider Control 2")("Slider"),effect("Slider Control 3")("Slider")]

how add there, your expression of chechbox?
62935
 
Posts: 108
Joined: 05/16/2015, 10:42 am
System Specs: Windows 8
Element 3D v.2, Trapcode v.2

Re: make camera follow and animated ligth

Postby hans123 on 08/18/2015, 3:05 pm

Hello,

this was my example:

control = thisComp.layer("Null 1").effect("Checkbox Control")("Checkbox") ;

if (control == 1){
thisComp.layer("Camera 1").transform.position;
}else{
[640,360,0];
}


replace thisComp.layer("Camera 1").transform.position with your Expression:

thisComp.layer("Cam Control").transform.position + [effect("Slider Control")("Slider"),effect("Slider Control 2")("Slider"),effect("Slider Control 3")("Slider")]

Hans
hans123
 
Posts: 1125
Joined: 12/28/2012, 1:37 am
Location: Paris / France

Re: make camera follow and animated ligth

Postby 62935 on 08/19/2015, 3:38 am

WOW! A lot of thanks Hans!! you're a genius!!

it is obligatory to write a second expression about telling what I want to do when the Chechbox Control is OFF? I mean, when it is OFF I want to move the ligth manually, with direct keyframes into position, rotation etc
62935
 
Posts: 108
Joined: 05/16/2015, 10:42 am
System Specs: Windows 8
Element 3D v.2, Trapcode v.2

Re: make camera follow and animated ligth

Postby hans123 on 08/19/2015, 8:56 am

Hello,

the first line is for the checkbox control:

control = thisComp.layer("Null 1").effect("Checkbox Control")("Checkbox") ;

if the checkbox is ON then:

thisComp.layer("Camera 1").transform.position;

this linked the Camera Position to the Light

If the Checkbox is OFF, then (else):

[640,360,0];

for the Camera are fixed Values for x,y and z in use ( x=640, y=360 and z=0 )

If you want animate the Position of the Camera manually, select and pick whip 640, 360 and 0 to sliders, like this:

[effect("Slider Control 4")("Slider"),effect("Slider Control 5")("Slider"),effect("Slider Control 6")("Slider")]

where Slider 4, 5 and 6 (in this example) are newly created Sliders.

Hans
hans123
 
Posts: 1125
Joined: 12/28/2012, 1:37 am
Location: Paris / France

Re: make camera follow and animated ligth

Postby 62935 on 08/20/2015, 7:37 am

Thanks you hans, you are brilliant
62935
 
Posts: 108
Joined: 05/16/2015, 10:42 am
System Specs: Windows 8
Element 3D v.2, Trapcode v.2


Return to After Effects