GameBanana shows no ads to members. Sign up now!
Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

3D Skybox

A Tutorial for Source Engine

Obsolescence Notice

The following is a mirror of tutorial content found on Interlopers.net; it is being mirrored for the sake of archival purposes, and is largely left in its original form with minor corrections.


Many of you will have seen the large landscapes beyond the walls in the dust maps. We will be looking at the method used to implement terrain in a 3D skybox. The method is the same for anything you place in one.



The first thing to do is to have some land that the player will walk around in, be advised that no entities such as players can move into a 3D skybox, they are for show only but allow your maps to appear much larger then they really are.

I have created a small grassy area with a low surrounding wall for this example; I have then added a skybox around this area, it is important to remember that the 3D skybox will surround this area seamlessly.



Next we need to add a sky_camera entity to the map, it needs to be dead centre of the grid, 0,0,0 on every plane. You can align it with the blue lines on the grid and also the small aid in the 3D view. This will tell the engine where the level will be in relation to the 3D skybox.



The way a 3D skybox works is that anything that is to be rendered in there is scaled to 16 times it’s original size, this saves on memory when in game and allows vast environments to be made, further then the normal grid. The things we want rendered in the box have to be made at 1/16 in the editor, and then they are scaled up in game.

To help us with this we need some reference objects from the level so we know where to build the 3D skybox, this would usually be the surrounding parts of the level, and so in this case I will be selecting the outer wall and the grass. Make sure you also select the sky_camera entity along with your reference objects. This will only be as a guide so first of all Copy & Paste the selected objects anywhere.

Then we need to scale this down to 1/16 of it’s size. First, turn on the Texture Lock option in the command ribbon. It looks like a tl icon. Then, go to Tools-> Transform and make sure the Scale button is ticked. Then with everything still selected type .0625 into each field. This will scale it down to 1/16.



Now move the small reference objects over somewhere out of the way so we have some room to build the landscape around it.



I will be making some hills to go in the 3D skybox so I created some brushes around the outer wall and textured them with the grass texture. This is why we pick some reference materials from the playable portion of the map, it helps to judge the size and scale of objects in the 3D skybox, in this case the landscape.



I then used the displacement tool to start building the hills, you can have flat ground if you want with buildings, you don’t need hilly areas. But I decided on that for this example. To make the displacement easier to use make sure you lower the Distance bar and Radius bar down to 1. This makes everything small and easy to use for such tiny geometry.



Once you have finished creating you landscapes, or buildings or whatever, remember to delete or hide the reference geometry and sky_camera from the main level. You should be left with the shrunken geometry and the sky_camera. Also place a hollowed box around the geometry with the SKY texture on every face.

The 3D skybox and main level are lit separately, so be sure to copy your light_env in here as well.



Finally, you should know that models cannot be scaled, so you will find some models that are very small and have sky or skybox in their name usually. If you place these in the skybox they will also be scaled up in game.



There we go.
Sign up to access this!
  • Reverend V92 avatar
    Reverend V92 username pic Joined 10y ago
    HL2 Manager HL2:MMod Manager HL2:EP1 Manager HL2:EP2 Manager HL2:DM Manager SOURCE Manager OC Manager Syn Manager GMod Manager GMod 11 Manager GMod 13 Manager GMod 9 Manager
    WAITING
    22,176 points Ranked 240th
    39 medals 2 legendary 7 rare
    • 2019 Top Contributor Medal icon
    • Returned 5000 times Medal icon
    • 2nd Place - A Bananite's Guide to... Contest Medal icon
    • 6 years a member Medal icon
    • Returned 1000 times Medal icon
    • Received thanks 50 times Medal icon
    access_time 24d edit 24d
    URL to post:

Embed

Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Credits

Key Authors
Blink
Blink Joined 13y ago
Offline
944 points Ranked 41527th
Creator
Contributors
Reverend V92 avatar
Reverend V92 username pic Joined 10y ago
HL2 Manager HL2:MMod Manager HL2:EP1 Manager HL2:EP2 Manager HL2:DM Manager SOURCE Manager OC Manager Syn Manager GMod Manager GMod 11 Manager GMod 13 Manager GMod 9 Manager
Offline
22,176 points Ranked 240th
39 medals 2 legendary 7 rare
  • 2019 Top Contributor Medal icon
  • Returned 5000 times Medal icon
  • 2nd Place - A Bananite's Guide to... Contest Medal icon
  • 6 years a member Medal icon
  • Returned 1000 times Medal icon
  • Received thanks 50 times Medal icon
Archival, minor corrections
Special Thanks
Interlopers.net
Being a fantastic resource for modders

Submitter

Reverend V92 avatar
Reverend V92 username pic Joined 10y ago
HL2 Manager HL2:MMod Manager HL2:EP1 Manager HL2:EP2 Manager HL2:DM Manager SOURCE Manager OC Manager Syn Manager GMod Manager GMod 11 Manager GMod 13 Manager GMod 9 Manager
WAITING
22,176 points Ranked 240th
39 medals 2 legendary 7 rare
  • 2019 Top Contributor Medal icon
  • Returned 5000 times Medal icon
  • 2nd Place - A Bananite's Guide to... Contest Medal icon
  • 6 years a member Medal icon
  • Returned 1000 times Medal icon
  • Received thanks 50 times Medal icon
Reverend V92 avatar
Reverend V92

Redistributor
Are you the owner? Request Ownership
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

Details

Difficulty Level
Beginner

Attributes

Genre
Mapping

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • 1
  • 260
  • 1
  • 24d
  • 22d

More from Submitter

Teleports
Teleports folder Mapping Beginner
Advanced Displacement
Advanced Displacement folder Mapping Intermediate
Advanced Destruction
Advanced Destruction folder Mapping Intermediate
2D Skybox
2D Skybox folder Mapping Beginner

WiPs by Submitter

More Mapping Tutorials