Before you begin lesson 2:download the tutorial files (1.6 MB)
IMPORTANT REMARKS BEFORE WE START !
- before beginning with this tutorial it is necessary to understand the first tutorial about the Terrain script!
- the Camera script looks for the ter2blend.tgs file in the directory where the ter2blend.blend Blender file is located. This allows to have more than one directory with a copy of ter2blend.blend. So now you can work on multiple projects with each their own tgs file.
Remark: it is necessary to rename your tgs files to ter2blend.tgs.
P.S.: When unzipping the Tutorial2.zip file a c:\ter2blend directory will be created. It contains a series of jpg files, a readme.txt, a test.tgs and a test.ter file necessary for this tutorial.
1. Things to be done with TERRAGEN.
- Make a terrain and save it as a ter-file (e.g. test.ter).
- Make a Terragen script with TerrAmin or Campath . Both advanced programs are all-inclusive animation generators for Terragen. These programs create the Terragen script files or tgs-files . Save the tgs-file (e.g. test.tgs). Rename also a copy of this file to ter2blend.tgs and put it into your working directory (e.g. c:\ter2blend\ter2blend.tgs). This is the directory where the Blender file ter2blend.blend is located.
I won't explain how these programs work. On their own sites you will find tutorials and/or explanation.
- Import the tgs-file in Terragen and start rendering. A series of bmp-image files will be created on the designated directory (defined in the tgs-generator).
It is possible to post process the rendered pictures with Bitty This program make it possible to apply motion blur to Terragen images ready for compilation into animations.
- The following parameters need to be written down on a paper. You will need them later in Ter2Blend.
- image size width (in pixels)
- image size height (in pixels)
- sun heading
- sun altitude
- water level (if needed)

IMPORTANT REMARKS:
- TER2BLEND WORKS ONLY WITH TERRAGEN TERRAIN UNITS!
- DON'T ANIMATE THE ZOOM/MAGNIFICATION OF TERRAGEN'S CAMERA (1.414)
- DON'T ANIMATE THE SUN'S POSITION.
- DON'T WORK WITH TERRAINS BIGGER THAN 257 X 257.
- PICTURES MUST BE NUMBERED WITH FOUR DIGITS, OR YOU GET AN "No backbuffer there" ERROR IN BLENDER.
|
2. Things to be done in a paintprogram.
- Terragen has rendered a series of bmp files. But Blender can't read these files. So you have to convert them to tga or jpg files.
This can be done with your favourite paintprogram. If you are so lucky to possess PS 6.0 then you can automate this process with PS batch processing. With GIMP this must also be possible (although I never tried this).
Meanwhile I'm programming a tool to do this for you. It will read a list of bmp files and convert them to tga files ready for Blender. Give me some time. The name of the program will be bmp2tga :) (and maybe also a jpg2tga)
- Now there is still one thing to do with these files before we can use them. Blender can read a series of pictures and put them in the backbuf . But to do so the filenames may not have a suffix!
REMARK: In the zip file that you have downloaded are a series of converted Terragen jpg files necessary for this tutorial. They were unzipped on your C disk in a new directory c:\ter2blend . They are called: a0001.jpg, a0002.jpg, a0003.jpg,... ,a0072.jpg.
So the names should now be converted to a0001, a0002, a0003,... a0072.
This can be done with good old DOS:
- Open a DOS window.
- Go to the directory where the pictures are put, type at the DOS prompt e.g. cd c:/ter2blend .
- Type now: ren *.jpg *
All jpg files will have lost there suffix.
3. Things to be done in BLENDER.
Now for the magic!
- Start Blender and open (with F1) ter2blend.blend. You get something like this (1024 x 768 screen resolution). The file contains already a camera, two lamps representing the sun and a small mesh with the "shadow only" material attached to it, location (0,0,-1000).
But first we have to do some preparations before we can start Ter2Blend.
- If you started the ter2blend.blend file then the Display Buttons Windows will already be displayed in the window at the bottom. If not then move your mouse to the bottom window to make it active and push F10 or this button:
- IMPORTANT: We must tell Blender to use a series of pictures in the backbuf.
Type in the fullpathname and the common picture name. Then substitute the number with an #
So our series of pictures (c:\ter2blend\a0001, a0002,... , a0072) are written down as c:\ter2blend\a#
Blender will now automatic take the right picture when rendering the animation.
Check that the Backbuf button is active.
- While we are in the Display Buttons Windows we can put the right settings for the camera. While we were rendering the image in Terragen we wrote down the size of it. Fill in the right coordinates in these fields (for our example: 300 x 220):
- Now it becomes time to start the first part Ter2Blend script!
- Start the Terrain script like you learned in the basic terrain tutorial
- Click on the Open button and give the full path and the name of the ter file, c:\ter2blend\test.ter
- Don't fill in the camera position and camera orientation. This will be automatic done by the camera script.
- Fill in the waterlevel and the sun's heading and altitude in the slider buttons. You can use the slider to change the values or you can left click on the non-slider-side of the button and edit the value.
The values for this tutorial are:
- waterlevel = -10
- sun heading = 56.524
- sun altitude = 21.431
- Push that draw button.
- Now let the computer do the work. When finished push the Exit button of the Terrain script.
Finally you get a mesh fitting the Terragen terrain, a plane representing the water, two lamps simulating the sun placed on the right altitude and heading and a camera waiting to get it's coordinates.
So the camera view might look strange. This will be solved with the camera script.
- The Terrain script has done its work. Before starting the Camera script we have to do some preparations:
- The pink line is the border of the plane representing the water level. It is pink because it is selected for the moment. Here we don't need the water so we are going to delete it.
- Now select the terrain and give it the Shadow Only material.
- Now something new: the Camera script.
- At last, now we can Blender! For this tutorial we will keep it very simple. We will work with only one layer and put a very simple shape in the 3D window. It is supposed for this part of the tutorial that you can already create and place objects in Blender and do some basic lighting stuff.
- Go to the display buttons window (F10) and fill in the the Start frame and End frame. We know that we have 72 converted Terragen pictures in the directory c:\ter2blend. So the Start frame = 1 and End frame = 72.
- Go to frame 1. Put the 3D window in Top view (Keypad 7). To ease our work we will put the terrain mesh on an other layer.
Select the mesh and hit the M button. Click on the second button from left, selecting the second layer. Click on O.K. . The mesh has been moved to the second layer!
LAYERS
Blender layers are an efficient way to organize your work and controle visibility. Objects on a selected layer are visible. Select a layer by pushing the corresponding button. It is possible to select more than one layers: shift and click on the layers you want to select. Blender has for the moment 20 layers available. |
- Be sure that you are working on the first layer. Now add a red UVsphere in front of the camera. (put first the 3D cursor on the right place)
Select both layers and check it the sphere is in front of the camera (toggle between Top, Front and Side view and Camera view). Let it fly above the ground.
- Now we are going to set a Keyframe . The idea is that keyframes define objects properties (e.g. location, rotation,...) for certain moments in time. Blender will automatic interpolate between two keyframes the right values of the object's properties. So a smooth animation will be created by Blender.
Press the I key. A requestor will apare with a lot of options. Here we want to "freeze" the Location, Rotation and Size of the selected object. Push that LocRotSize button.
- Go to frame 36. Locate the sphere in front of the newly positioned camera (the orientation and location of the camera has changed as dictated by the Camera script which is working in the background). Hit the I key again and select again the LocRotSize option. Go now to the last frame and do the same thing as for frame 36. The animation is ready now! Put the mesh from layer 2 back again to layer 1.
- Change the 3D window to the Camera view and admire your animation by pushing alt A
- Now it is time to prepare the rendering of the animation. Select the directory where you want to put your rendered pictures. Here we are going to put them in the c:\ter2blend directory and give it the name test.
Check also if the button Extensions is actived. Blender will now put an extension after the filename.
- Select the right type of output format. Blender offers you some weird formats:
If you want the highest quality then choose the Targa format. Each frame will get a number and will saved as a single tga file. when the button Extensions is active Blender will put the suffix .tga after the filename, making your life easy.
If you choose this format then Blender will place on the c:\ter2blend directory 72 tga files named: test0001.tga, test0002.tga,... , test0072.tga. You can then make a movie with these pictures with you favourite application (Quicktime, FMP, Bink,...).
Another possibilty is the AVI jpg format. The codec for this format is normally not installed on your system. You can download it from the Main Concept site . Choose the Motion JPEG codec. Installation instructions are contained in the zip-file.
Blender will give this output a name something like test0001-0072.avi.
- The only thing left is to hit that ANIM button.
Here are some screenshots of our hard work! (frame 1, 25 and 65)
O.K., we survived the second tutorial. I definitely need a drink now !
Cheers !
Guy Van Rentergem
top
|