This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
gamedev:sky [2008/07/31 21:51] – dragonlord | gamedev:sky [2019/05/24 23:43] (current) – ↷ Links adapted because of a move operation dragonlord | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | {{tag> |
+ | <WRAP youarehere> | ||
+ | [[: | ||
+ | </ | ||
The sky provides a background for a world. A world has at most one Sky objects assigned. Sky objects are build on a layer system to provide a lot of flexibility while working with various kinds of skies. The sky itself contains only a background color. This is the color of all pixels not covered by scene geometry or sky layers. The sky is always located around the camera and moves with it. Therefore the sky layers should only host very far away objects. | The sky provides a background for a world. A world has at most one Sky objects assigned. Sky objects are build on a layer system to provide a lot of flexibility while working with various kinds of skies. The sky itself contains only a background color. This is the color of all pixels not covered by scene geometry or sky layers. The sky is always located around the camera and moves with it. Therefore the sky layers should only host very far away objects. | ||
Line 5: | Line 9: | ||
Sky Layers provide a container for individual sky elements. Layers can contain a layer skin, sky bodies and a sky light. Layers have an orientation relative to the world coordinate system given by a quaternion. Using this orientation layers can be slowly rotated to simulate day/night cycles or even complex planetary movement if required by the game. Furthermore each layer has a color and intensity parameter. They are used by the layer skin and layer bodies to alter the color and intensity. The intensity is used the same way as in lighting and measures the luminance of the layer components in lumen. A typical daylight sky has roughly 2500 lumen whereas a starlight sky has around 0.1 lumen. Each of the layer components can be specified alongside each other if required. Important to know is that the content of the sky is not influenced by any light cast in the world. Use the intensity parameters to set the proper light level for the sky. | Sky Layers provide a container for individual sky elements. Layers can contain a layer skin, sky bodies and a sky light. Layers have an orientation relative to the world coordinate system given by a quaternion. Using this orientation layers can be slowly rotated to simulate day/night cycles or even complex planetary movement if required by the game. Furthermore each layer has a color and intensity parameter. They are used by the layer skin and layer bodies to alter the color and intensity. The intensity is used the same way as in lighting and measures the luminance of the layer components in lumen. A typical daylight sky has roughly 2500 lumen whereas a starlight sky has around 0.1 lumen. Each of the layer components can be specified alongside each other if required. Important to know is that the content of the sky is not influenced by any light cast in the world. Use the intensity parameters to set the proper light level for the sky. | ||
- | ===== Layer Skin ===== | + | ====== Layer Skin ====== |
- | The layer skin maps a sky texture onto the layer covering the entire space around the camera. A typical example for a sky texture could be a sky box as used with many games. Since there exist various ways to handle such sky textures the Drag[en]gine adopts a simple yet flexible way to define sky textures. The names of the textures in the assigned Skin object determine what kind of sky texture has to be used. The advantage of this system is the same as the one for texture properties in Skin objects. The game engine is not required to know anything about the used system at all. What a given texture name means is simply a contract between the game artist and the Graphic Module. This way new sky texture ways can be implemented without having to change anything except the Graphic Module. The possible names and how they work are explained in the [[gamedev: | + | The layer skin maps a sky texture onto the layer covering the entire space around the camera. A typical example for a sky texture could be a sky box as used with many games. Since there exist various ways to handle such sky textures the Drag[en]gine adopts a simple yet flexible way to define sky textures. The names of the textures in the assigned Skin object determine what kind of sky texture has to be used. The advantage of this system is the same as the one for texture properties in Skin objects. The game engine is not required to know anything about the used system at all. What a given texture name means is simply a contract between the game artist and the Graphic Module. This way new sky texture ways can be implemented without having to change anything except the Graphic Module. The possible names and how they work are explained in the [[gamedev: |
- | ===== Sky Bodies ===== | + | ====== Sky Bodies |
A Sky Body is simply a celestrical body which is pinned to the Sky Layer. A typical example is the sun or moon. Each body has a skin, a size, an orientation, | A Sky Body is simply a celestrical body which is pinned to the Sky Layer. A typical example is the sun or moon. Each body has a skin, a size, an orientation, | ||
- | ===== Sky Light ===== | + | ====== Sky Light ====== |
In addition to the graphic representation a Sky Layer can also emit light. The emitted light is always directional along the negative Z axis of the Sky Layer. The direction of the light is fixed to the Sky Layer itself since there can be only one light per layer and having an additional light orientation does not add anything worthwhile. If you need a separate orientation for your sky light simply use a second Sky Layer with no skin and bodies but just the light and sync the orientation with the main Sky layer. The sky light has only a color, diffuse intensity and ambient intensity parameter. To stick with our example a sky light for a sun at 100' | In addition to the graphic representation a Sky Layer can also emit light. The emitted light is always directional along the negative Z axis of the Sky Layer. The direction of the light is fixed to the Sky Layer itself since there can be only one light per layer and having an additional light orientation does not add anything worthwhile. If you need a separate orientation for your sky light simply use a second Sky Layer with no skin and bodies but just the light and sync the orientation with the main Sky layer. The sky light has only a color, diffuse intensity and ambient intensity parameter. To stick with our example a sky light for a sun at 100' | ||
- | |||
- | ====== Links ====== | ||
- | * [[gamedev: | ||
- | * [[: |