A skybox is a method for creating the illusion of distant three-dimensional surroundings in your scene. Images are applied as textures to each of the six faces of a cube with the viewer placed in the middle of the cube or skybox. As the viewer moves around the scene, the skybox images remain stationary so that they seem infinitely distant like the horizon in a seascape.
This figure shows how textures map onto a skybox.
Before we create a skybox in HOOPS, we need to create with ::Define_Texture. In the call to ::Define_Texture, we pass six image image sources to essentially create a cube map. The sources are applied to the cube map in the following sequence: negative Z-plane, positive Z-plane, negative X-plane, positive X-plane, negative Y-plane, and positive Y-plane. Additionally, we can also set the camera option which tells HOOPS which segment contains the camera information for the skybox. Once you have defined the texture for your skybox, call ::Set_Color under a driver instance using the windows option to set the skybox texture. HOOPS will recognize the window backdrop as a texture with six sources and create a skybox from it.
A helicopter flying by a mountain range created using a skybox and a cube environment map derived from the same texture source.
You can also use the cube map texture as an environment map on faceted geometry as seen in the sample code below: