Animation tutorial with Terragen
By Hoffmann Nicolas
Third part : more complex animations
also available in french In french
1st part available here
2nd part available here

Introduction

First of all, if you are a complete beginner with Terragen animations, I advise you to have a look to my first tutorial, it is very simple, and it enable you to understand the basis of Campath and this tutorial. Don't hesitate to look at the second tutorial that I've written, it will explain you other aspects of animations (camera movements). I won't talk about how to use Campath, I'll just give you a link to preceding tutorials.
When I'm talking of "more complex animations", I simply want to talk of constraints that you will have if you make animations : I repeat myself : you will not find in this tutorial a brilliant method which will enable you to make a success of your animations every time, the goal of this tutorial is to prevent what can make you fail this kind of project. (and to avoid these errors) Note : I'm using Campath as an example, but what I'm going to talk about can be applied if you use Terranim (another animation software with Terragen).

As we can say, "whoever can do the hardest can do the easiest", so this tutorial can help you, even for "small" animations.

Tutorial plan

top of the page

Required

top of the page

1) Problems

Don't stop here, here are the principals problems generated with animations : In my first two tutorials, I've said that 400*300 was enough to render an animation. To give an example, my last animations are in 720*400, I didn't try to use a biggest resolution. (we are near DVD resolution, in my mind, it is useless to render an animation at 2000*1500, except if you have time to waste...
top of the page

2) To limit "risks"

The main fear when you make these kinds of animations is having to throw it all in the recycle bin.
So, you have made a render (in general a BIG render) for nothing.

The idea is to control the parameters as much as possible.
Leaving this simple idea, here are the parameters that you have to keep in mind : So the main idea is to avoid bad surprises. And the method is very basic : you simply have to make snapshots at some "moments" during the animation, it is easy to split an animation (go to the 1st tutorial, in script-division section), it is really worth taking advantage of this possibility.
The more snapshots you make, the less you risk having bad surprises...

You have to keep in mind that when ONE image is missed, it's not serious. However, when you have to throw a THOUSAND images away, and a render of one week-end for nothing, I can assure you that it is REALLY irritating... (my own experience)

The more parameters you have (target path, movement in the sky, sun rotation, ect.), the more risks you have. (don't be afraid though, it is not an impossible mission).
top of the page

3) Mistakes to avoid

Now, let's go into details !
There is a problem that is particularly dangerous, a beautiful black band in the sky because of an insufficient sky size... Sometimes you can correct it image by image (it's rather painful), but sometimes there are too many images to correct, and you have to drop it. Don't be afraid to use very big sky sizes ! (it won't increase the render time, Terragen won't calculate the "invisible" sky...
You have to be cautious with the terrain edges : sometimes the "end of the world" syndrome happens (you pass near the edge of a very "flat" terrain. The solutions are very simple : This problem and the preceding (black band in the sky) often happen together...
If you want to make morphing effects with the SOPack, plugin, I advise you to make this effect in a seperate script, and this script has to start at the image number one, I've had bugs in the contrary case... So, isolate the script which makes the morphing, and make it start at image one. It is very simple, here's the script :
    initanim "D:\images\terragen\anims\tut\www", 452 
    Change this "452" to "1", that will give us : 
    initanim "D:\images\terragen\anims\tut\www", 1
   
I do agree : it is not logical, but it prevents you from having troubles... (and it is not difficult to do, so do it !)
Another mistake which often happens is being too confident about the speed of the animation during the previsualization with Campath, in the 3D view.
If I'm not wrong, 3D previsualization of Campath goes at 15 images per second, so if your animation is planned to go at 25 images per second, the final speed will be different (faster). To be sure of this, make the calculation : if your animation is 1000-frames long, it will take 40 seconds at 25 images per second, and 66.7 seconds at 15 images per second. Be very careful, especially if your animation has big speed changes, you could have some bad surprises...
Ray effects are very nice, but you can have a very dark, over-exposed landscape... Take your own risk !
During long animations, if the cloud movement is too fast, it may create problems in the sky... the kind of problem which is not easy to correct, if you see what I mean...
Avoid using very low zoom values, in effect, it gives an interesting effect without a problem when you see it in the 3D-view, but it creates bugs with Terragen. The "funniest" one that I've had has forced me to strike "Enter" between each image rendering (the big zoom of "jeux de caméra", one of my animations on my website), I had to do this for 70 images !

I don't know if this bug has been corrected... if you also don't know, don't use values that are too low... (under 0.8)
A stupid error, but a "killer-error" : be sure that "Random cloud on each frame" is not checked in the cloudscape section, if it is checked, you'll have a funny surprise : the sky changes at each frame...
If your animation is just near the ground, be careful, even if Campath tells you that it won't hit the ground. Sometimes, it happens that "the plane crashes" for a few images. In general, I add one Terragen unit if the camera is near the ground, it prevents me from having surprises...
Another problem which can be unpleasant : it may happen that the texture could move a very little bit between some frames. You can see it in my first animations. It's called texture popping, and may happen when you use a complex texture (it is less frequent when you use a very simple texture, or an uniform texture). It doesn't mind if you're a beginner in animation and you're learning how making animations with Terragen, but it can be tricky if you want to make very good animations.

There is only one thing to do if you want to avoid this problem, check "Extra Blended Detail" in "Render Settings" (only if you have the registered version of Terragen)
It increases a little the render time, but the quality will be better too !
Another problem may happen if you make very big and uncompressed animations, as me.
If you use FAT32 as file system, you will have problems if your animation file is bigger than 4 Gb, because it is the limit for a file with this file system. I do agree : you don't have often files bigger than 4 Gb, but I've already met this with animations longer than 4 mn ! For example, "Mars Render" uncompressed file is about... 7.2 Gb !
The only solution to this problem is to use NTFS filesystem (and having a huge hard disk...)
top of the page

4) In order to simplify

Here are some points to simplify the work :
Make Movie Sequence
You can make a "control render" with Campath. You have to go in "File", and then click on "Make Movie Sequence". You just have to indicate the image size, and Campath is going to render a very low-detailed version (so it is fast), image by image. After this, you'll just have to use a software like Bink to "assemble" the whole thing at 25 images per second, and you'll be able to see the real speed of your animation.

It is very useful, especially if you're trying to synchronize your animation to music...

Another way to simpify your life is to split your animations. It is often interesting : Don't hesitate to make mini-storyboards, in order to have a good plan of your future animation.

As examples, some of my animations (Mars, Fairground, ect.) are uses and abuses of splitting scripts.

Another way to simplify your life is to make numerous and frequent saves...
Change the thread priority
Terragen usually monopolizes your computer : it can be tricky sometimes, applications go very slowly, and the computer is "locked" during a render, even for a single image with a powerful computer (I've got an Athlon 64 with 1 Gb of RAM).
It is not always possible having a computer only for this, we can change the thread priority of Terragen. You just have to hit the magic Windows touches (ie : Ctrl-Alt-Del), and to go into the threads menu. According that you've already launched Terragen, you have to left-click on Terragen, and to change the thread priority for a lower one, as in the image above. (in french, sorry !)

You can do this for an animation render, even for a single render (a 4000*3000 render can be very long). However, you can do it only with Windows Xp or 2000.
top of the page

5) Encoding and some tools

For encoding, I haven't yet talked about a very good software in my previous tutorials : Virtual Dub. It is a free software, and it's very good when you want to compress a video in order to put it online (it allows you to compress audio AND video in the same file). Here's a little help : Open your video (it takes some gigabytes for my case), go into the "Audio" menu, and check "Full Processing Mode". Do the same for the "Video" menu. After that, go back into the "Audio" menu, and "Compression". You can choose your compression (I use MP3), do the same in the "Video" Menu to compress the video (here I use Xvid codecs, which give very good results).
Just make a simple "Save as AVI" to save your compressed video. Virtual Dub is going to compress your video, the result are very interesting with MP3 coupled to Xvid, I manage to obtain a video of 20 Mb with a non-compressed video of 2 Gb ! (with a little loss of quality, of course...)

Of course, there are other interesting options in this software, but I can't detail them all here. (it's not the goal of this tutorial)

My tutorials use Campath as an example, but it will certainly change in the future, with the last release of Terranim. It allows you to have a very fine control of an animation, it is very simple, and it offers you a lot of new possibilities (as in controlling the water level, and making it vary during an animation !). I didn't really like the previous versions of Terranim, but this 2.0 version is very ambitious !

The interface is very clear, and the ergonomics have been enhanced compared to previous versions, moreover, it's free for a non-commercial use...

I've written a tutorial for Terranim !
Another interesting possibility when you make animations in a large size (720*400 for example) is to make a DVD.
If you have a DVD burner and Nero 6 (for example), you can easily create a DVD. It's funny to see animations on a television !

Note : you can also create a video-CD or a super-Video-CD, most DVD players can read these formats), but the quality is less interesting than a DVD. Anyway, you'll just need a CD-burner, it is more common than a DVD-burner, for the moment...

Another interesting possibility is brought by a software created by John McLusky : Anthill. This softare allows you to obtain a very good anti-aliasing for your animations. You can find a very good example on Karsten Keppel website. In fact, Anthill will create one image with several of your animations. (for example, image0001.bmp, image0002.bmp, image0003.bmp will be "combined" to make a single picture)

The effect is very nice, but if you wish to use it, you'll have to double (and more) the render time. The reason is very simple, if your animation is made of 3000 images, and you wish to use an anti-alias of 3 images with Anthill, your animation will be made of 1000 images at last. So if you wish to have the same speed, you'll have to render 3*3000 = 9000 (!) images. You obviously need a lot of time or Mhz...
Afterwards, you can think about creating a little film. But, you can believe me, this kind of project is very difficult, and asks a lot of time (and computers !). As an example, my last animations (about 1 mn 30 sec) took 1 week to be rendered... on 2 PC ! Sometimes, it takes more...

So, if you wish to make this kind of project, you'll have to plan very well, and I hope you have a render farm... I'm already thinking about it, and the numbers are impressive : several months of rendering, hundreds of gigabytes of storage...

Another help for very long renders can be brought from GPU.

This project allow you to distribute an animation render via the net. It's not very difficult to use, go and see it on GPU website. As an example, one of my last animations, "LOTR", has been rendered using this way.
top of the page

Conclusion

Here we are, I think I've explained the essentials of these new kinds of animations.

If you want to see some mini films, go on my personnal website. "Mars" is a good example...

I just want to thank David, for english correction !

In order to read this tutorial offline, here's a zipfile : zipfile (about 48 Kb)

Don't hesitate to send me an e-mail to say me what you think about this tutorial, or to show me your animations ! (I love to see animations !)
Hoffmann Nicolas
Compatible Document XHTML 1.1 et CSS

Valid XHTML 1.1 !  Valid CSS !