Launch World Machine 1.25, open the scene: "World Machine\Examples\Basic Edition Examples\Sweet Canyon Mesas.tmd". Press Ctrl+1 switch to Device View, select the File Output device, the press Ctrl+3 switch to 3D View, you should see a sweet canyon terrain.
Select World Commands > Wolrd Size... from menu, set parameters like following in the dialog appears:

Press OK button, you'll see below terrain in 3D View:

Now we've finished terrain modeling in World Machine, let's output the mesh data. Press Ctrl+1 switch to Device View again, double-click the File Output device, set paramters like following in the dialog appears:

then press the Write output to disk! button. Ok, the terrain mesh data has been saved to the "Awakening2.5\models\output.ter" file.

Last edited by Vincent on Sat Feb 16, 2008 1:51 am; edited 2 times in total

Part 2 : Textures

Vincent

Joined: 25 Dec 2006

Posts: 297

Posted: Thu Feb 14, 2008 11:23 am

Back to World Machine, open the Wolrd Size dialog again, set Size to 512 x 512, see below image:

Close this dialog, then press Ctrl+2 switch to 2D View, click the Height button under the Terrain Preview Window:

You should see below image in 2D View:

Select File > Save Viewport As Image... from menu, save as decalmap.bmp (if this command sometime does not work, try to switch 3D view then back to 2D view), so the decalmap.bmp is our terrain's decal texture.

Again, under the Terrain Preview Window, click the Set Terrain Color... button, select the Greyscale color method in the Colortable Selector Dialog appears; the 2D view should like this:

save the viewport to heightmap.bmp.

Launch Adobe PhotoShop (please ensure Nvidia's dds plugin has been installed), load the heightmap.bmp, then select Filter > NVIDIA Tools > NormalMapFilter... from menu, in the dialog appears, set Scale to 8, then click OK button, the image should like following pattern:

save this image to normalmap.tga, it is terrain's normal map texture.

Now only the horizon map left to do, exact horizon map making is somewhat complex. Here, we use a simple method to approach.
In World Machine, switch to 2D View, click the Shader button under the Terrain Preview Window (TPW); then move mouse cursor to the center of TPW's top edge, press & hold mouse's left-button to do a slight dragging, the action will change sun light direction for terrain. The 2D View should like below:

Save the viewport to image and open it in Photoshop, select Image > Adjustments > Brightness/Contrast... from menu, in the dialog appears, set Brightness to +100, and Contrast to +50, the image should like this after adjustment:

This horizon map only for 0~90 degree sun angles; for 90~180 degree angles, we need another horizon map. First dragging mouse cursor at the center of TPW' bottom edge, then take the viewport image do same Brightness/Contrast adjustment as above, then combine with normal map and save to normalmap2.tga.

So we have two normal map textures, they have same RGB data, but Alpha data are two different horizon map.

Part 3: Materials

Vincent

Joined: 25 Dec 2006

Posts: 297

Posted: Thu Feb 14, 2008 2:20 pm

Back to Awakening, we've already imported the terrain mesh. The terrain's Dimension is [21720, 6180, 21720] (check this in mesh's Properties Panel), it's too big for the Scattering Shader, so scale the mesh by [0.4,0.2,0.4], get a suitable terrain size for shader's default setting; and set terrain's position to [0,0,0].
(you also can adjust shader's parameters to fit terrain size, but scaling terrain is more easy)

Add textures (decalmap.bmp,normalmap.tga,normalmap2.tga) to scene. Then new a material named 'terrain'; set Texture0 with decalmap.bmp, and Texture1 with normalmap.tga; load 'Scattering.sha' to D3D Effect; then assign this material to the terrain mesh.

Create a Static Mesh by loading 'sphere.TRI', and scale it with [150,150,150], rotate it with [90,0,0], this is sky mesh. New a material named 'sky', load 'ScatteringSky.sha' to D3D Effect; then assign this material to the sky mesh.

Now your scene should looks like below image:

Last edited by Vincent on Sat Feb 16, 2008 2:22 am; edited 2 times in total

Part 4: Animation

Vincent

Joined: 25 Dec 2006

Posts: 297

Posted: Fri Feb 15, 2008 5:42 am

Create a Shot named 'runs', set it's time length to 120, and check Circle and Not Effect Camera styles.
Create a light named 'sunlight', set keys on time 0, 30, 60, 90, 120 respectively, below are light's parameters for every key:

OK, we've finished it. Select the Shot 'runs' and play the scene, you'll see the landscape.

matty47

Joined: 27 Nov 2007

Posts: 21

Posted: Fri Feb 15, 2008 11:03 pm

Hi, I tried to follow the tutorial. I exported the .ter file with a 128 x 128 resolution however when I tried to import it into Awakening 2.5 I got an error message saying that there were more than 65536 vertices and that the result may be incirrect (which it was - distortion of the mesh and additional faces). I tried a 64 x 64 world size and had no problems. Any ideas?
Thanks
Matthew

Vincent

Joined: 25 Dec 2006

Posts: 297

Posted: Sat Feb 16, 2008 2:01 am

A 128 x 128 terrain mesh should has 16641 vertices. The problem maybe is output path. I've modified Part 1 of this tutorial: select output file to a explicit path: "C:\Awakening2.5\models\output.ter". Try again.

matty47

Joined: 27 Nov 2007

Posts: 21

Posted: Sat Feb 16, 2008 5:15 am

You are correct! ( and if I had bothered to do the math I should have known the number of vertices!!! - sorry)
Thanks for clearing up the path thing though
Matthew