Skybox (2D) with Terragen: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
[[category:tutorial]][[category:level design]][[category:material system]]
[[category:tutorials]][[category:level design]][[category:material system]]


'''Terragen''' is a freeware scenery generator which can be used to create [[2D skybox]]es.  The freeware version has a limitation that effectively limits the texture dimensions of the skybox to 960x960 (although you would scale this up to 1024x1024 for use in Source).  This is not beautiful, but may be sufficient for many independent mappers.  If Terragen is registered for $99 (US), the size limitation is removed.
'''Terragen''' is a freeware scenery generator which can be used to create [[2D skybox]]es.  The freeware version has a limitation that effectively limits the texture dimensions of the skybox to 960x960 (although you would scale this up to 1024x1024 for use in Source).  This is not beautiful, but may be sufficient for many independent mappers.  If Terragen is registered for $99 (US), the size limitation is removed.

Revision as of 19:59, 15 July 2005


Terragen is a freeware scenery generator which can be used to create 2D skyboxes. The freeware version has a limitation that effectively limits the texture dimensions of the skybox to 960x960 (although you would scale this up to 1024x1024 for use in Source). This is not beautiful, but may be sufficient for many independent mappers. If Terragen is registered for $99 (US), the size limitation is removed.

This tutorial will explain how to use a scene in Terragen to create a 2D skybox that can be used in Hammer.

Creating the scene

Terragen can be downloaded here.

Terragen takes a little bit of practice to get the hang of. There are many websites that can teach you the basics. Here are some good ones:

Create you scene and save it. The camera position doesn't matter for now. Terragen can render realistic land if you're very skilled, but since Source has 3D skyboxes, it is recommeded that you only fool with the sky.

Set up the script

The skybox requires six images to be rendered. This script will automate the creation of all six so you do not have to repeatedly come back to your computer and readjust the camera after each render.

Use Notepad to save the following script as skyboxscript.tgs. It can be saved anywhere.

initanim "C:\YOURSKYNAME_", 1

;_ft
Zoom 1.0
CamH 0
CamP 0
CamB 0
frend

;_lf
Zoom 1.0
CamH 90
CamP 0
CamB 0
frend

;_up
Zoom 1.0
CamH 270
CamP 90
CamB 0
frend

;_bk
Zoom 1.0
CamH 180
CamP 0
CamB 0
frend

;_rt
Zoom 1.0
CamH 270
CamP 0
CamB 0
frend

;_dn
Zoom 1.0
CamH 270
CamP -90
CamB 0
frend

Render the skybox

1. Now, in Terragen, uncheck both of the Fixed Height Above Surface boxes in the Rendering Control window. Place your Terragen camera where you want the viewpoint of the skybox to be. What's important here is the Camera Position. The Camera Orientation doesn't matter. Note that changing the height can affect the appearance of the clouds even though the horizon is always in the same location.

Terrastep1.jpg

2. Set the detail all the way up in the Rendering Control window. Set the width and height both to 960. This is the best you can do with the freeware version. If you have registered Terragen, set them both to 2048.

Terrastep2.jpg

3. You should double check that you did the first two steps right so you don't waste a lot of time. Now, choose Execute Script... from the Terragen menu, and choose the file skyboxscript.tgs that you created earlier. Now the rendering will commence. It may take a couple of hours or more. Call someone you love.

4. When the rendering is complete, a dialog will pop up saying the script is complete. Quit Terragen.

Get the textures ready

Now, if you open up the C: drive, you'll see six new BMP files. Rename them as follows, where xxxx is whatever you want to name your sky:

Original filename Change to
YOURSKYNAME_0001.bmp xxxxft.bmp
YOURSKYNAME_0002.bmp xxxxlf.bmp
YOURSKYNAME_0003.bmp xxxxup.bmp
YOURSKYNAME_0004.bmp xxxxbk.bmp
YOURSKYNAME_0005.bmp xxxxrt.bmp
YOURSKYNAME_0006.bmp xxxxdn.bmp

Use Photoshop or PaintShopPro to resize the all of the images to 1024x1024, and save them as TGA files.

--to be completed--give me a couple of days