Planetside Software Forums

General => Terragen Discussion => Topic started by: Njen on December 31, 2019, 02:54:15 AM

Title: Animation interpolation issue...
Post by: Njen on December 31, 2019, 02:54:15 AM
I was doing some testing to make sure my animation export scripts were lining up, and I think I found an issue with how the animation keys are being read. I exported a camera that moves quite a lot every 4 frames to fully test the motion, and when I import the .chan file on the camera and render, what I see in the viewport is not what I see in the render (terragen_animBug_on.png).

In the second image, all I did was delete the rotation animation on the camera, and it looks like it lines up (terragen_animBug_off.png). But obviously this is not a work around as I need animation on the camera. I have attached the .tgd file for confirmation. The frame I used to render in the attached images is f1037.
Title: Re: Animation interpolation issue...
Post by: Hetzen on December 31, 2019, 07:52:33 AM
It sounds like you have a rotation order mismatch between the app you've used to make the camera and what TG is expecting. TG allows you to change how it reads that order in the Import tab inside the camera node.
Title: Re: Animation interpolation issue...
Post by: Njen on December 31, 2019, 11:38:21 AM
I deleted the rotation animation, but the animation values are still exactly the same before and after the deletion. If you look at the values, they are all multiples of 90 degrees. Nothing to me in the rotation order suggests that there should be a few degrees off in one axis when there is animation.
Title: Re: Animation interpolation issue...
Post by: Kadri on December 31, 2019, 11:55:38 AM
Not sure but have you tried to changing "Camera","Blur" tab, Motion Blur "Length" 0.5 to 0 ?
Centre on frame and maybe the other options?
Title: Re: Animation interpolation issue...
Post by: Hetzen on December 31, 2019, 12:06:02 PM
Yeah I looked at that too Kadri. I'm now thinking it may have to do with key frame curves, because if you render frames 1037 to 1039, it looks like the rectangle is easing into position.
Title: Re: Animation interpolation issue...
Post by: Kadri on December 31, 2019, 02:02:24 PM
I see... With "0" it looks like the second image to me, but i am a little fuzzy about the problem here.
Title: Re: Animation interpolation issue...
Post by: Tangled-Universe on January 03, 2020, 04:55:45 PM
Changing the curve types from TCB to linear does not resolve it.

If you inspect the .tgd file there are quite a few weird values in the keyframes. Many position and rotation values are at micrometer scale.
Somehow your 3rd party app inserted those into your .chan file and somehow TG decides to not show those as 5.2e-006 (for instance), but as 0 instead.
It respects the scientific notation everywhere else, but not in this instance. Perhaps that's a bug which needs to be filed anyway.
I fixed those values and the issue still persists, but that's no surprise.

Indeed...disabling motion blur fixes it, but why? There's a keyframe at frame 1037 and that's an absolute guide, not relative like in between keyframes.
Title: Re: Animation interpolation issue...
Post by: Njen on January 07, 2020, 06:04:42 PM
With motion blur turned off (which I am pretty sure I did remember to do in the attached file), both renders with and without animation should look the same, as in there should be no apparent rotation difference, because the values are exactly the same.

I think this is a bug, is there anyone from Planetside who can confirm this?
Title: Re: Animation interpolation issue...
Post by: Matt on January 09, 2020, 05:28:19 PM
There are differences between "only" disabling motion blur and setting the camera's motion blur length to zero. Try the latter. If motion blur length is greater than 0 then the camera can still be affected by interpolation even if the renderer has MB turned off.

There are reasons why it works this way, but most people who encounter it consider it a bug so we might change this behaviour in future.
Title: Re: Animation interpolation issue...
Post by: Kadri on January 09, 2020, 05:45:01 PM
Look at the file below. If this is what you are after you just have to do what i said above.
Only disabling motion blur in the render node is not enough. You have to change it in the Camera node too.

We had this conversation here more then ones.
Matt does have his reasons for this behavior but really this is an unnecessary problem.
At least a reminder popup or something when you change motion blur to off that you have to set it to zero in the camera node too would be good.

cf_005_animBug_v002_Camera_Node_motion_blur_set_to_zero.tgd
Title: Re: Animation interpolation issue...
Post by: Kadri on January 09, 2020, 05:53:16 PM
Have a look here what Matt said why it works this way:
https://planetside.co.uk/forums/index.php/topic,17773.msg172181.html#msg172181