With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
The place for eye candy.

Moderators: Joe Kari, Coup'George

From HD panoramas to skyboxes. DM_DRY's new skybox.

Postby TheDoctor » Wed Nov 14, 2012 11:49 pm

Hi,

several people asked me, how I came up with dm_dry's new skybox. In this post, I will describe how to create skyboxes for any 3d game.

You need either
  • a good camera, a tripod, a cool location and a panorama stiching software such as hugin (open source, free to use!), which can assemble a large panorama of several individual pictures,
or
  • an existing high definition panorama (ideally somewhere around 4096x1500) under a suitable license which allows free use and derivative work, e.g. CC3

For a guide, consider reading this guide on how to make your own SkyBox with a digital camera. If you have a suitable HD panorama, you may skip the steps concerning the panorama's assembly.

For dm_dry's new background, I used this nice picture of wikipedia. If you look closely, you'll notice, the original isn't a 360° degree panorama. However, with the help of Gimp, I managed to fake a 360° degree panorama out of it.
:P

The result you can experience on dm_dry on Baller Bude, best viewed with \r_picmip 0 and vid_restart.

At anybody who wants to contribute: the most difficult task is to search or assemble a 360° HD panorama. The remaining tasks are mechanical. The program Nona, which is a part of hugin, splits a given panorama into six faces. Resolution-wise, Nona expects an aspect ration of 4:2. I used the following .pto file:
Code: Select all
p n"TIFF_m" v90 h1024 w1024

i n"monument_valley.tiff" f4 v360 y-90 p0 h2410 w4820
i n"monument_valley.tiff" f4 v360 y90  p0 h2410 w4820
i n"monument_valley.tiff" f4 v360 y0 p-90 h2410 w4820
i n"monument_valley.tiff" f4 v360 y0  p90 h2410 w4820
i n"monument_valley.tiff" f4 v360 y0   p0 h2410 w4820
i n"monument_valley.tiff" f4 v360 y180 p0 h2410 w4820
v

The numbers have the following meaning: w4820 and h2410 are the width and height of my 360° panorama I've faked, h1024 w1024 are the resolution of the individual faces.

The bash script I used to create the faces were:
nona -o face sky.pto
convert face0000.tif drydesertsky_ft.jpg
convert face0001.tif drydesertsky_bk.jpg
#convert face0002.tif drydesertsky_up.jpg
#convert face0003.tif drydesertsky_dn.jpg
convert face0004.tif drydesertsky_rt.jpg
convert face0005.tif drydesertsky_lf.jpg

I used Imagemagick's convert to turn the images into JPG format. You'll may notice I didn't convert the up and down faces. That's because I replaced them with a single color image. You'll never see the bottom in dm_dry and the sky is simply a certain shade of blue. For that to happen, I selected the upper part of the sky with Gimp's magic wand tool. It select similar colors and I used it to select all the sky above the clouds and turned it into a single color.

To view the results, you need to assemble the drydesertsky_*.jpg images in the zzbackground.pk3 named ZIP-archive, placed in your smokinguns user directory. For that to go right, look at the existing background images in sg_pak0.pk3 to exactly imitate file name and directory structure.

I encourage you to try making a skybox yourself.
  • It's very rewarding,
  • I'll be at your disposal for any further questions/help and
  • I'll promise to include your work into Baller Bude, if you like it to be used and it surpasses the quality of the previous background it substitutes.
As the original image is CC3, so is my derivative work. The SG developers may use it, if they cite the creator of the original image.
Image
User avatar
TheDoctor
Smokin' Amigo!
 
Posts: 818
Joined: Sun Jun 06, 2010 3:31 am



Return to Texture Artists

Show Sidebar
Show Sidebar

User Control Panel

cron