[TUTORIAL] Making a cool 3d skybox.

daemon

L1: Registered
Dec 11, 2007
32
2
Hello, I was trying to see how the different sky's look, but it always show what I think is a default sky. So I looked in the compile window, and found this error:

*** Error: Skybox vtf files for skybox/sky_granary_01 weren't compiled with the same size texture and/or same flags!
Can't load skybox file skybox/sky_granary_01 to build the default cubemap!


This error shows up with all sky's (sky_dustbowl_01, sky_well_01, etc), any idea what I'm doing wrong? Thanks =).
 
Oct 25, 2007
219
690
This error shows up with all sky's (sky_dustbowl_01, sky_well_01, etc), any idea what I'm doing wrong?

The only thing I can think off-hand is that you might not have used the toolsskybox texture, but another skybox texture instead. Other than that, I'm not sure.
 

Intraman

L4: Comfortable Member
Nov 4, 2007
191
0
I got a question, are Skyboxes essential to building cubemaps? because I tried earlier on a map of mine that doesn't have an outside (as its under ground) and the console gave some type of error.
 
Oct 25, 2007
219
690
I'm not 100% sure on this, so don't quote me on it.

Skyboxes have their own basic cubemaps built in. They don't do any fancy work like reflection or refractions, it does however deal with contrasts, especially with the light_environment entity. A cubemap entity by itself should function without a skbox.

One thing though, if you rename you BSP file, you'll disconnect the map from the cubemap information that was compiled, and you'll be back to the basic skybox cubemap.

Hope that helps.
 

Sacrifist

L3: Member
Nov 21, 2007
130
7
Hello, I was trying to see how the different sky's look, but it always show what I think is a default sky. So I looked in the compile window, and found this error:




This error shows up with all sky's (sky_dustbowl_01, sky_well_01, etc), any idea what I'm doing wrong? Thanks =).

This is actually something that Valve needs to fix. As it stands, I cant get any TF2 skies to not compile without that error other then Hydro's sky. Its a real issue because I cant get outside water to look correct even with cubemaps because the default sky cubemap is borked with these sky issues.
 
C

chpmmttn

Thanks for the tutorial, it has helped me out a lot, but I do have a couple questions.

If I have a map with 4 separate outdoor areas, would I need to create a 3d skybox for each area, or will one large 3d skybox that encompasses the entire map work?

Can I have skybox elements that are between the outdoor areas? For example, if there is a mountain between two areas, can I have the mountain in the 3d skybox and have it viewable from both sides, or will it have to be part of the playable map?

I tried doing this yesterday and it gave me a HOM effect with the mountain texture and a few glimpses of sky. I haven't had a chance to troubleshoot it to make sure I didn't just mess something up, but I thought I'd see if it is even possible to do this.

0,0,0 is located directly under where the mountain would be. Would this be causing the problem?

I'm not completely sure how the sky_camera is supposed to be working. If it is actually acting as a camera that looks at the 3d skybox depending on what direction the player is looking, then my results make some sense as the skybox would be looking directly at the mountain from underneath. If it is just a reference for where 0,0,0 is and gives the player a view of the skybox based on where they are located in the map, then this doesn't make sense (to me anyway).

Attached is a diagram to give a basic idea of how the sky_camera is setup, in case I wasn't clear.

Thanks for any help.
 
Oct 25, 2007
219
690
If I have a map with 4 separate outdoor areas, would I need to create a 3d skybox for each area, or will one large 3d skybox that encompasses the entire map work?

Well, you can make 4 seperate skyboxes if you wish (but only one Sky_Camera entity), but it would be better to build one skybox that would cover the 4 seperate areas. That way you can have shared models for the different skyboxes.

I'm not completely sure how the sky_camera is supposed to be working. If it is actually acting as a camera that looks at the 3d skybox depending on what direction the player is looking, then my results make some sense

Yes, that basically right. The sky_camera entity works as a moving camera for each player. As you move along the map, the sky_camera does as well. The sky_camera synchronizes with coordinates 0,0,0; therefore you can only have one sky_camera for all you 3d skyboxes.
 
Last edited:

daemon

L1: Registered
Dec 11, 2007
32
2
Hello, after several tries to make a 3d skybox, it still was not showing, so i downloaded your example map, compiled and ran it, and surprise, the skybox doesnt show. Can something be wrong with my hammer install or configuration, or anything else?

This scrshot is from your example map, no alteration made, just download and compile.




Thanks.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,158
6,079
This is actually something that Valve needs to fix. As it stands, I cant get any TF2 skies to not compile without that error other then Hydro's sky. Its a real issue because I cant get outside water to look correct even with cubemaps because the default sky cubemap is borked with these sky issues.
I can't get any cubemaps to compile (other than with hydro's sky) it runs through the normal process of compiling the cubemaps and then seems to throw them away because It doesn't have the cubemap for the sky. Where is the cuemap for the sky used anyway? seems a bit pointless to me.
has this issue been raised on the valve forums? do they know they need to fix it?
Help us valve!
 

Paddy

L1: Registered
Dec 24, 2007
40
0
hey im having problems compiling! it freezes the program and then i have to close it! could this be because i have not started the box at 0,0,0 or something?
 

Hawk

L7: Fancy Member
Dec 3, 2007
419
213
Spaceweasels, thank you for this tutorial. I changed the scenery in my map into a 3D skybox and it significantly lowered my compile time.

I'm still working on getting the fog to work properly in my skybox, though.
 

Intraman

L4: Comfortable Member
Nov 4, 2007
191
0
Ok, I've tried making one for my map and I've run into a problem. For some reason, the ligght enviroment only lights up what's OUTSIDE the map, ie the place that no one is suppose to see. I know this because you can see a large view of much of the map to the oneside of the screen (the opposite side I have the 3-d skybox). Any ideas as to what I did wrong?
 

Termaximus

L5: Dapper Member
Jan 11, 2008
229
32
Help: Seeing playable field in 3D skybox.

Ok so for the most part my 3D skybox works great. Looks good and has lowered compile time significantly. Having one issue. I can see part of the playable world in the skybox. Let me elaborate. I have a center courtyard and to the north and south are two massively high skyscrapers. The skycrapers in the playable word are only really 2048 units high. Above that is all 3d skybox. In the playable word I have a brush between the two skycrapers making a ceiling and textured with tools/toolsskybox. On the sides of the courtyard I have a brush 512 units high textured with brick and above that a brush going to the ceiling and also textured with toolsskybox. When I run the map and look up it looks great and my mountains and props in distance look correct. The problem is when I move east and west to edge of courtyard I can see over the wall brush and through the skybox textured brush into my playable word buildings, which kinda blend into the 3d skybox stuff. If this is two confusing let me know and I will upload some screens.

p.s. by North, South etc I mean when looking at top down view in Hammer, North would be up, etc...
 

ledguitar

L1: Registered
Jan 16, 2008
1
0
First time skybox maker.

So I tried making a skybox following your tutorial. However when i finished making the skybox and tried to run the map. The compile window comes up and after a few seconds I get an error message that says "The command failed. Windows reported the error: "The system cannot find the file specified."

So I'm guessing that hammer can't create the map and therefore cannot run it. My question is that do you know what could have caused this problem? It compiled fine before I attempted the skybox.

Edit: Problem solved. Made skybox wrong.
 
Last edited:

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
The dev wiki says "A light_environment in the non-skybox part of the map negates the need for one in the 3D skybox." It seems like this is true?

And a tip: I have found that some of the skybox props don't have collision models, so you have to set them to 'Not Solid' or else you'll get a list of errors in the console whenever the map loads.