Skyboxes with Terragen 2: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(30 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{morescreenshots|examples of the software and the finished outcome.}}
[[Category:Level Design FAQ]]
[[Category:Level Design FAQ]]
[[Category:Skybox]]
[[Category:Skybox]]
[[Category:Cleanup]]
[[Category:Cleanup]]


Terragen 2 is much more powerful software then terragen classic and is much more easy to start. This tutorial will explain how to create a skybox and put it into Hammer.  
=About=
Terragen 2 is much more powerful software than Terragen Classic, and is far easier to use. This tutorial will help explain how to create a skybox and put it into Hammer.


This is what it will look like when you first open it.
The program can be downloaded here: [http://www.planetside.co.uk/content/view/21/36/ Terragen 2 free version].
=Overview=
Here is a quick summary of what everything does.


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
*Terrain 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 terrain
*Lighting option deals with the lighting in your scene
*Cameras option deals with any additional 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)


The top bar has several options
Within each option, you will see a list of those objects in that category. To add to it, there is a button in between New, Open, Save, Render, Preview, and the list. When you click it you will see a list that will show you the objects you can add and once you add it, you can edit the options of that object (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)
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 "things" 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 "things" in that catergory; 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 "things" you can add and once you add it you can edit the options of that "thing" (messing around with each "new thing option" will tell you what you want. advice: start with a scene in mind; forest covered mountians with snow on top on a 3d cloudy day)
=Importing into Hammer=
==Rendering==
To get your skybox working for Hammer, first you will need to render each view.


To put into hammer, first you will need to render each view (to change veiw use the button on the bottom of the preview screen with a camera next to a picture and select bottom, top, or sides) then render project; wait a few mintues for that view to render; once fully rendered save as a .bmp with the name ''whatyourskyboxnameis'''''whichsideofskybox_ft_forfront_lf_forleft_up_fortop_bk_forback_rt_forright_dn_fordown'''.bmp
<s>{{Tip|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.}}</s>
i.e carrotskyft.bmp carrotskylf.bmp carrotskyup.bmp carrotskybk.bmp carrotskyrt.bmp carrotskydn.bmp
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:
once you have your six pictures use [http://http://www.avs4you.com/AVS-Image-Converter.aspx AVS image converter] to convert files into .tga files then use [http://developer.valvesoftware.com/wiki/Vtex VTEX]
* (x,y,z)
**(0,0,0) for back
**(0,90,0) for right
**(-90,0,0) for down
**(0,180,0) for front
**(0,-90,0) for left
**(90,0,0) for top
 
{{Tip|Change the fov (under position and rotation) for the sides to 90. Top and bottom to 150}}
{{Tip|Also for the top and bottom camera's add 500 to the center number in the position line if there are no mountains around your camera's. If there are (NOT RECONMENDED) try to raise the camera's above the terrian by adding to the center number in the position line}}
Then when deciding the dimensions of the rendered image use multiples of 2(256*256,512*512,1024*1024,2048*2048) otherwise it won't work.
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 [http://www.gimp.org/ GIMP] to convert files into .tga files then use [http://developer.valvesoftware.com/wiki/Vtex VTEX]
to create VTF's.
to create VTF's.
Head over to your new VTFs.  They'll be in <code>...materials/skybox</code> for whichever game you're editing.  Now create six [[VMT]]s with the same names as the VTFs using this format:
 
Head over to your new VTFs; and make sure thry are in <code>...materials/skybox</code> for whichever game you're editing.  Now create six [[VMT]]s with the same names as the VTFs using this format:


<pre>
<pre>
"UnlitGeneric"
"UnlitGeneric"
{
{
     "$basetexture" "skybox/xxxxbk"
     "$basetexture" "XXXX"
     "$nofog" 1
     "$nofog" 1
     "$ignorez" 1
     "$ignorez" 1
}
}
</pre>
</pre>
Where xxxx represents the name of your sky. For each of the six VMTs, change that bk to the appropriate suffix to match its filename.
Where XXXX represents the name of your VTF file without the .vtf extension.
(taken from skybox(2d) with Terragen)
{{tip| an easy way is to create an text document in that folder put the code you want in the document, and when you click, <code>save as...</code> save as all files ''not'' .txt, then save the file as XXXX'''''.vmt'''''}}


Sorry this is crude, here is where to download [http://www.planetside.co.uk/content/view/21/36/ Terragen 2 free verison]
==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.

Latest revision as of 18:35, 29 February 2020

About

Terragen 2 is much more powerful software than Terragen Classic, and is far easier to use. This tutorial will help 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 summary 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
  • Terrain 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 terrain
  • Lighting option deals with the lighting in your scene
  • Cameras option deals with any additional 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 in between New, Open, Save, Render, Preview, and the list. When you click it you will see a list that will show you the objects you can add and once you add it, you can edit the options of that object (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 get your skybox working for 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
    • (0,90,0) for right
    • (-90,0,0) for down
    • (0,180,0) for front
    • (0,-90,0) for left
    • (90,0,0) for top
Tip.pngTip:Change the fov (under position and rotation) for the sides to 90. Top and bottom to 150
Tip.pngTip:Also for the top and bottom camera's add 500 to the center number in the position line if there are no mountains around your camera's. If there are (NOT RECONMENDED) try to raise the camera's above the terrian by adding to the center number in the position line

Then when deciding the dimensions of the rendered image use multiples of 2(256*256,512*512,1024*1024,2048*2048) otherwise it won't work. 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 make sure thry are in ...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 the document, 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.