How to make a sky using 3dsmax7

From Custom Map Makers Wiki
Revision as of 15:44, 17 December 2011 by John (talk | contribs) (Add a camera)
Jump to: navigation, search
Skyt1.png

This simple tutorial will I hope explain how to create a sky for Urban Terror or other games which use a cubic skybox.

A skybox is basically a collection of 6 images which when applied to brushes in your map will draw as a wrapped sky.

For the purpose of this tutorial I'll create a simple sky with a few simple elements to show the technique.

In my example, I've created 4 basic materials, one for the sky which is a simple blend between 2 blues and 3 other simple reflective materials for the geometry inside the box.

The sky itself can be anything that can be mapped using 3dsmax, so photographs, panaramas, simple gradients, anything at all.

Sky t2.png

Start by creating a geosphere object in max, using the type-in rollout make the diameter 100 units, this is important later on.

The geosphere can be converted to a hemi-sphere using the checkbox in the rollout.

Use as many segments as you feel you need to get a good result.

Move the hemishphere to the center of the world, use the transform rollout to do this by setting the x, y and z to zero.

Sky t4.png

With the hemisphere selected, from the list of modifiers select normals to flip the side the texture is displayed, we want the texture to appear on the inside of the hemisphere.

Assign the sky texture to the hemisphere

Sky t5.png

For the purpose of this tutorial, I added a few shapes into the skybox, just for a bit of interest. Obviously, for your skybox you could add buildings, bridges, mountains, anything. There a thousands of free 3d models you can add to your scene.

I added a cube, a sphere and a cone of different colours, when the sky is complete and added to urban terror these must all line up.

It would also be possible at this stage to add another hemishphere and create a cloud layer on this which would add depth to the sky.


Add lighting

You should add lighting to your scene, in this example I added a couple of omni directional lights with ray-traced shadows.

I would suggest, for the most realistic results, use a single targetted spotlight to represent the sun or brightest part of the sky and use several, low intensities to add fill light low down in your skybox.

Don't be afraid to add other effects (lens flares, glows, atmosphere) and effects lighting.

Add a camera

Sky t7.png

Add a target camera to your scene, place the camera itself dead center of your scene, x=0, y=0, z=0, use the transform rollout to do this or if you prefer, by hand.

Set the camera FOV to be 90 degrees, this is most important - you can change the lens, experiment but always ensure the FOV is 90 before you start to create your skybox images.

Move the camera target to be at

x  0
y 50
z  2
Sky t8.png

You can now open your render settings and set the output resolution to be 1024x1024 and your view to be the camera, render the first image

Save this image as sky_ft.jpg

Move the camera target to be

x   0
y -50
z   2

Render the next scene, this is your back image. Save this as sky_bk.jpg

Move the camera target to

x 50
y  0
z  2

This is the left image, save this as sky_lf.jpg

Move the camera target to

x -50
y   0
z   2

Render this, the right image. Save this as sky_lf.jpg

Now all that remains is to make an up and down image pair.

Move the camera target to

x   0
y   0
z  50

This is the top, save this as sky_up.jpg

Move the camera target to

x   0
y   0
z -50

For the final image, the down. Save this as sky_dn.jpg

The results

Tut lf.jpg Tut bk.jpg Tut ft.jpg Tut rt.jpg Tut dn.jpg