|Help Support the Baja Engine! Donate to Breezeway Studios!
About Sky Domes
Sky domes are a big sphere that you put around your level to make it look like there's clouds/stars/whatever in the sky.
Photographing the sky
This tutorial describes a totally crazy way of photographing the sky that seems like it won't work but actually does! And it's really cheap! We used it in The Secret of Naereaon and the Techdemo with good results.
First, go to walmart or another store that has gardening stuff and get a glass gazing ball (10 bucks). The gazing ball will convert your camera into a 'circular fisheye' style lens (but will cost like 500 dollars less).
Here is a picture of one of Breezeway studio's lab assistants holding our walmart ball:
Ok, now on a day when the sky looks really cool, go to an open field (at a park or something like that) and take your ball and camera. People will look at you funny (that's part of the fun). Sit the ball down in the middle of the field. Go up close to it and photograph the ball from the top. You will be in the picture! So, take another picture, but this time stand at the opposite side of the ball. We'll use the second image to create a clean image in photoshop. Take quite a few pictures with different settings on your camera! You never know what will turn out.
Photoshopping the Sky
Ok, now open up two good images of the sky (one where you stood on the opposite side of the other).
They should look something like this:
Ok, put the second image on top as another layer. You'll need to line them up using the transform tool (ctrl-t). On the top layer, erase the part of the image where you are. You may need to use the hue/saturation filter to make the colors match. Hopefully, the other image will show through, and you'll get a nice, mostly seamless image of the sky. Feel free to use the clone stamp tool to fix it up. It really doesn't have to be that perfect at this point, just try to get yourself out of the picture.
Here's the image with the patch applied:
Cleaning it up
Now we need to clean up the trees and stuff at the edge, and convert it into the correct format for the engine. First, crop the image so that only the usable parts of the sky are visible. MAKE SURE that the cropped image it TOTALLY SQUARE.
Then, apply the 'polar coordinates' filter to convert it so that our image is like a panorama. Go Filter>Distort>Polar Coordinates. Choose 'Polar to Rectangle'.
It will look like this:
What a mess! The first thing you can do is cover up some of the trees at the bottom with a fade. Use the gradient tool, and make a fade the goes from your fog color (set with the fog library) to transparent. You can cover up a good part of the trees with this!
Then, clean up whatever is left with the Clone Stamp tool.
Here's our dome with the fade and other fixes applied.
Now, convert this back to the spherical projection. Go Filter>Distort>Polar Coordinates, but this time choose 'Rectangle to Polar'. Save this image with its size set to one of the Powers of Two.
Create a sphere with 24 sides. Go into polygon mode (click 'Polygon' in the top of the right panel in softimage). Cut off the bottom half of it (select it and press delete). Flip the normals (select all, ctrl-a, and then right click on your object and choose 'invert polygons'). Then, apply a 'planar xz' texture projection and choose your texture! That's it!
The Techdemo includes a sky made with this method.
Note: A Minor Visual Artifact
If you're totally happy with how your skydome looks, you can skip this section. It discusses a small visual problem that doesn't always happen.
The sky dome geometry that you made is not totally spherical. Because of this, the fade that you made at the bottom of your sky dome texture may look lumpy in the engine near the horizon. To fix this, render a picture of the inside of your sky dome with a constant texture applied to it and fog or an infinite light with a falloff. This will create a more accurate mask that you can used to make your fade, which will eliminate the lumpiness. You will probably need to use the brightness/contrast filter to get the fade positioned where you want it.
Here is an example of that kind of mask, for sphere with 24 subdivisions:
| © 2009 Breezeway Studios [ Contact Us ]|