Quote:

this seems a lot easier:
Quote:

sky.scene
This flag is used for a sky model. Sky model polygons are drawn at infinite z buffer distance, thus not covering any other objects in the level. If this flag is not set, the sky model can cover level elements according to its distance.
Range:
on - model does not cover level objects.
off - normal position(default).
Type:
flag (sky definition only)
Example:
Code:
sky mountain
{
type = <mountainsphere.mdl>;
layer = 3;
scale_x = 0.25;
flags = scene,visible;
}




quoted from the manual.





I don't know why, but the scene flag has NEVER worked for me. I still have to scale sky objects up to ridiculous sizes to prevent them from clipping normal geometry.

So, I decided to try duplicating HL2's 3d skybox method, and I got it working perfectly.

Code:

// Don't forget to set bg_color.blue to 0
view skycam
{
layer = 0;
flags = visible;
}

function initCamera()
{
// This is where your hidden skybox is, either above or below the main level
var skybox_z = -768;

while(1)
{
vec_set(temp.x,camera.x);
vec_scale(temp.x,0.16);
vec_set(skycam.x,temp.x);
skycam.z = skybox_z;
vec_set(skycam.pan,camera.pan);
wait(1);
}
}



The code works great, the trick is properly making your level. Any HL2 mappers already know how.

You make your map as normal. Once you've got it done (or mostly done), make a cube and scale it so that it just barely covers your entire map. Then move the cube way above or below your level, some place out of sight so the player wont see it. Scale the cube down by 0.16.

This cube is now the guide for your skybox. Build your skybox around this cube. Once you've got the skybox made, delete your guide cube.

Make sure your skybox is directly above or below your level, not off to the side or anything. Make a note of how far above/below it is, and put this distance into the skybox_z value.

Be sure that your main level does NOT have a skycube surrounding it! That's right, you want the leaks that normally cause the hall of mirrors effect. What happens is, the skycam view is rendered behind the normal camera view, filling in the background areas. The skycam duplicates the cameras movement, but on a 1/16th scale, the same scale we built our skybox.

Since the skybox environment is made up of normal geometry and models and whatnot, you can use shaders and everything else you normally use in a level, making you able to make very impressive skyboxes. But since it's on a 1/16th scale, the impact on performance is minimal. You can make seemingly large background environments, when in reality they are tiny.

This page has a lot of information on how this method works, although its a bit different to set up in HL2 than 3DGS, but that's expected.

http://www.valve-erc.com/srcsdk/Levels/3d_skyboxes.html