Skyboxes with Terragen 2: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 77: Line 77:
</pre>
</pre>
Where XXXX represents the name of your VTF file without the .vtf extension.
Where XXXX represents the name of your VTF file without the .vtf extension.
{{tip| an easy way is to create an text document in that folder, and when you click, <code>save as...</code> save as all files, then save the file as XXXX'''''.vmt'''''}}
{{tip| an easy way is to create an text document in that folder put the code you want in it, and when you click, <code>save as...</code> save as all files ''not'' .txt, then save the file as XXXX'''''.vmt'''''}}


==Completion==
==Completion==

Revision as of 21:50, 13 September 2011


About

Terragen 2 is much more powerful software then Terragen Classic, and is far easier to use. This tutorial will explain how to create a skybox and put it into Hammer.

The program can be downloaded here: Terragen 2 free version.

Overview

Here is a quick run down of what everything does.

The top bar has several options:

  • New project is the paper
  • Open project is the folder
  • Save project is the floppy disc
  • Render project is the picture with the R in the corner
  • Preview project is the picture with 3D at the bottom
  • Objects is the option that deals with objects inside your scene
  • Terrian is the option that deals with terrain on the "earth"
  • Shaders is the option that deals with any coloration you wish to add to the terrain
  • Water option deals with water on the "earth"
  • Atmosphere option deals with the sky and the "air" around your terrian
  • Lighting option deals with the lighting in your scene
  • Cameras option deals with any aditional cameras in your scene
  • Renderers option deals with the rendering of the scene
  • Node Network deals with how the objects in your scene interact with each other (Warning: messing around with this improperly can really mess with your scene)

Within each option you will see a list of those objects in that category. To add to it, there is a button inbetween the New, Open, Save, Render, Preview; and the list. If you click it you will see a list that will tell you a list of objects you can add and once you add it you can edit the options of that objects (messing around with each "new thing option" will tell you what you want. advice: start with a scene in mind; forest covered mountains with snow on top on a 3d cloudy day)

Importing into Hammer

Rendering

To put into Hammer, first you will need to render each view.

Tip.pngTip:To change view, use the button on the bottom of the preview screen with a camera w/o the arrow next to a picture and select bottom, top, or sides. Then once you have selected a view click the camera with the arrow under the camera to set the render camera to your current view.

An much better way is to go into your camera menu and create 5 new cameras (+ your main camera makes 6), name them after each postfix; then make every single camera with the same settings as your main render camera, then create a renderer in the rendering tab. Then add these rotations to the current rotations of your camera's in the camera tab:

  • (x,y,z)
    • (0,0,0) for back
    • (90,0,0) for right
    • (270,90,0) for down
    • (180,0,0) for front
    • (270,0,0) for left
    • (270,-90,0) for top

Then go into the node tab and make only one camera output go into an renderer that you just created or the main renderer, then go into the rendering tab and select that renderer and click render image, repeat until you have all 6 images

Once fully rendered, save the file as a .bmp with the following name convention:

  • Skybox name
  • A side postfix
    • Front = ft
    • Back = bk
    • Left = lf
    • Right = rt
    • Top = up
    • Bottom = dn

For example, if your skybox name is "carrotsky", you should have the following .bmp files:

  • carrotskyft.bmp
  • carrotskybk.bmp
  • carrotskylf.bmp
  • carrotskyrt.bmp
  • carrotskyup.bmp
  • carrotskydn.bmp

Conversion

Once you have your six pictures, use GIMP to convert files into .tga files then use VTEX to create VTF's.

Head over to your new VTFs; and add them to ...materials/skybox for whichever game you're editing. Now create six VMTs with the same names as the VTFs using this format:

"UnlitGeneric"
{
    "$basetexture" "XXXX"
    "$nofog" 1
    "$ignorez" 1
}

Where XXXX represents the name of your VTF file without the .vtf extension.

Tip.pngTip: an easy way is to create an text document in that folder put the code you want in it, and when you click, save as... save as all files not .txt, then save the file as XXXX.vmt

Completion

The skybox is complete. To use it in Hammer, go to Map properties... in the Map menu and change the skybox entry to xxxx, where xxxx represents the name you chose for your sky.

(taken from skybox(2d) with Terragen)

Cheak back for changes