Skip to main content
Participant
August 14, 2017
Answered

Apparent velocity in a 3D comp

  • August 14, 2017
  • 2 replies
  • 337 views

Hi!

I have a comp with several footages and I'm using a masked adjustment layer with the Turbulent Displace effect to simulate heat waves. The problem is that the comp contains a camera movement that acts as a displacement of the distortion of Turbulent Displace. When the camera stops Turbulent Displace happens to be animated only by the property "Evolution" and this difference that I would like to eliminate.

I thought that I could access the speed of the moving layers via expression to compensate by doing the opposite movement at the "offset" parameter on the Turbulent Displace, but being a 3D composition the only animated parameter is the camera position. There is a way to calculate the apparent motion speed from layers based on the 3D camera of a comp?

Thanks!


--
Gabriel Camelo

This topic has been closed for replies.
Correct answer Rick Gerard

You can extract velocity of anything that moves in the comp frame using expressions. The difficult part is converting those numbers into usable values that will automate your animation. This is pretty advanced programming and math. I love expressions and use them all the time when they save me time. I have more than 200 set up in all kinds of categories saved as animation presets and they shave days and days off my production time every year. The question you have to ask is what is the most efficient way to pull off the effect that I'm trying to create and will I need this expression again in another shot soon.

Without seeing the complete comp and timeline with the modified properties of the layers involved (press the u key twice) it is nearly impossible to come up with a suggestion that will work. The specific math involved depends on the distance from the camera and the properties you are driving. If you don't think you can get it any other way you need to give us specific details and hope that someone like Dan Ebberts can just hop in and write you an expression. If that does not happen you'll need to read up on expression language and study some trig...

2 replies

Mylenium
Legend
August 15, 2017

As Rick said, the effective speed would be difficult to calculate since you need to recreate the camera matrix in code and calculate an imaginary intersection with the projection plane similar to the point sampling in 3D renderers. Not only is it complex, but the expression would be unwieldy and slow. Simply try to compensate for it by keyframing the values or use linear() or valueAtTime() expressions based on the inverse, if the motion is linear and the virtual distance to the "heatwaves" doesn't change too much. Otherwise you might consider using a 3D particle pass as the input for a displacment effect rather than Turbulent Displace. That's how it's done in most CG VFX in movies...

Mylenium

Dave_LaRonde
Inspiring
August 14, 2017

It doesn't sound like you need the camera.  You can animate properties in Turbulent Displace to move it.  You might need the camera for something else, but that isn't immediately clear.

Rick GerardCommunity ExpertCorrect answer
Community Expert
August 14, 2017

You can extract velocity of anything that moves in the comp frame using expressions. The difficult part is converting those numbers into usable values that will automate your animation. This is pretty advanced programming and math. I love expressions and use them all the time when they save me time. I have more than 200 set up in all kinds of categories saved as animation presets and they shave days and days off my production time every year. The question you have to ask is what is the most efficient way to pull off the effect that I'm trying to create and will I need this expression again in another shot soon.

Without seeing the complete comp and timeline with the modified properties of the layers involved (press the u key twice) it is nearly impossible to come up with a suggestion that will work. The specific math involved depends on the distance from the camera and the properties you are driving. If you don't think you can get it any other way you need to give us specific details and hope that someone like Dan Ebberts can just hop in and write you an expression. If that does not happen you'll need to read up on expression language and study some trig...