Planetside Software Forums

General => Terragen Discussion => Topic started by: gpstevens61 on February 24, 2012, 11:55:24 PM

Title: Camera position interpolation instability
Post by: gpstevens61 on February 24, 2012, 11:55:24 PM
I'm building an animation and setting camera co-ordinates for position and rotation and trying to do quite stable pans but sometimes the camera interpolation creates completely unstable rotational, e.g. if the start and end y axis rotation is say 350 it might go up to 3000 degrees and then back again.  Does anyone know how to control this?  Going into each frame and setting the figure manually is tedious and also makes it hard to create a smooth result.

thanks
Title: Re: Camera position interpolation instability
Post by: Hetzen on February 25, 2012, 05:59:17 PM
Seems similar to 'gimble lock', when two rotation axis align, which is inherant of all 3d applications. Out of interest, was the camera looking straight down at any point in your animation?
Title: Re: Camera position interpolation instability
Post by: Kadri on February 25, 2012, 09:49:49 PM

Camera animation in Lightwave (or other similar 3D software) is much easier then in TG2 (v2.3) , so i would animate the camera there and import it to TG2 if i had to.
İf you can export the camera data from your other  program in the "chan" format it is very easy to do.
Look here for Lightwave :

http://forums.planetside.co.uk/index.php?topic=11484.0

There may be others too. A search will help you probably.
Title: Re: Camera position interpolation instability
Post by: Oshyan on February 26, 2012, 02:29:03 AM
Adding an extra keyframe adjacent to your first/last ones can help. We will also have a Linear interpolation mode in the upcoming 2.4 release, along with a curve editor, which should help you control things like that.

- Oshyan
Title: Re: Camera position interpolation instability
Post by: gpstevens61 on February 28, 2012, 08:47:37 AM
I think I've worked out what is going on.  There are two causes I think.

1  The interpolation looks like something like a cubic spline which creates nice smooth movement but does have the ability to overshoot.  I would advise it's best not to put too many key frames too close together as the maths effectively looks at the first differential (and maybe higher ones) and you do not want it to get too extreme a change.  Two adjacent frames both keyframes with the same parameters will lock the differentials down but it may create a stammer in the smooth flow.

2  The maths on rotation appears to think -10 degrees and 350 degrees are a long way apart and try and work to move smoothly from one to the other.  If your camera does do this then just watch for it and overtype the keyframe to be consistent.

With this the problem can be handled.

What I'd really like is a quick test to spot when the camera goes through a solid surface and also some way of easily seeing the frame per metre of travel so that it's easier to keep the camera moving at a constant velocity.

Thanks all