Camera animation problem

Started by Rumca1z, April 18, 2019, 06:51:49 AM

Previous topic - Next topic

Rumca1z

Hello all,
I have this weird problem that I try to solve.

Im trying to match camera and objects between terragen and blender and it works perfect without animation. Then I made a small camera animation and I saw a little offset. Now this animation has every frame keyed. So I selected one specific frame copied the location/rotation to a new camera that doesn't have animation and it matched with blender perfectly.

So my question is how I see some kind of interpolation when my frame has a specific key.

Btw I copied the keys to previous and next frame and it also matched then but it must be copied to both to work.

Edit: I found the root to this problem. Although I disable motion blur in renderer in camera it had length 0.5. With 0 motion blur length I get exact match but I lose the 2d motion vectors. So is there a way to get motion vectors without displacing the camera??

Matt

Hi, welcome to the forum.

A couple of ideas:

1. Does the offset seem to be consistently ahead of or behind the motion? If so, it's likely to be a difference in the shutter offset.

2. Is it worse when the motion has a large amount of curvature, such as bumps, shakes and rapid changes of direction? Then perhaps Terragen's and Blender's interpolation schemes are too different. I know this is a bit of a hack, but you could try using a much smaller motion blur length (e.g. 0.005, or 1/100th of the value you want), and then multiply your 2D vectors element in the compositor to retrieve the values you want.
Just because milk is white doesn't mean that clouds are made of milk.

FlynnAD

What a timely topic. I also had a camera animation matching problem and was just about to post it when this topic happened to be at the very top of the forum.

I used 3dsmax and exported a baked animated camera from frames 1-6. It is basically a manual cubemap camera rotation since I did not want to render or use a spherical panorama.

Frames 3&4 get really funky, with the camera nearly rotating 45-degrees off horizontal. Even frame 2, although it looks right when rendered, does not seamlessly match frame 1. The kicker is that the 3D preview window looks spot on.

I have not tried turning off motion blur yet, and if that works, it would be a fine solution since a cubemap does not need any motion blur. But if this wild camera swooping is caused by something else, I'd love to know. I'm using TG 4.1.18.

I've attached files for anybody to try out. There is the .tgd file of course, but if you want to begin with a brand new TG session, simply import the FBX file; it only has a camera and animation to import and is already in meters for units.

Thanks,
Matt

Matt

For cubemaps you will need to set the camera's motion blur length to 0.
Just because milk is white doesn't mean that clouds are made of milk.

Rumca1z

#4
Hello Matt,
Ok I found how this thing work after some tests.
Lets say we have 3 frames keyed on y rotation and the second points directly to a cube grid.
So
frame: 1   -20 degrees
frame: 2    0 degrees
frame: 3   20 degrees
With linear interpolation , motion length 1 and offset -0.5 you see directly the grid
if frame 1 is -40 degrees  to see the grid you need offset -0.3333
if its -60 offset must be -0.25
if frame 1 is -20 and frame 3 is 60 offset must be -0.75
basically the math to get the offset=-(k3-k2)/(k3-k1)
If you want to lower the motion length to 0.5 you must multiple offset with the same number. 0.5 -.25 in the first example.
So I see the consistency behind this camera displacement and i can deal with it if only one value is keyed.
If there are 2 or more you cant fix it.
I like the hack that you proposed Matt and I will use it but the problem that FlynnAD said is still here.
The 3d view shows something different than what the final render is.
So terragen basically overrides the specific frame keys you render based on the motion blur length/offset/ ,keys before/after and interpolation.
Maybe this is the right way that all 3dpackages use. I don't know. I have only used blender which see previous and next frame to make 2d vectors.