Expression to animate between 2 cameras in Action

Anybody remember the technique to animate between 2 cameras in Action?

@joelosis
@inti.martinez
@Sinan
@BrittCiampa
@DannyYoon

?

I have this somewhere @randy

Ok so it has been a while since I have used it so I can’t confirm how solid it is or what issues it has but if this can help trigger any other brain cells then …

————
This is a good one:
Blending tracks. Maybe you want to smooth a camera track but then fade back to the original. Use a control axis to blend from TrackOne to TrackTwo.

((TrackOne.position*(1-Ctl.position.x))+(TrackTwo.position*Ctl.position.x)

See FXPHD FlameMastersII part 2

What about blending from one camera to another using an axis called MIX

On the Default camera’s parent channel put in this expression: eval(camera1,frame)+(eval(camera2,frame)-eval(camera1,frame))*MIX.position.x
————————————————————

1 Like

I never was able to get it to work/had a use case for. Though expressions aren’t my strong point

I’d be curious to see that work. I think it presumes the two cameras are remarkably similar in space; if you are blending two non-spatially-aligned cameras every mixed frame is going to be nowhere useful.

If one camera is facing negative Z and the other is positive Z, the compromise position of looking straight down the X axis isn’t going to be useful to anyone.

Is there a need to keep the setup inside a single action?

Yeah from memory there was some crazy drift when going from two different cameras.

I used it once to smooth a camera. I kept the original and then smoothed a copy. This expression worked for me to dial the smooth on and off when required.

1 Like

Aww man I have those FXPHD classes from years back. Remember which one it was @PlaceYourBetts ?

This actually came from blending two extended bicubics to get a morph but I adapted the expression so that is why it comes with a caveat.

FlameMastersII/flm209-class02

1 Like

done this many times in other software.
here is an action setup:
camera_mix.zip (24.5 KB)
Camera3 is the result of Camera1 and Camera2 mixed. The Control axis X Position drives the weight between the two cameras, A value of 0 is Camera and a value of 100 is Camera2. Values bellow 0 and above 100 are not useful… I guess I can clamp its influence. Not particular reason for the use of the axis, I just need a parameter to drive the weight… As far as I know (which is very little) the is no way of creating custom parameters in Flame??? :thinking: Unless I dive into matchbox shaders.

1 Like

Ha… sorry I didn’t fully read @PlaceYourBetts post… its the same expression. Oh well, it was a good exercise.

1 Like

All good :blush:

Custom parameters? There is a node called variables which could help here maybe. I haven’t used them myself but @ytf was talking about them. I think this is what you are looking for.

@inti.martinez had a great example on an early logik live video. I tried and failed

Around 45 mins in

2 Likes

Then you @MikeyBrown !

Yes! something like that. I will take a look at the code in case I need to build something specific. Thanks!

Seems like @inti.martinez is using something similar to the expressions above. Keep in mind that these expressions provide a linear interpolation between the two cameras parameters. For more organic behaviours you may need to introduce the influence of more parameters, like a second axis to control position offsets.

1 Like

try this:

Control it with a dummy (from 0 to 1 )

Cam3= cam1 + (cam2-cam1)*dummy.position.x

2 Likes

Cam3= cam1 + (cam2-cam1)*dummy.position.x

you will need to do this on the Position Value and on the Aim valueSo… 2 expressions

1 Like

If you do it using the method @PlaceYourBetts posted, using the “eval” function all parameters are evaluated in a single expression, including aim and focal length…. just make sure both camera settings are set to the same values.

1 Like