The word comes from English and Sky means sky. Skyboxes are used to represent the environment in 3D scenes. These include for example Landscapes in the background as well as sun, sky and clouds. Because these places serve only as a backdrop for the program and are mostly unimportant, which are used for simple display textures.
Once you are in a scene but can move freely, resulting in multiple problems.
1.Zum one must be the textures so happened to each other that we do not see through the trick and realizes that it is solely to textures,
2.zum, there must always be in the texture are the same distance from the observer, so that one can not approach her.
3.Obendrein may not cover the texture, but other scene parts that are achievable.
In principle, the problem can be solved quite easily.
For the representation of the environment one uses a simple cube (= Skybox), whose six sides are each provided with a texture, with each side of the cube an environment section with a Projektivwinkel of 90 ° shows the more or less to form a panorama of the surrounding area. On the top projected to the sky and to the underside of the floor. The four other sites are available for the respective directions. If you now the skybox first characterized and then deletes the Depthbuffer, has the effect of the Skybox will then always hidden in the places where are there any other fragments from the scene. This is logical, as all are over the fragments of the Skybox, which are already in the frame buffer, all other fragments of the depth test.
The six textures can be stored alternatively in a cubemap and then only the areas that are marked specifically as the sky, drawn with this cubemap. If the SkyBox is shown only partially, thereby rendering can be simplified and no need to delete the Depthbuffer.
A skybox is replaced by a lot more realistic when they are due to dynamic effects such as Clouds that move or a sun that extends rises and sets.
Skyboxes can use various programs such as produced terragen. A detailed description of the creation of texture to the source code for loading and displaying the named, are found in Tutorial_Skyboxen.
No comments:
Post a Comment