Papervision Programming Tutorial - SkyBox
Learn how to implement a sky box in Papervision 3D.
In 3D games you quite often need to fill the sky with the distant view of the outside world, be it the sky, a city backdrop, a star field or a mountain range. The player in the 3D world is never expected to actually reach what is depicted in this view, but without it the player would never get a sense that they are moving inside a world bigger than the rooms or tunnels that make up an actual 3D level.
One of the easiest ways to generate the look of this outside world is with a sky box. As the name suggests it is essentially a box that contains the player (or more specifically the camera). If you move the box so its position is always centred on the camera, and make it large enough to encompass the 3D world that the player is looking at, the player gets the effect of a distant vista that surrounds their local 3D world.
This sample takes a standard Papervision cube primitive, textures it with 6 double sided skybox textures (double sided so we can see the textures from the inside), and updates the position of the cube so it is always centred on the camera. The last bit ends up being a little redundant as the camera never actually moves in the demo, but I have included the code anyway.
I think you’ll agree the effect it quite nice, while being extremely simple to achieve. Check out the demo here, and download the source here.
Go back to Papervision Tutorials

Check out these other Papervision examples:
-
Papervision 3D Programming Tutorial - Creating a Papervision Component
| By mcasperson | in Programming
See how Papervision can be packaged into a SWC Flash component, which allows you to drag and drop Papervision into ...
-
Papervision 3D Programming Tutorial - Traer Physics
| By mcasperson | in Programming
See how to implement cloth physics in Papervision 3D. Demo and source code included....
-
Papervision 3D Programming Tutorial - 3D Image Transitions
| By mcasperson | in Programming
Implement 3D image transitions with this Papervision demo . Source code and online example included....
-
Papervision 3D Programming Tutorial - Environment Mapping
| By mcasperson | in Programming
Learn how to implement environment mapping with Papervision....
-
Papervision 3D Programming Tutorial - Terrain
| By mcasperson | in Programming
Learn how to create a realistic looking terrain mesh and texture that can be imported into Papervision. Demo and so...
-
XA Transaction - Solution for Transaction More Than One Database | By H4d1 | in Programming
Have you ever think that it's too difficult for making database transaction in two different places (or databases) ...
-
Javascript functions for : trim, right trim, left trim, no Apostrophe, is Empty , is Digit , VarChar To Number , is integer , check Is Zero , Get Que | By xxris | in Programming
Javascript functions for : trim, right trim, left trim, no Apostrophe, is Empty , is Digit , VarChar To Number , i...
-
How to access and use a Window's command line | By MaxwellPayne | in Programming
Learn about the Window's command line in DOS and how to use it....
-
How to Learn to Program Your Computer | By dsj8760 | in Programming
This article is about learning to program a computer. It is a general article giving tips on how to learn about pro...
-
Jailbroken iPhones get RickRolled | By explorer | in Programming
First iPhone worm, attacks via SSH and does the classic rick roll gag on the user....
-
Away3D Programming Tutorial - Environment Material | By mcasperson | in Programming
See how to use the EnviroBitmapMaterial to create a real time reflective look in Away3D. Demo and source code inclu...
-
Away3D Programming Tutorial - Primitives | By mcasperson | in Programming
See how easy it is to use the build in primitive shapes supplied with Away3D. Demo and source code included....
-
Away3D Programming Tutorial - Mouse Interaction | By mcasperson | in Programming
Learn how to respond to mouse events in Away3D. Demo and source code included....
-
Away3D Programming Tutorial - Effects | By mcasperson | in Programming
See how you can add the standard Flash filters to any Away3D object to easily create advanced effects. Demo and sou...
-
Away3D Programming Tutorials - Getting Started | By mcasperson | in Programming
Learn how to get started with the Away3D Flash 3D engine with this detailed, step by step tutorial. Demo and source...








Although I appreciate the effort of sharing this code, I found it confusing rather than inlightening. the code is all over the place and the post about it doesn’t mention anything about the implementation; it only covers the concept of skyboxes in general.
I you need a proper example of a skybox, try one of the following tutorial instead:
- http://blog.projectnibble.org/2009/05/22/easy-papervision3d-skybox-tutorial-and-source/
- http://professionalpapervision.wordpress.com/2008/10/20/putting-stars-and-more-into-a-skybox-source/