Skybox (2D) with Terragen and Skypaint - Advanced

From Valve Developer Community
(Redirected from Skybox - Advanced)
Jump to: navigation, search
Svenska

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: 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: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 install the Photoshop plugin also. When that is done, open Photoshop so it's ready to use.

Note:You might have to manually move the plugin from Skypaints 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 transfered into Photoshop for editing.

Warning: Skypaint is very old and occassionally 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 nake 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: 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 DisplacementsHoles in displacementsDigital Elevation Models