Camera Velocity React From Audio

Compositing and Motion Graphics

Camera Velocity React From Audio

Postby VideoPilot on 01/11/2015, 5:54 pm

I am using CC Particle World for the stars, and I am using After Effects CS5.5 Here's what I want my audio spectrum to look like, I manually added the keyframes (it isn't controlled by the audio like I want it to be) I am using a camera layer, and I want the velocity of that camera to be determined by the audio (the velocity of the camera is within the keyframes), but I also want the velocity moving at a steady rate, just for the audio to increase the rate / speed according to the audio. So here's what I want it to look like, with the audio controlling velocity, except for this clip I manually added the keyframes: http://youtu.be/lHoeFOA-980
Basically, I need the camera velocity / speed to react to the audio, just as the audio spectrum does. Thanks
VideoPilot
 
Posts: 8
Joined: 01/11/2015, 5:35 pm

Re: Camera Velocity React From Audio

Postby VideoPilot on 01/11/2015, 9:44 pm

I can't figure out making the stars (which is CC Particle World) to have its velocity controlled by the audio
VideoPilot
 
Posts: 8
Joined: 01/11/2015, 5:35 pm

Re: Camera Velocity React From Audio

Postby Timber_Wolf_2 on 01/12/2015, 7:40 am

interesting effect. I like it! I'd say, since music is generally bound to rhythm, timing is very predictable, once you know the rhythm. So my suggestion is to manually keyframe like in your example video.

First, determine how long between the start of the beat and the end (the camera movement). then find out how long from the end of the beat to the beginning of the next (still camera). Using these numbers (which should repeat fairly regularly throughout the music, with occasional exceptions if the composer is good), you should be able to advance a pre-determined number of frames and add keyframes quite easily.

to speed this up, twirl down the options on your audio track and reveal the waveform. you should be able to get a good visual cue for your keyframes from this.
--
Timber_Wolf_2

Carpe diem pro nomine Christi
Timber_Wolf_2
 
Posts: 925
Joined: 10/11/2011, 11:23 am
Location: Pensacola, FL

Re: Camera Velocity React From Audio

Postby Timber_Wolf_2 on 01/12/2015, 7:42 am

As for your original question, you seemed to want to find a way to automate this. I don't think that there's any way to automate it. "Convert audio to keyframes" wont give you the constant speed you want when the camera is moving. Far better to manually keyframe.
--
Timber_Wolf_2

Carpe diem pro nomine Christi
Timber_Wolf_2
 
Posts: 925
Joined: 10/11/2011, 11:23 am
Location: Pensacola, FL

Re: Camera Velocity React From Audio

Postby Farmfield on 01/12/2015, 8:49 am

My pal Peder has solved this for you. :D

www.redgiant.com/sound-keys/

*** Demos, RnD & tests: www.vimeo.com/farmfield ***
Farmfield
 
Posts: 2285
Joined: 06/8/2014, 1:44 pm
Location: Sweden

Re: Camera Velocity React From Audio

Postby VideoPilot on 01/12/2015, 8:50 am

Timber_Wolf_2 wrote:As for your original question, you seemed to want to find a way to automate this. I don't think that there's any way to automate it. "Convert audio to keyframes" wont give you the constant speed you want when the camera is moving. Far better to manually keyframe.

Manually key framing is not an option for me, because this is for my record label and we plan to have releases 3 times a week. I would be spending tens of hours manually keyframing.

I have an idea.. Have the stars moving at a constant velocity.. And add the Timestretch effect to.. My Camera or the Stars, which would I do? (EDIT: found out I can't add an effect to a Camera..) And then I could have the Timestretch controlled by the audio, as the audio spectrum is. I know it's possible to speed up star velocity based on audio, as I've seen it done in another template, which I can link to right now if you'd like to have a look at how they did it, even though I'm doing it differently: http://m.youtube.com/watch?v=JGVhHIxY4VQ

The stars in that template move faster as the audio spectrum bars go higher.
VideoPilot
 
Posts: 8
Joined: 01/11/2015, 5:35 pm

Re: Camera Velocity React From Audio

Postby Timber_Wolf_2 on 01/12/2015, 9:59 am

Time remapping would mean there would be motion blur when your camera is still.

Have you considered leaving the camera alone and applying the audio info to the particles instead?
--
Timber_Wolf_2

Carpe diem pro nomine Christi
Timber_Wolf_2
 
Posts: 925
Joined: 10/11/2011, 11:23 am
Location: Pensacola, FL

Re: Camera Velocity React From Audio

Postby graymachine on 01/12/2015, 10:04 am

I'd forget about the idea of changing the camera "velocity". Velocity is a result of the distance in time/space between two keyframes. So, changing the velocity is going to be a matter of dynamically changing the value of the camera position at that 2nd keyframe. It's a much more complicated way of going about this.

Really, what you need to be doing is changing the velocity of the particles. This would be pretty easy with Particular. As for Particle World, I would assume there is a comparable "particle velocity" parameter to link to either the "audio to keyframes" assistant, or via Sound Keys.
Harry Frank
Motion design tutorials, elements and more.
http://www.graymachine.com
graymachine
VC Moderator
VC Moderator
 
Posts: 981
Joined: 08/4/2008, 6:38 pm
Twitter: graymachine

Re: Camera Velocity React From Audio

Postby VideoPilot on 01/12/2015, 10:49 am

graymachine wrote:I'd forget about the idea of changing the camera "velocity". Velocity is a result of the distance in time/space between two keyframes. So, changing the velocity is going to be a matter of dynamically changing the value of the camera position at that 2nd keyframe. It's a much more complicated way of going about this.

Really, what you need to be doing is changing the velocity of the particles. This would be pretty easy with Particular. As for Particle World, I would assume there is a comparable "particle velocity" parameter to link to either the "audio to keyframes" assistant, or via Sound Keys.

Thank you, but I still can't figure it out :/ could I upload the AE CS5.5 project file and can you or someone else have a look at it and see what can be done about syncing the star velocity with the audio levels like the spectrum is doing? I'm lost :/
VideoPilot
 
Posts: 8
Joined: 01/11/2015, 5:35 pm

Re: Camera Velocity React From Audio

Postby Timber_Wolf_2 on 01/12/2015, 11:12 am

Hmm, maybe not the velocity of the particles, since the velocity at birth stays constant over the life of the particle (am i right?). Perhaps modifying the gravity of the particles instead? wouldn't that affect all particles equally at all times?
--
Timber_Wolf_2

Carpe diem pro nomine Christi
Timber_Wolf_2
 
Posts: 925
Joined: 10/11/2011, 11:23 am
Location: Pensacola, FL

Re: Camera Velocity React From Audio

Postby VideoPilot on 01/12/2015, 11:22 am

Timber_Wolf_2 wrote:Hmm, maybe not the velocity of the particles, since the velocity at birth stays constant over the life of the particle (am i right?). Perhaps modifying the gravity of the particles instead? wouldn't that affect all particles equally at all times?

I have the gravity set at 0, so that they fly towards the camera. If I change the gravity to a positive number, they fall downwards on the screen. Negative, they go upwards
VideoPilot
 
Posts: 8
Joined: 01/11/2015, 5:35 pm

Re: Camera Velocity React From Audio

Postby Timber_Wolf_2 on 01/12/2015, 11:43 am

I don't have particular, so I'm just throwing out ideas to help troubleshoot here...

but can you rotate the particle "world" so that the "floor" is actually sideways? or perhaps position the camera on the floor and point it upward?
--
Timber_Wolf_2

Carpe diem pro nomine Christi
Timber_Wolf_2
 
Posts: 925
Joined: 10/11/2011, 11:23 am
Location: Pensacola, FL

Re: Camera Velocity React From Audio

Postby VideoPilot on 01/12/2015, 4:28 pm

Timber_Wolf_2 wrote:I don't have particular, so I'm just throwing out ideas to help troubleshoot here...

but can you rotate the particle "world" so that the "floor" is actually sideways? or perhaps position the camera on the floor and point it upward?

I get what your saying, and I tried that, but that kinda made the stars weird.. Can I send you the project and maybe you can take a look? It uses all stock AE effects, so no 3rd party effect or plugin is needed (unless I swap out the stars with Particular, which I might do, but the stars and linked with the clouds and foggy effects, so that would kind of ruin lots of things).
VideoPilot
 
Posts: 8
Joined: 01/11/2015, 5:35 pm

Re: Camera Velocity React From Audio

Postby Timber_Wolf_2 on 01/13/2015, 7:02 am

If you are using CC2014, I can't open it. I have CC.

What do you mean it "makes the stars weird"? send a screen shot?
--
Timber_Wolf_2

Carpe diem pro nomine Christi
Timber_Wolf_2
 
Posts: 925
Joined: 10/11/2011, 11:23 am
Location: Pensacola, FL

Re: Camera Velocity React From Audio

Postby VideoPilot on 01/13/2015, 9:28 am

Timber_Wolf_2 wrote:If you are using CC2014, I can't open it. I have CC.

What do you mean it "makes the stars weird"? send a screen shot?

It's AE CS5.5, so you should be able to open it with CC. What happens when I do that is that I'd have to change the direction of my colored clouds, fog, etc., which would be a process, and what happens with the stars is that they spread out like sparks, like they go in different directions, even though they're falling downwards, the spread outward
VideoPilot
 
Posts: 8
Joined: 01/11/2015, 5:35 pm

Re: Camera Velocity React From Audio

Postby Timber_Wolf_2 on 01/13/2015, 10:29 am

OK. I think I have it. At least a good starting point for you to go from.

Star field CS6.aep
(106.2 KiB) Downloaded 218 times

Here is a CS6. sorry I can't do CS5.5, and VCP won't let me upload an XML file. Can anyone save this backwards as a CS5.5 file?
--
Timber_Wolf_2

Carpe diem pro nomine Christi
Timber_Wolf_2
 
Posts: 925
Joined: 10/11/2011, 11:23 am
Location: Pensacola, FL

Re: Camera Velocity React From Audio

Postby MotionGraphics ab on 01/13/2015, 2:16 pm

Timber_Wolf_2 wrote:Can anyone save this backwards as a CS5.5 file?

CS 5.5 Version:
Star field (CS5.5).aep
(107.3 KiB) Downloaded 225 times
MotionGraphics ab
 
Posts: 286
Joined: 08/13/2014, 11:47 pm
Location: Seated...in front of a screen
Twitter: https://twitter.com/mo_graph

Re: Camera Velocity React From Audio

Postby VideoPilot on 01/13/2015, 3:50 pm

Timber_Wolf_2 wrote:OK. I think I have it. At least a good starting point for you to go from.

Star field CS6.aep

Here is a CS6. sorry I can't do CS5.5, and VCP won't let me upload an XML file. Can anyone save this backwards as a CS5.5 file?

Thanks, and yes that is exactly what I have on my current project. I just can't figure out how to control that Position Z by the audio level. I know I have to convert the audio to keyframes, but then what? I don't know the expression I'd need to write to link the audio with position Z. I want the position to be moving at a constant rate, and only speed up depending on the audio, as I demonstrated in my manual method I did in the video
VideoPilot
 
Posts: 8
Joined: 01/11/2015, 5:35 pm

Re: Camera Velocity React From Audio

Postby jules on 01/16/2015, 9:31 am

Huh. It's possible, but it's pretty glitchy. You'll have to create lots of sliders and convert lots of expressions to keyframes, otherwise you'll get erroneous output. At least, I did. I'll assume you have some basic knowledge of expressions, so some of the stuff below will be simplified.

You'll need the audio amplitude, pick the parts you need of it and then you best normalize it. That would be your first slider, with something like
Code: Select all
linear(audioAmplitude, ampMin, ampMax, 0, 1);

Create another slider for time (even that proved to give me the jitters at some point), give it a simple
Code: Select all
time;

This will be your base animation, you can multiply it to get to the desired base velocity of the camera.

Next, read this:
MotionScript.com: Speed Control
It deals with this exact sort of thing. :-)

Create an AnimAdd slider, apply the expression from MotionScript:
Code: Select all
spd = thisComp.layer("Amplitude").effect("Both Channels")("Slider"); // link to your normalized amplitude here!
accum = 0;
for (i = timeToFrames(inPoint); i <= timeToFrames(time); i++){
  accum += spd.valueAtTime(framesToTime(i));
}

accum * thisComp.frameDuration;

Now, duplicate the layer with all the sliders as a backup, then bake all the expressions. (Animation --> Keyframe Assistants --> Convert Expressions to Keyframes)
For your camera z-position, simply add the slider values of "Time" and "AnimAdd" and give each of them the desired multiplier.
Code: Select all
[400, 225, TimeSlider * 40 + AnimAdd * 1000]

In theory, it works. I got to a point where it looked like I wanted it to, but for some reason, it glitches a lot. I can't say if this is because of the expressions (the values look fine) or Particle World, though. Give it a try and let me know if it works for you, yeah?

Cheers!
jules
 
Posts: 859
Joined: 08/5/2008, 7:46 am


Return to After Effects