Skybox (2D) with Terragen and Skypaint - Advanced

From Valve Developer Community
Jump to: navigation, search
English (en)Svenska (sv)Translate (Translate)

This tutorial explains how to create more advanced skies with Terragen in combination with SkyPaint and Photoshop. It assumes you know how to create a 2D skybox with Terragen.

Warning.pngWarning:Terragen 0.9 and SkyPaint have been discontinued for a very long time, and are unavailable from their websites. You will need to search the internet for both of these.
Note.pngNote:A final render will always look different than what is shown in the preview window, due to resolution scaling.

Script

Scene in Terragen
The _rt, front.

When you are satisfied with the scene, you will need to render all six images for the skybox. Below is a script that will process all camera angles and output them as skybox images. Save the code in Notepad as a .tgs file, then run it by clicking "Run Script" in Terragen:

initanim "C:\output\sky_testft", 1

;_ft
Zoom 1.0
CamH 0
CamP 0
CamB 0
frend

initanim "C:\output\sky_testlf", 1

;_lf
Zoom 1.0
CamH 90
CamP 0
CamB 0
frend

initanim "C:\output\sky_testup", 1

;_up
Zoom 1.0
CamH 270
CamP 90
CamB 0
frend

initanim "C:\output\sky_testbk", 1

;_bk
Zoom 1.0
CamH 180
CamP 0
CamB 0
frend

initanim "C:\output\sky_testrt", 1

;_rt
Zoom 1.0
CamH 270
CamP 0
CamB 0
frend

initanim "C:\output\sky_testdn", 1

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

SkyPaint

The scene inside SkyPaint.

SkyPaint is an old application made for "painting" in 3D environments. Download the program and install it, make sure you also install the Photoshop plugin. When that is done, open Photoshop so it's ready to use.

Note.pngNote:You might have to manually move the plugin from SkyPaint's install-folder to the plugin-folder of Photoshop.

Open SkyPaint. Go to "File->Open", choose the option "Quake II, Targa", and select the sky that you just exported. You should only see the _ft.tga file of that sky and not the other parts. When it's open, it will be your first chance to preview your sky in 3D. You can hold down the left mouse button and turn around the view. You should do this to see if there are any problems, and if there is, you did something wrong in the previous steps.

After you checked the sky's consistency, turn the view to a part where you feel that you want to add something. Now hit the enter key and see how the exact same view is transferred into Photoshop for editing.

Warning.pngWarning:SkyPaint is very old and occasionally disappears. If this happens, you need to forcefully terminate the program and re-open it. To avoid this, never close the SkyPaint picture in Photoshop. Revert until you are back where you started in Photoshop and then use the plugin

Photoshop

The view in Photoshop now is the sun, and something more interesting like a vortex-storm could be added around it. Go to NASA and enter their Hurricane section, snag a huge satellite image from Katrina and paste a part from it onto the SkyPaint picture.

You need to wrap and distort the flat Katrina image to fit into the sky nicely and tweak the color, contrast and do some erasing before you can make it look good. When you're done, make sure you flatten all layers and enter the SkyPaint plugin. The edited view should now be inside SkyPaint, and you can turn around and view what was made.

Warning.pngWarning:You cannot undo changes in SkyPaint. Always save backups in case you are not satisfied.

External links

Environment articles:
Skies and environment maps Skybox (2D)Skybox (3D)HDR SkiesSkybox with TerragenSkybox with Terragen - AdvancedList of skies
Terrain and displacement mapping DisplacementsCreating Holes in DisplacementsDigital Elevation ModelsCreating custom terrain with Worldmachine