'Fake' 3D Skybox

Credits

Submitter
  • P5: Peddler
    Points: 156,185
  • E6: Authority
    EF: 219
  • C4: Super Moderator
  • A6: Elder
    Account Age: 6 years
Logan Dougall
(Creator/Co-creator)
Key Authors
Logan Dougall
Writer, Mapper, Lover,
Special Thanks
Graceful
Providing Caffeine
Valve Dev Wiki
Daily Read + Inspirations

Rating

9.6/10
Based off 3 rating(s)

Additional Info

Genre
Mapping, Other/Misc
Difficulty Level
Beginner

Stats

Post Count
7
ViewCount
2,480
Date Added
2 years ago
Date Modified
6 months ago

Share

Embed Code
Code to use:

More embeddable images

Save some brushwork by converting a 3D skybox to a 2D Image

A normal 3D Skybox is BETTER LOOKING than this method! This is just one solution to brush limits by removing the 3D Skybox.

Fake 3D skybox: As my giant message above states, this is just one solution to the problem where a map has too many brushes and fails to compile. What this tutorial will explain to you is how you can take your existing 3D skybox and convert its projected image in your map to a standard 2D skybox image thus eliminating the need for the 3D Skybox and lowering your brush limit to one which will allow the map to compile.

"Lower Brush Count, change 3D to 2D Skybox"
You do not require any knowledge of texturing whatsoever to achieve this, beginner mappers will be able to do this method just as easily as anyone.

Downside to this method is that the objects in the skybox will not move based on your perspective as they do with a standard 3D skybox, ie the blue square is an object in the 3D skybox:

3D Skybox

Position 1

30 Metres Left
2D Skybox

Position 1

30 Metres Left

Now you can see that this would only look good if the objects in your 3D skybox are fairly fall away from the players perspective to limit this visual issue.

The Method All you need is a vmf file containing nothing but your 3D skybox - scaled or not doesn't matter and the same light settings your using in the playable map.

Nothing else needs to be done with the map file itself, just compile the map as you would any other and load it in CS:S.

I'd recommend setting your graphics to as high as possible - Anti-Aliasing etc - as it will improve the quality of the skybox images you will be creating.

Once your map is loaded join the spectator team and position yourself in the level as you want the skybox to be displayed (Desired perspective). I'll use the CS_Milita Skybox as an example here:

Now run some cubemap specific commands - almost like buildcubemaps but different.

In Console Type:

mat_envmaptgasize 512
envmap
The screen will do the same effect you see when running the buildcubemaps command but what its doing this time is saving those as individual screenshots in another directory.

[...]\counter-strike source\cstrike\cubemap_screenshots\

The images already come with the standard bk up dn lf rt ft post-fixes that skyboxs use so that saves some effort.

Converting to VTF & VMT Skybox files The quickest and easiest way to convert these to VTF files without having to download any programs etc is through vtext.exe thats in the SourceSDK.

Navigate your way to the following path:

[...]\sourcesdk\bin\ep1\bin\

You'll see a vtex.exe program near the bottom of the folder. Start a new window but keep this one open as well.

In the new window go back to the folder holding your tga files for the skybox and copy them to this folder location:

[...]\sourcesdk_content\cstrike\materialsrc\skybox\ *You may have to create the skybox folder.

Now create a new TXT file with the following code in it:

"skybox" "1"
"nomip" "1"
"nocompress" "1"
Copy and Give this TXT file the same name as all your TGA files. ie,

mapnameup.tga mapnameup.txt ...

Now select each of your TGA files and drag them onto the vtex.exe in the other folder window. A Command prompt window will pop up and it will run through each of your images and convert them to VTF files. The complete files will be in the Skybox folder in CS:S already so you'll need to go to that path now to finish this tutorial:

[...]\counter-strike source\cstrike\materials\skybox\

You should see your VTF files sitting there now, if not check to make sure you had SourceSDK running with CS:S selected in the game config, then redo the vtex.exe step.

However, the last thing missing are the .VMT files so you'll need to create all 6 of those as well. Create a TXT file in the folder and inside it place this code:

"UnlitGeneric"
{

"$basetexture" "skybox/filename" // ex:  cs_militaup
"$nofog" "1"
"$ignorez" "1"

}

When you go to save it you must change the filetype dropdown to 'all files' and add the .vmt extension to the filename. The filename should match each of the vtf filenames.

If you get purple/black textures in-game check that the .vmt files are not called mapnameup.vmt.txt

Repeat the above step about properly saving it so remove the extra txt on the end or change your folder view options to show known filetypes so you can just rename it from the folder explorer window.

Now of course all you do is edit the map properties to include your newly created custom skybox texture and remove the 3D skybox.


That concludes this short little tutorial, if there are any problems, suggestions etc please feel free to leave short post.

Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Tutorial.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Tutorial a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Tutorial.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

Comments

    • P3: Peasant
      Points: 20,213
    • C1: Member
    • A4: Graduate
      Account Age: 4 years

    Thats strange... I was looking for a tutorial on how to do this and saw this on the front :P

    LOLOLOL
    • P1: Beggar
      Points: 96
    • C1: Member
    • A6: Elder
      Account Age: 7 years

    Really nice!

    y3sak
    • P2: Drudge
      Points: 4,867
    • E3: Tutor
      EF: 57
    • C2: Ripe Member
    • A5: Veteran
      Account Age: 4 years
    Rafael De Jongh
    Posted by Lost
    Posted by {H.H} Boba Fett Great and handy tut, helps mappers rly whit ther 3d skybox. good job.
    Um, this isn't about making 3D skyboxes :P

    i know its to make a 2d skybox looking 3D

    2D/3D Artist
    • P5: Peddler
      Points: 156,185
    • E6: Authority
      EF: 219
    • C4: Super Moderator
    • A6: Elder
      Account Age: 6 years
    Logan Dougall

    Posted by {H.H} Boba Fett

    Great and handy tut, helps mappers rly whit ther 3d skybox. good job.

    Um, this isn't about making 3D skyboxes :P

    .awesome { Uberstylers:Club; }
    • P2: Drudge
      Points: 2,038
    • E2: Guide
      EF: 34
    • C3: Moderator
    • A5: Veteran
      Account Age: 5 years
    Dr.iCe

    This going into my favourites ;D

    • P2: Drudge
      Points: 4,867
    • E3: Tutor
      EF: 57
    • C2: Ripe Member
    • A5: Veteran
      Account Age: 4 years
    Rafael De Jongh

    Great and handy tut, helps mappers rly whit ther 3d skybox. good job.

    2D/3D Artist
    • P3: Peasant
      Points: 18,411
    • E1: Helper
      EF: 8
    • C1: Member
    • A5: Veteran
      Account Age: 5 years

    Nice and usefull :)

    Gonna try this out some time